Auto-commit of generated files.
[emacs.git] / leim / Makefile.in
blob9556ecb3bb73bdc0fd73fdd41b509f98abe27c8e
1 # Makefile for leim subdirectory in GNU Emacs.
3 # Copyright (C) 1997-2012 Free Software Foundation, Inc.
4 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
5 # 2006, 2007, 2008, 2009, 2010, 2011
6 # National Institute of Advanced Industrial Science and Technology (AIST)
7 # Registration Number H14PRO021
9 # This file is part of GNU Emacs.
11 # GNU Emacs is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 3 of the License, or
14 # (at your option) any later version.
16 # GNU Emacs is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
25 # Avoid trouble on systems where the `SHELL' variable might be
26 # inherited from the environment.
27 SHELL = /bin/sh
29 # Here are the things that we expect ../configure to edit.
30 version=@version@
31 prefix=@prefix@
32 datarootdir=@datarootdir@
33 datadir=@datadir@
34 srcdir=@srcdir@
35 ns_appresdir=@ns_appresdir@
37 # Where to install LEIM files.
38 INSTALLDIR=$(DESTDIR)${datadir}/emacs/${version}/leim
40 GZIP_PROG = @GZIP_PROG@
42 # Which Emacs to use to convert TIT files to Emacs Lisp files,
43 # byte-compile Emacs Lisp files, and generate the file leim-list.el.
44 BUILT_EMACS = ../src/emacs
46 buildlisppath=${srcdir}/../lisp
48 # How to run Emacs.
49 RUN_EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C \
50 ${BUILT_EMACS} -batch --no-site-file --no-site-lisp
52 # Subdirectories to be made if ${srcdir} is different from the current
53 # directory.
54 SUBDIRS=quail
56 # Files generated from TIT dictionaries for Chinese GB character set.
57 TIT_GB=\
58 quail/CCDOSPY.elc \
59 quail/Punct.elc \
60 quail/QJ.elc \
61 quail/SW.elc \
62 quail/TONEPY.elc
64 # Files generated from TIT dictionaries for Chinese BIG5 character set.
65 TIT_BIG5=\
66 quail/4Corner.elc \
67 quail/ARRAY30.elc \
68 quail/ECDICT.elc \
69 quail/ETZY.elc \
70 quail/Punct-b5.elc \
71 quail/PY-b5.elc \
72 quail/QJ-b5.elc \
73 quail/ZOZY.elc
75 CHINESE_TIT=${TIT_GB} ${TIT_BIG5}
77 NON_TIT_GB=${srcdir}/quail/py-punct.elc
79 NON_TIT_BIG5=${srcdir}/quail/pypunct-b5.elc
81 CHINESE_NON_TIT=${NON_TIT_GB} ${NON_TIT_BIG5}
83 CHINESE_GB=${TIT_GB} ${NON_TIT_GB}
85 CHINESE_BIG5=${TIT_BIG5} ${NON_TIT_BIG5}
87 JAPANESE=${srcdir}/quail/japanese.elc ${srcdir}/ja-dic/ja-dic.elc
89 KOREAN= ${srcdir}/quail/hangul.elc \
90 ${srcdir}/quail/hanja.elc \
91 ${srcdir}/quail/hanja3.elc \
92 ${srcdir}/quail/hanja-jis.elc \
93 ${srcdir}/quail/symbol-ksc.elc
95 THAI=${srcdir}/quail/thai.elc
97 VIETNAMESE=${srcdir}/quail/viqr.elc ${srcdir}/quail/vntelex.elc
99 LAO=${srcdir}/quail/lao.elc ${srcdir}/quail/lrt.elc
101 INDIAN=${srcdir}/quail/indian.elc
103 TIBETAN=${srcdir}/quail/tibetan.elc
105 LATIN= ${srcdir}/quail/latin-pre.elc \
106 ${srcdir}/quail/latin-post.elc \
107 ${srcdir}/quail/latin-alt.elc \
108 ${srcdir}/quail/latin-ltx.elc \
109 ${srcdir}/quail/welsh.elc
111 UNICODE=${srcdir}/quail/sgml-input.elc ${srcdir}/quail/rfc1345.elc \
112 ${srcdir}/quail/uni-input.elc
114 SLAVIC= \
115 ${srcdir}/quail/czech.elc \
116 ${srcdir}/quail/croatian.elc \
117 ${srcdir}/quail/slovak.elc
119 GREEK=${srcdir}/quail/greek.elc
121 RUSSIAN=${srcdir}/quail/cyrillic.elc ${srcdir}/quail/cyril-jis.elc
123 OTHERS= \
124 ${srcdir}/quail/arabic.elc \
125 ${srcdir}/quail/ethiopic.elc \
126 ${srcdir}/quail/ipa.elc \
127 ${srcdir}/quail/ipa-praat.elc \
128 ${srcdir}/quail/hebrew.elc \
129 ${srcdir}/quail/georgian.elc \
130 $(srcdir)/quail/persian.elc \
131 ${srcdir}/quail/sisheng.elc
133 MISC= \
134 quail/tsang-b5.elc \
135 quail/quick-b5.elc \
136 quail/tsang-cns.elc \
137 quail/quick-cns.elc \
138 quail/PY.elc \
139 quail/ZIRANMA.elc \
140 quail/CTLau.elc \
141 quail/CTLau-b5.elc
143 CHINESE=${CHINESE_GB} ${CHINESE_BIG5}
144 EASTASIA=${CHINESE} ${JAPANESE} ${KOREAN}
145 ASIA=${EASTASIA} ${THAI} ${VIETNAMESE} ${LAO} ${INDIAN} ${TIBETAN}
146 EUROPEAN=${LATIN} ${SLAVIC} ${GREEK} ${RUSSIAN}
147 WORLD=${ASIA} ${EUROPEAN} ${OTHERS} ${MISC} ${UNICODE}
149 TIT_MISC=${CHINESE_TIT} ${MISC}
150 NON_TIT_MISC=${CHINESE_NON_TIT} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${OTHERS}
152 .SUFFIXES: .elc .el
154 .el.elc:
155 @echo Compiling $<
156 @${RUN_EMACS} -f batch-byte-compile $<
158 all: ${BUILT_EMACS} ${SUBDIRS} leim-list.el ${WORLD}
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 ../src/emacs:
163 cd ../src; ${MAKE} ${MFLAGS} emacs
165 ${SUBDIRS}:
166 mkdir $@
167 touch stamp-subdir
169 TIT_SOURCES= \
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
184 ${CHINESE_TIT:.elc=.el}: changed.tit
185 @true
187 changed.tit: ${TIT_SOURCES}
188 ${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \
189 -f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \
190 echo "changed" > $@
192 MISC_SOURCES= \
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
200 ${MISC:.elc=.el}: changed.misc
201 @true
203 changed.misc: ${MISC_SOURCES}
204 ${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \
205 -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \
206 echo "changed" > $@
208 leim-list.el: ${SUBDIRS} ${TIT_MISC} changed.tit changed.misc ${srcdir}/leim-ext.el
209 rm -f leim-list.el
210 ${RUN_EMACS} -l ${buildlisppath}/international/quail \
211 -f batch-byte-compile-if-not-done ${TIT_MISC:.elc=.el}
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}\")" ; \
219 sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
221 MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done
223 install: all
224 if [ ! -d ${INSTALLDIR} ] ; then \
225 umask 022; ${srcdir}/../build-aux/install-sh -d ${INSTALLDIR}; \
226 else true; fi
227 if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
228 rm -f ${INSTALLDIR}/leim-list.el; \
229 rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \
230 echo "Copying leim files to ${INSTALLDIR} ..." ; \
231 if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
232 tar -chf - leim-list.el quail ja-dic \
233 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
234 else \
235 tar -chf - leim-list.el quail \
236 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
237 cd ${srcdir}; \
238 tar -chf - quail/* ja-dic \
239 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
240 fi; \
241 rm -f ${INSTALLDIR}/.gitignore ${INSTALLDIR}/*/.gitignore; \
242 rm -f ${INSTALLDIR}/.arch-inventory ${INSTALLDIR}/*/.arch-inventory; \
243 rm -f ${INSTALLDIR}/\#* ${INSTALLDIR}/*/\#* ; \
244 rm -f ${INSTALLDIR}/.\#* ${INSTALLDIR}/*/.\#* ; \
245 rm -f ${INSTALLDIR}/*~ ${INSTALLDIR}/*/*~ ; \
246 rm -f ${INSTALLDIR}/*.orig ${INSTALLDIR}/*/*.orig ; \
247 else true; fi
248 -unset CDPATH; \
249 if [ -n "${GZIP_PROG}" ]; \
250 then \
251 echo "Compressing *.el ..." ; \
252 (cd ${INSTALLDIR}; for f in `find . -name "*.elc" -print`; do \
253 ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
254 done) \
255 else true; fi
256 -chmod -R a+r ${INSTALLDIR}
257 for installuser in $${LOGNAME} $${USERNAME} $${USER} \
258 `id -un 2> /dev/null`; do \
259 [ -n "$${installuser}" ] && break ; \
260 done ; \
261 find ${INSTALLDIR} -exec chown $${installuser} '{}' ';'
262 if [ "${ns_appresdir}" != "" ]; then \
263 ( cd ${ns_appresdir} ; \
264 if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\
265 rm -fr share ) ; \
266 else true ; fi
268 clean mostlyclean:
269 rm -f ${TIT_MISC} ${TIT_MISC:.elc=.el} \
270 leim-list.el changed.tit changed.misc
272 # The following target is needed because the `clean' target only removes
273 # TIT-generated files and doesn't touch compiled Quail packages. But
274 # bootstrapping should not leave non-fresh .elc files behind.
275 bootstrap-clean: clean
276 rm -f ${WORLD}
277 ## FIXME some compiled files go to srcdir, some don't?
278 # cd ${srcdir}; rm -f *.elc */*.elc
280 distclean: clean
281 if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi
282 rm -f Makefile
284 maintainer-clean: distclean bootstrap-clean
286 extraclean: maintainer-clean
287 -rm -f *~ \#* */*~ */\#*
289 .PHONY: check-declare
291 check-declare:
292 $(RUN_EMACS) -l $(buildlisppath)/emacs-lisp/check-declare \
293 --eval '(check-declare-directory "$(srcdir)")'