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