Commit | Line | Data |
---|---|---|
dadbf673 | 1 | # Makefile for leim subdirectory in GNU Emacs. |
6d344054 GM |
2 | # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, |
3 | # 2006, 2007, 2008 | |
eda20bd8 | 4 | # Free Software Foundation, Inc. |
6d344054 GM |
5 | # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, |
6 | # 2006, 2007, 2008 | |
eda20bd8 KH |
7 | # National Institute of Advanced Industrial Science and Technology (AIST) |
8 | # Registration Number H14PRO021 | |
24b31c88 | 9 | |
dadbf673 GM |
10 | # This file is part of GNU Emacs. |
11 | ||
12 | # GNU Emacs is free software; you can redistribute it and/or modify | |
13 | # it under the terms of the GNU General Public License as published by | |
d7142f3e | 14 | # the Free Software Foundation; either version 3, or (at your option) |
dadbf673 GM |
15 | # any later version. |
16 | # | |
17 | # GNU Emacs is distributed in the hope that it will be useful, | |
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | # GNU General Public License for more details. | |
21 | # | |
22 | # You should have received a copy of the GNU General Public License | |
23 | # along with GNU Emacs; see the file COPYING. If not, write to the | |
364c38d3 LK |
24 | # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
25 | # Boston, MA 02110-1301, USA. | |
dadbf673 GM |
26 | |
27 | # Avoid trouble on systems where the `SHELL' variable might be | |
28 | # inherited from the environment. | |
29 | SHELL = /bin/sh | |
30 | ||
31 | # Here are the things that we expect ../configure to edit. | |
32 | version=@version@ | |
33 | prefix=@prefix@ | |
ca1cd89c | 34 | datarootdir=@datarootdir@ |
dadbf673 GM |
35 | datadir=@datadir@ |
36 | srcdir=@srcdir@ | |
37 | ||
38 | # Where to install LEIM files. | |
62ebf7d7 | 39 | INSTALLDIR=$(DESTDIR)${datadir}/emacs/${version}/leim |
dadbf673 | 40 | |
d95f329f | 41 | GZIP_PROG = @GZIP_PROG@ |
7a7f042f | 42 | |
dadbf673 GM |
43 | # On Xenix and the IBM RS6000, double-dot gets screwed up. |
44 | dot = . | |
45 | ||
46 | # Which Emacs to use to convert TIT files to Emacs Lisp files, | |
47 | # byte-compile Emacs Lisp files, and generate the file leim-list.el. | |
48 | BUILT-EMACS = ${dot}${dot}/src/emacs | |
49 | ||
50 | buildlisppath=${srcdir}/${dot}${dot}/lisp | |
51 | ||
52 | # How to run Emacs. | |
07a7cdcb | 53 | RUN-EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C\ |
dadbf673 GM |
54 | ${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte |
55 | ||
56 | # Subdirectories to be made if ${srcdir} is different from the current | |
57 | # directory. | |
58 | SUBDIRS=quail | |
59 | ||
60 | # Files generated from TIT dictionaries for Chinese GB character set. | |
61 | TIT-GB=\ | |
dadbf673 GM |
62 | quail/CCDOSPY.elc \ |
63 | quail/Punct.elc \ | |
dadbf673 GM |
64 | quail/QJ.elc \ |
65 | quail/SW.elc \ | |
117348b8 | 66 | quail/TONEPY.elc |
dadbf673 GM |
67 | |
68 | # Files generated from TIT dictionaries for Chinese BIG5 character set. | |
69 | TIT-BIG5=\ | |
70 | quail/4Corner.elc \ | |
71 | quail/ARRAY30.elc \ | |
dadbf673 GM |
72 | quail/ECDICT.elc \ |
73 | quail/ETZY.elc \ | |
74 | quail/Punct-b5.elc \ | |
75 | quail/PY-b5.elc \ | |
76 | quail/QJ-b5.elc \ | |
77 | quail/ZOZY.elc | |
78 | ||
79 | CHINESE-TIT=${TIT-GB} ${TIT-BIG5} | |
80 | ||
81 | NON-TIT-GB=${srcdir}/quail/py-punct.elc | |
82 | ||
117348b8 | 83 | NON-TIT-BIG5=${srcdir}/quail/pypunct-b5.elc |
dadbf673 | 84 | |
117348b8 | 85 | CHINESE-NON-TIT=${NON-TIT-GB} ${NON-TIT-BIG5} |
dadbf673 GM |
86 | |
87 | CHINESE-GB=${TIT-GB} ${NON-TIT-GB} | |
88 | ||
177c0ea7 | 89 | CHINESE-BIG5=${TIT-BIG5} ${NON-TIT-BIG5} |
dadbf673 | 90 | |
dadbf673 GM |
91 | JAPANESE=${srcdir}/quail/japanese.elc ${srcdir}/ja-dic/ja-dic.elc |
92 | ||
93 | KOREAN= ${srcdir}/quail/hangul.elc \ | |
94 | ${srcdir}/quail/hangul3.elc \ | |
95 | ${srcdir}/quail/hanja.elc \ | |
a46d278b | 96 | ${srcdir}/quail/hanja3.elc \ |
dadbf673 GM |
97 | ${srcdir}/quail/hanja-jis.elc \ |
98 | ${srcdir}/quail/symbol-ksc.elc | |
99 | ||
100 | THAI=${srcdir}/quail/thai.elc | |
101 | ||
54679108 | 102 | VIETNAMESE=${srcdir}/quail/viqr.elc ${srcdir}/quail/vntelex.elc |
dadbf673 GM |
103 | |
104 | LAO=${srcdir}/quail/lao.elc ${srcdir}/quail/lrt.elc | |
105 | ||
afdc8040 | 106 | INDIAN=${srcdir}/quail/indian.elc |
dadbf673 GM |
107 | |
108 | TIBETAN=${srcdir}/quail/tibetan.elc | |
109 | ||
e427747f KH |
110 | LATIN= ${srcdir}/quail/latin-pre.elc \ |
111 | ${srcdir}/quail/latin-post.elc \ | |
f8f96fe2 | 112 | ${srcdir}/quail/latin-alt.elc \ |
0fcaf339 DL |
113 | ${srcdir}/quail/latin-ltx.elc \ |
114 | ${srcdir}/quail/welsh.elc | |
115 | ||
116 | UNICODE=${srcdir}/quail/sgml-input.elc ${srcdir}/quail/rfc1345.elc \ | |
117 | ${srcdir}/quail/uni-input.elc | |
dadbf673 GM |
118 | |
119 | SLAVIC= \ | |
120 | ${srcdir}/quail/czech.elc \ | |
98e99f6e | 121 | ${srcdir}/quail/croatian.elc \ |
dadbf673 GM |
122 | ${srcdir}/quail/slovak.elc |
123 | ||
124 | GREEK=${srcdir}/quail/greek.elc | |
125 | ||
126 | RUSSIAN=${srcdir}/quail/cyrillic.elc ${srcdir}/quail/cyril-jis.elc | |
127 | ||
242a2def | 128 | OTHERS= \ |
dadbf673 GM |
129 | ${srcdir}/quail/ethiopic.elc \ |
130 | ${srcdir}/quail/ipa.elc \ | |
0fcaf339 | 131 | ${srcdir}/quail/hebrew.elc \ |
f9f14309 KH |
132 | ${srcdir}/quail/georgian.elc \ |
133 | ${srcdir}/quail/sisheng.elc | |
dadbf673 | 134 | |
242a2def | 135 | MISC= \ |
117348b8 KH |
136 | quail/tsang-b5.elc \ |
137 | quail/quick-b5.elc \ | |
138 | quail/tsang-cns.elc \ | |
139 | quail/quick-cns.elc \ | |
140 | quail/PY.elc \ | |
5156a15c AC |
141 | quail/ZIRANMA.elc \ |
142 | quail/CTLau.elc \ | |
937fad9a | 143 | quail/CTLau-b5.elc |
117348b8 KH |
144 | |
145 | CHINESE=${CHINESE-GB} ${CHINESE-BIG5} | |
dadbf673 GM |
146 | EASTASIA=${CHINESE} ${JAPANESE} ${KOREAN} |
147 | ASIA=${EASTASIA} ${THAI} ${VIETNAMESE} ${LAO} ${INDIAN} ${TIBETAN} | |
148 | EUROPEAN=${LATIN} ${SLAVIC} ${GREEK} ${RUSSIAN} | |
242a2def | 149 | WORLD=${ASIA} ${EUROPEAN} ${OTHERS} ${MISC} ${UNICODE} |
dadbf673 | 150 | |
242a2def KH |
151 | TIT-MISC=${CHINESE-TIT} ${MISC} |
152 | NON-TIT-MISC=${CHINESE-NON-TIT} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${OTHERS} | |
dadbf673 | 153 | |
e1e539ed KH |
154 | .SUFFIXES: .elc .el |
155 | ||
dadbf673 GM |
156 | .el.elc: |
157 | ${RUN-EMACS} -f batch-byte-compile $< | |
158 | ||
9d820f1a | 159 | all: ${BUILT-EMACS} ${SUBDIRS} leim-list.el ${WORLD} |
dadbf673 GM |
160 | |
161 | # To ensure that we can run Emacs. This target is ignored (never | |
162 | # being hit) if a user changes default value of EMACS. | |
163 | ${dot}${dot}/src/emacs: | |
164 | cd ../src; ${MAKE} ${MFLAGS} emacs | |
165 | ||
166 | ${SUBDIRS}: | |
167 | mkdir $@ | |
168 | touch stamp-subdir | |
169 | ||
242a2def | 170 | TIT-SOURCES= \ |
2cd23d89 KH |
171 | ${srcdir}/CXTERM-DIC/4Corner.tit \ |
172 | ${srcdir}/CXTERM-DIC/ARRAY30.tit \ | |
173 | ${srcdir}/CXTERM-DIC/CCDOSPY.tit \ | |
174 | ${srcdir}/CXTERM-DIC/ECDICT.tit \ | |
175 | ${srcdir}/CXTERM-DIC/ETZY.tit \ | |
176 | ${srcdir}/CXTERM-DIC/PY-b5.tit \ | |
177 | ${srcdir}/CXTERM-DIC/Punct-b5.tit \ | |
178 | ${srcdir}/CXTERM-DIC/Punct.tit \ | |
179 | ${srcdir}/CXTERM-DIC/QJ-b5.tit \ | |
180 | ${srcdir}/CXTERM-DIC/QJ.tit \ | |
181 | ${srcdir}/CXTERM-DIC/SW.tit \ | |
182 | ${srcdir}/CXTERM-DIC/TONEPY.tit \ | |
183 | ${srcdir}/CXTERM-DIC/ZOZY.tit | |
242a2def | 184 | |
4c603b0c AS |
185 | ${CHINESE-TIT:.elc=.el}: changed.tit |
186 | @true | |
187 | ||
242a2def | 188 | changed.tit: ${TIT-SOURCES} |
026e4e51 EZ |
189 | ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \ |
190 | -f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \ | |
191 | echo "changed" > $@ | |
242a2def KH |
192 | |
193 | MISC-SOURCES= \ | |
2cd23d89 KH |
194 | ${srcdir}/MISC-DIC/CTLau-b5.html \ |
195 | ${srcdir}/MISC-DIC/CTLau.html \ | |
196 | ${srcdir}/MISC-DIC/cangjie-table.b5 \ | |
197 | ${srcdir}/MISC-DIC/cangjie-table.cns \ | |
198 | ${srcdir}/MISC-DIC/pinyin.map \ | |
199 | ${srcdir}/MISC-DIC/ziranma.cin | |
242a2def | 200 | |
4c603b0c AS |
201 | ${MISC:.elc=.el}: changed.misc |
202 | @true | |
203 | ||
242a2def | 204 | changed.misc: ${MISC-SOURCES} |
026e4e51 EZ |
205 | ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \ |
206 | -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \ | |
207 | echo "changed" > $@ | |
242a2def | 208 | |
90519dc8 | 209 | leim-list.el: ${SUBDIRS} ${TIT-MISC} changed.tit changed.misc ${srcdir}/leim-ext.el |
242a2def KH |
210 | ${RUN-EMACS} -l ${buildlisppath}/international/quail \ |
211 | -f batch-byte-compile-if-not-done ${TIT-MISC:.elc=.el} | |
dadbf673 GM |
212 | if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \ |
213 | ${RUN-EMACS} -l ${buildlisppath}/international/quail \ | |
214 | --eval "(update-leim-list-file \".\")" ; \ | |
215 | else \ | |
216 | ${RUN-EMACS} -l ${buildlisppath}/international/quail \ | |
217 | --eval "(update-leim-list-file \".\" \"${srcdir}\")" ; \ | |
218 | fi | |
8f34b40c | 219 | sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@ |
dadbf673 GM |
220 | |
221 | install: all | |
94461c21 KH |
222 | if [ ! -d ${INSTALLDIR} ] ; then \ |
223 | ${srcdir}/${dot}${dot}/mkinstalldirs ${INSTALLDIR}; \ | |
224 | else true; fi | |
dadbf673 | 225 | if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \ |
94461c21 KH |
226 | rm -rf ${INSTALLDIR}/leim-list.el; \ |
227 | rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \ | |
dadbf673 GM |
228 | echo "Copying leim files to ${INSTALLDIR} ..." ; \ |
229 | if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \ | |
05b54460 | 230 | tar -chf - leim-list.el quail ja-dic \ |
dadbf673 GM |
231 | | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\ |
232 | else \ | |
05b54460 | 233 | tar -chf - leim-list.el quail \ |
dadbf673 GM |
234 | | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\ |
235 | cd ${srcdir}; \ | |
05b54460 | 236 | tar -chf - quail/* ja-dic \ |
dadbf673 GM |
237 | | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\ |
238 | fi; \ | |
069e6098 AS |
239 | rm -rf ${INSTALLDIR}/CVS ${INSTALLDIR}/*/CVS; \ |
240 | rm -f ${INSTALLDIR}/.cvsignore ${INSTALLDIR}/*/.cvsignore; \ | |
792a05ba | 241 | rm -f ${INSTALLDIR}/.arch-inventory ${INSTALLDIR}/*/.arch-inventory; \ |
069e6098 AS |
242 | rm -f ${INSTALLDIR}/\#* ${INSTALLDIR}/*/\#* ; \ |
243 | rm -f ${INSTALLDIR}/.\#* ${INSTALLDIR}/*/.\#* ; \ | |
244 | rm -f ${INSTALLDIR}/*~ ${INSTALLDIR}/*/*~ ; \ | |
245 | rm -f ${INSTALLDIR}/*.orig ${INSTALLDIR}/*/*.orig ; \ | |
dadbf673 | 246 | else true; fi |
7a7f042f | 247 | -unset CDPATH; \ |
d95f329f | 248 | if [ -n "${GZIP_PROG}" ]; \ |
7a7f042f RF |
249 | then \ |
250 | echo "Compressing *.el ..." ; \ | |
251 | (cd ${INSTALLDIR}; for f in `find . -name "*.elc" -print`; do \ | |
d95f329f | 252 | ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \ |
7a7f042f RF |
253 | done) \ |
254 | else true; fi | |
dadbf673 | 255 | -chmod -R a+r ${INSTALLDIR} |
1cf46be3 | 256 | -find ${INSTALLDIR} -exec chown $${LOGNAME:-$$USERNAME} '{}' ';' |
dadbf673 GM |
257 | |
258 | clean mostlyclean: | |
7017c817 | 259 | rm -f ${TIT-MISC} ${TIT-MISC:.elc=.el} \ |
242a2def | 260 | leim-list.el changed.tit changed.misc |
dadbf673 | 261 | |
9200c926 RF |
262 | # The following target is needed because the `clean' target only removes |
263 | # TIT-generated files and doesn't touch compiled Quail packages. But | |
264 | # bootstrapping should not leave non-fresh .elc files behind. | |
265 | bootstrap-clean: clean | |
266 | rm -f ${WORLD} | |
267 | ||
e6f528ba | 268 | distclean: clean |
dadbf673 GM |
269 | if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi |
270 | rm -f Makefile | |
a070e0b7 | 271 | |
e6f528ba KH |
272 | maintainer-clean: distclean |
273 | rm -f ${WORLD} | |
274 | ||
275 | extraclean: maintainer-clean | |
a070e0b7 | 276 | -rm -f *~ \#* m/?*~ s/?*~ |