| 1 |
# FreeWnn is a network-extensible Kana-to-Kanji conversion system. |
| 2 |
# This file is part of FreeWnn. |
| 3 |
# |
| 4 |
# Copyright Kyoto University Research Institute for Mathematical Sciences |
| 5 |
# 1987, 1988, 1989, 1990, 1991, 1992 |
| 6 |
# Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999 |
| 7 |
# Copyright ASTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992 |
| 8 |
# |
| 9 |
# Author: OMRON SOFTWARE Co., Ltd. <freewnn@rd.kyoto.omronsoft.co.jp> |
| 10 |
# |
| 11 |
# This program is free software; you can redistribute it and/or modify |
| 12 |
# it under the terms of the GNU General Public License as published by |
| 13 |
# the Free Software Foundation; either version 2, or (at your option) |
| 14 |
# any later version. |
| 15 |
# |
| 16 |
# This program is distributed in the hope that it will be useful, |
| 17 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 |
# GNU General Public License for more details. |
| 20 |
# |
| 21 |
# You should have received a copy of the GNU General Public License |
| 22 |
# along with GNU Emacs; see the file COPYING. If not, write to the |
| 23 |
# Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 24 |
|
| 25 |
include @top_srcdir@/makerule.mk |
| 26 |
|
| 27 |
WNNDIR = Wnn |
| 28 |
|
| 29 |
CWNNDIR = cWnn |
| 30 |
|
| 31 |
KWNNDIR = kWnn |
| 32 |
|
| 33 |
SUBDIRS= $(WNNDIR) $(CWNNDIR) $(KWNNDIR) |
| 34 |
|
| 35 |
World:: |
| 36 |
@echo "" |
| 37 |
@echo "Building Input Method." |
| 38 |
@echo "" |
| 39 |
@date |
| 40 |
@echo "" |
| 41 |
-$(RM) Makefile.bak; $(MV) Makefile Makefile.bak |
| 42 |
$(MAKE) $(MFLAGS) -f Makefile.bak Makefile |
| 43 |
$(MAKE) $(MFLAGS) Makefiles |
| 44 |
$(MAKE) $(MFLAGS) clean |
| 45 |
$(MAKE) $(MFLAGS) includes |
| 46 |
$(MAKE) $(MFLAGS) depend |
| 47 |
$(MAKE) $(MFLAGS) $(WORLDOPTS) |
| 48 |
@echo "" |
| 49 |
@date |
| 50 |
@echo "" |
| 51 |
@echo "Full build of Input Method." |
| 52 |
@echo "" |
| 53 |
|
| 54 |
Everything:: |
| 55 |
@echo "" |
| 56 |
@echo "Rebuilding Input Method." |
| 57 |
@echo "" |
| 58 |
@date |
| 59 |
@echo "" |
| 60 |
-$(RM) Makefile.bak; $(MV) Makefile Makefile.bak |
| 61 |
$(MAKE) $(MFLAGS) -f Makefile.bak Makefile |
| 62 |
$(MAKE) $(MFLAGS) Makefiles |
| 63 |
$(MAKE) $(MFLAGS) includes |
| 64 |
$(MAKE) $(MFLAGS) depend |
| 65 |
$(MAKE) $(MFLAGS) $(WORLDOPTS) |
| 66 |
@echo "" |
| 67 |
@date |
| 68 |
@echo "" |
| 69 |
@echo "Rebuild of Input Method." |
| 70 |
@echo "" |
| 71 |
|
| 72 |
# ---------------------------------------------------------------------- |
| 73 |
# common rules for all Makefiles - do not edit |
| 74 |
|
| 75 |
.c.i: |
| 76 |
$(RM) $@ |
| 77 |
$(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@ |
| 78 |
|
| 79 |
emptyrule:: |
| 80 |
|
| 81 |
clean:: |
| 82 |
$(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut *.core "#"* |
| 83 |
|
| 84 |
Makefile:: |
| 85 |
-@if [ -f Makefile ]; then set -x; \ |
| 86 |
$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ |
| 87 |
else exit 0; fi |
| 88 |
$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) |
| 89 |
|
| 90 |
tags:: |
| 91 |
$(TAGS) -w *.[ch] |
| 92 |
$(TAGS) -xw *.[ch] > TAGS |
| 93 |
|
| 94 |
man_keywords:: |
| 95 |
|
| 96 |
# ---------------------------------------------------------------------- |
| 97 |
# rules for building in SUBDIRS - do not edit |
| 98 |
|
| 99 |
install:: |
| 100 |
@for flag in ${MAKEFLAGS} ''; do \ |
| 101 |
case "$$flag" in *=*) ;; *[ik]*) set +e;; esac; done; \ |
| 102 |
for i in $(SUBDIRS) ;\ |
| 103 |
do \ |
| 104 |
echo "installing" "in $(CURRENT_DIR)/$$i..."; \ |
| 105 |
(cd $$i && $(MAKE) $(MFLAGS) $(PARALLELMFLAGS) \ |
| 106 |
DESTDIR=$(DESTDIR) install); \ |
| 107 |
done |
| 108 |
|
| 109 |
install.man:: |
| 110 |
@for flag in ${MAKEFLAGS} ''; do \ |
| 111 |
case "$$flag" in *=*) ;; *[ik]*) set +e;; esac; done; \ |
| 112 |
for i in $(SUBDIRS) ;\ |
| 113 |
do \ |
| 114 |
echo "installing man pages" "in $(CURRENT_DIR)/$$i..."; \ |
| 115 |
(cd $$i && $(MAKE) $(MFLAGS) $(PARALLELMFLAGS) \ |
| 116 |
DESTDIR=$(DESTDIR) install.man); \ |
| 117 |
done |
| 118 |
|
| 119 |
install.linkkit:: |
| 120 |
@for flag in ${MAKEFLAGS} ''; do \ |
| 121 |
case "$$flag" in *=*) ;; *[ik]*) set +e;; esac; done; \ |
| 122 |
for i in $(SUBDIRS) ;\ |
| 123 |
do \ |
| 124 |
echo "installing link kit" "in $(CURRENT_DIR)/$$i..."; \ |
| 125 |
(cd $$i && $(MAKE) $(MFLAGS) $(PARALLELMFLAGS) \ |
| 126 |
DESTDIR='$(DESTDIR)' install.linkkit); \ |
| 127 |
done |
| 128 |
|
| 129 |
clean:: |
| 130 |
@for flag in ${MAKEFLAGS} ''; do \ |
| 131 |
case "$$flag" in *=*) ;; *[ik]*) set +e;; esac; done; \ |
| 132 |
for i in $(SUBDIRS) ;\ |
| 133 |
do \ |
| 134 |
echo "cleaning" "in $(CURRENT_DIR)/$$i..."; \ |
| 135 |
(cd $$i && $(MAKE) $(MFLAGS) $(PARALLELMFLAGS) \ |
| 136 |
clean); \ |
| 137 |
done |
| 138 |
|
| 139 |
tags:: |
| 140 |
@for flag in ${MAKEFLAGS} ''; do \ |
| 141 |
case "$$flag" in *=*) ;; *[ik]*) set +e;; esac; done; \ |
| 142 |
for i in $(SUBDIRS) ;\ |
| 143 |
do \ |
| 144 |
echo "tagging" "in $(CURRENT_DIR)/$$i..."; \ |
| 145 |
(cd $$i && $(MAKE) $(MFLAGS) $(PARALLELMFLAGS) \ |
| 146 |
TAGS='$(TAGS)' tags); \ |
| 147 |
done |
| 148 |
|
| 149 |
$(ONESUBDIR)/Makefile: |
| 150 |
@for flag in ${MAKEFLAGS} ''; do \ |
| 151 |
case "$$flag" in *=*) ;; *[n]*) executeit="no";; esac; done; \ |
| 152 |
cd $(ONESUBDIR) && \ |
| 153 |
if [ "$$executeit" != "no" ]; then \ |
| 154 |
$(IMAKE) -DUseInstalled -I$(IMAKEPREFIX)$(IMIRULESRC) -I$(IRULESRC) $(IMAKE_DEFINES) -DTOPDIR=$(IMAKETOP) -DCURDIR=$(ONECURDIR)$(ONESUBDIR); \ |
| 155 |
fi; |
| 156 |
|
| 157 |
Makefiles:: |
| 158 |
-@for flag in ${MAKEFLAGS} ''; do \ |
| 159 |
case "$$flag" in *=*) ;; *[ik]*) set +e;; esac; done; \ |
| 160 |
for flag in ${MAKEFLAGS} ''; do \ |
| 161 |
case "$$flag" in *=*) ;; *[n]*) executeit="no";; esac; done; \ |
| 162 |
for i in $(SUBDIRS) ;\ |
| 163 |
do \ |
| 164 |
case "$(CURRENT_DIR)" in \ |
| 165 |
.) curdir= ;; \ |
| 166 |
*) curdir=$(CURRENT_DIR)/ ;; \ |
| 167 |
esac; \ |
| 168 |
echo "making Makefiles in $$curdir$$i..."; \ |
| 169 |
itmp=`echo $$i | sed -e 's;^\./;;g' -e 's;/\./;/;g'`; \ |
| 170 |
curtmp="$(CURRENT_DIR)" \ |
| 171 |
toptmp=""; \ |
| 172 |
case "$$itmp" in \ |
| 173 |
../?*) \ |
| 174 |
while echo "$$itmp" | grep '^\.\./' > /dev/null;\ |
| 175 |
do \ |
| 176 |
toptmp="/`basename $$curtmp`$$toptmp"; \ |
| 177 |
curtmp="`dirname $$curtmp`"; \ |
| 178 |
itmp="`echo $$itmp | sed 's;\.\./;;'`"; \ |
| 179 |
done \ |
| 180 |
;; \ |
| 181 |
esac; \ |
| 182 |
case "$$itmp" in \ |
| 183 |
*/?*/?*/?*/?*) newtop=../../../../..;; \ |
| 184 |
*/?*/?*/?*) newtop=../../../..;; \ |
| 185 |
*/?*/?*) newtop=../../..;; \ |
| 186 |
*/?*) newtop=../..;; \ |
| 187 |
*) newtop=..;; \ |
| 188 |
esac; \ |
| 189 |
newtop="$$newtop$$toptmp"; \ |
| 190 |
case "$(TOP)" in \ |
| 191 |
/?*) imaketop=$(TOP) \ |
| 192 |
imakeprefix= ;; \ |
| 193 |
.) imaketop=$$newtop \ |
| 194 |
imakeprefix=$$newtop/ ;; \ |
| 195 |
*) imaketop=$$newtop/$(TOP) \ |
| 196 |
imakeprefix=$$newtop/ ;; \ |
| 197 |
esac; \ |
| 198 |
$(RM) $$i/Makefile.bak; \ |
| 199 |
if [ -f $$i/Makefile ]; then \ |
| 200 |
echo " $(MV) Makefile Makefile.bak"; \ |
| 201 |
if [ "$$executeit" != "no" ]; then \ |
| 202 |
$(MV) $$i/Makefile $$i/Makefile.bak; \ |
| 203 |
fi; \ |
| 204 |
fi; \ |
| 205 |
$(MAKE) $(MFLAGS) $(MAKE_OPTS) ONESUBDIR=$$i ONECURDIR=$$curdir IMAKETOP=$$imaketop IMAKEPREFIX=$$imakeprefix $$i/Makefile; \ |
| 206 |
if [ -d $$i ] ; then \ |
| 207 |
cd $$i; \ |
| 208 |
$(MAKE) $(MFLAGS) Makefiles; \ |
| 209 |
cd $$newtop; \ |
| 210 |
else \ |
| 211 |
exit 1; \ |
| 212 |
fi; \ |
| 213 |
done |
| 214 |
|
| 215 |
includes:: |
| 216 |
@for flag in ${MAKEFLAGS} ''; do \ |
| 217 |
case "$$flag" in *=*) ;; *[ik]*) set +e;; esac; done; \ |
| 218 |
for i in $(SUBDIRS) ;\ |
| 219 |
do \ |
| 220 |
echo including "in $(CURRENT_DIR)/$$i..."; \ |
| 221 |
(cd $$i && $(MAKE) $(MFLAGS) $(PARALLELMFLAGS) \ |
| 222 |
includes); \ |
| 223 |
done |
| 224 |
|
| 225 |
# ---------------------------------------------------------------------- |
| 226 |
# dependencies generated by makedepend |
| 227 |
|
| 228 |
# dependencies are in .depend |
| 229 |
|