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