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