* lib-src/Makefile.in (EMACSOPT): Remove --multibyte, it does nothing any more.
[bpt/emacs.git] / leim / Makefile.in
CommitLineData
dadbf673 1# Makefile for leim subdirectory in GNU Emacs.
6d344054 2# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
114f9c96 3# 2006, 2007, 2008, 2009, 2010
eda20bd8 4# Free Software Foundation, Inc.
6d344054 5# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
114f9c96 6# 2006, 2007, 2008, 2009, 2010
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
d3fb0974 12# GNU Emacs is free software: you can redistribute it and/or modify
dadbf673 13# it under the terms of the GNU General Public License as published by
d3fb0974
GM
14# the Free Software Foundation, either version 3 of the License, or
15# (at your option) any later version.
16
dadbf673
GM
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.
d3fb0974 21
dadbf673 22# You should have received a copy of the GNU General Public License
d3fb0974
GM
23# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24
dadbf673
GM
25
26# Avoid trouble on systems where the `SHELL' variable might be
27# inherited from the environment.
28SHELL = /bin/sh
29
30# Here are the things that we expect ../configure to edit.
31version=@version@
32prefix=@prefix@
ca1cd89c 33datarootdir=@datarootdir@
dadbf673
GM
34datadir=@datadir@
35srcdir=@srcdir@
2a7973b6 36ns_appresdir=@ns_appresdir@
dadbf673
GM
37
38# Where to install LEIM files.
62ebf7d7 39INSTALLDIR=$(DESTDIR)${datadir}/emacs/${version}/leim
dadbf673 40
d95f329f 41GZIP_PROG = @GZIP_PROG@
7a7f042f 42
dadbf673
GM
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.
c1d05286 45BUILT-EMACS = ../src/emacs
dadbf673 46
c1d05286 47buildlisppath=${srcdir}/../lisp
dadbf673
GM
48
49# How to run Emacs.
dd6ab82f 50RUN-EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C \
198a7a97 51 ${BUILT-EMACS} -batch --no-init-file --no-site-file
dadbf673
GM
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 \
dadbf673 91 ${srcdir}/quail/hanja.elc \
a46d278b 92 ${srcdir}/quail/hanja3.elc \
dadbf673
GM
93 ${srcdir}/quail/hanja-jis.elc \
94 ${srcdir}/quail/symbol-ksc.elc
95
96THAI=${srcdir}/quail/thai.elc
97
54679108 98VIETNAMESE=${srcdir}/quail/viqr.elc ${srcdir}/quail/vntelex.elc
dadbf673
GM
99
100LAO=${srcdir}/quail/lao.elc ${srcdir}/quail/lrt.elc
101
afdc8040 102INDIAN=${srcdir}/quail/indian.elc
dadbf673
GM
103
104TIBETAN=${srcdir}/quail/tibetan.elc
105
e427747f
KH
106LATIN= ${srcdir}/quail/latin-pre.elc \
107 ${srcdir}/quail/latin-post.elc \
f8f96fe2 108 ${srcdir}/quail/latin-alt.elc \
0fcaf339
DL
109 ${srcdir}/quail/latin-ltx.elc \
110 ${srcdir}/quail/welsh.elc
111
112UNICODE=${srcdir}/quail/sgml-input.elc ${srcdir}/quail/rfc1345.elc \
113 ${srcdir}/quail/uni-input.elc
dadbf673
GM
114
115SLAVIC= \
116 ${srcdir}/quail/czech.elc \
98e99f6e 117 ${srcdir}/quail/croatian.elc \
dadbf673
GM
118 ${srcdir}/quail/slovak.elc
119
120GREEK=${srcdir}/quail/greek.elc
121
122RUSSIAN=${srcdir}/quail/cyrillic.elc ${srcdir}/quail/cyril-jis.elc
123
242a2def 124OTHERS= \
0bf80020 125 ${srcdir}/quail/arabic.elc \
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 153.el.elc:
8e0214ec
GM
154 @echo Compiling $<
155 @${RUN-EMACS} -f batch-byte-compile $<
dadbf673 156
9d820f1a 157all: ${BUILT-EMACS} ${SUBDIRS} leim-list.el ${WORLD}
dadbf673
GM
158
159# To ensure that we can run Emacs. This target is ignored (never
160# being hit) if a user changes default value of EMACS.
c1d05286 161../src/emacs:
dadbf673
GM
162 cd ../src; ${MAKE} ${MFLAGS} emacs
163
164${SUBDIRS}:
165 mkdir $@
166 touch stamp-subdir
167
242a2def 168TIT-SOURCES= \
2cd23d89
KH
169 ${srcdir}/CXTERM-DIC/4Corner.tit \
170 ${srcdir}/CXTERM-DIC/ARRAY30.tit \
171 ${srcdir}/CXTERM-DIC/CCDOSPY.tit \
172 ${srcdir}/CXTERM-DIC/ECDICT.tit \
173 ${srcdir}/CXTERM-DIC/ETZY.tit \
174 ${srcdir}/CXTERM-DIC/PY-b5.tit \
175 ${srcdir}/CXTERM-DIC/Punct-b5.tit \
176 ${srcdir}/CXTERM-DIC/Punct.tit \
177 ${srcdir}/CXTERM-DIC/QJ-b5.tit \
178 ${srcdir}/CXTERM-DIC/QJ.tit \
179 ${srcdir}/CXTERM-DIC/SW.tit \
180 ${srcdir}/CXTERM-DIC/TONEPY.tit \
181 ${srcdir}/CXTERM-DIC/ZOZY.tit
242a2def 182
4c603b0c
AS
183${CHINESE-TIT:.elc=.el}: changed.tit
184 @true
185
242a2def 186changed.tit: ${TIT-SOURCES}
026e4e51
EZ
187 ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
188 -f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \
189 echo "changed" > $@
242a2def
KH
190
191MISC-SOURCES= \
2cd23d89
KH
192 ${srcdir}/MISC-DIC/CTLau-b5.html \
193 ${srcdir}/MISC-DIC/CTLau.html \
194 ${srcdir}/MISC-DIC/cangjie-table.b5 \
195 ${srcdir}/MISC-DIC/cangjie-table.cns \
196 ${srcdir}/MISC-DIC/pinyin.map \
197 ${srcdir}/MISC-DIC/ziranma.cin
242a2def 198
4c603b0c
AS
199${MISC:.elc=.el}: changed.misc
200 @true
201
242a2def 202changed.misc: ${MISC-SOURCES}
026e4e51
EZ
203 ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
204 -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \
205 echo "changed" > $@
242a2def 206
90519dc8 207leim-list.el: ${SUBDIRS} ${TIT-MISC} changed.tit changed.misc ${srcdir}/leim-ext.el
7069bd16 208 rm -f leim-list.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 219
734dabe0 220MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done
3fef330a 221
dadbf673 222install: all
94461c21 223 if [ ! -d ${INSTALLDIR} ] ; then \
c1d05286 224 umask 022; ${srcdir}/../mkinstalldirs ${INSTALLDIR}; \
94461c21 225 else true; fi
dadbf673 226 if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
7069bd16 227 rm -f ${INSTALLDIR}/leim-list.el; \
94461c21 228 rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \
dadbf673
GM
229 echo "Copying leim files to ${INSTALLDIR} ..." ; \
230 if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
05b54460 231 tar -chf - leim-list.el quail ja-dic \
dadbf673
GM
232 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
233 else \
05b54460 234 tar -chf - leim-list.el quail \
dadbf673
GM
235 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
236 cd ${srcdir}; \
05b54460 237 tar -chf - quail/* ja-dic \
dadbf673
GM
238 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
239 fi; \
5ae051fd 240 rm -f ${INSTALLDIR}/.gitignore ${INSTALLDIR}/*/.gitignore; \
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}
fe1ada9b
GM
256 for installuser in $${LOGNAME} $${USERNAME} $${USER} \
257 `id -un 2> /dev/null`; do \
258 [ -n "$${installuser}" ] && break ; \
259 done ; \
07131283 260 find ${INSTALLDIR} -exec chown $${installuser} '{}' ';'
2a7973b6
AR
261 if [ "${ns_appresdir}" != "" ]; then \
262 ( cd ${ns_appresdir} ; \
3fef330a 263 if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\
2a7973b6
AR
264 rm -fr share ) ; \
265 else true ; fi
dadbf673
GM
266
267clean mostlyclean:
7017c817 268 rm -f ${TIT-MISC} ${TIT-MISC:.elc=.el} \
242a2def 269 leim-list.el changed.tit changed.misc
dadbf673 270
9200c926
RF
271# The following target is needed because the `clean' target only removes
272# TIT-generated files and doesn't touch compiled Quail packages. But
273# bootstrapping should not leave non-fresh .elc files behind.
274bootstrap-clean: clean
275 rm -f ${WORLD}
cbeed5af
GM
276## FIXME some compiled files go to srcdir, some don't?
277# cd ${srcdir}; rm -f *.elc */*.elc
9200c926 278
e6f528ba 279distclean: clean
dadbf673
GM
280 if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi
281 rm -f Makefile
a070e0b7 282
cbeed5af 283maintainer-clean: distclean bootstrap-clean
e6f528ba
KH
284
285extraclean: maintainer-clean
cbeed5af 286 -rm -f *~ \#* */*~ */\#*
63150f3c
GM
287
288.PHONY: check-declare
289
290check-declare:
291 $(RUN-EMACS) -l $(buildlisppath)/emacs-lisp/check-declare \
292 --eval '(check-declare-directory "$(srcdir)")'