* xterm.h (struct x_display_info): Remove stray semicolon.
[emacs.git] / leim / Makefile.in
blob99ac2dc055d86ff7f199bf9c05bde28382d71869
1 # Makefile for leim subdirectory in GNU Emacs.
2 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
3 # 2006, 2007, 2008, 2009, 2010, 2011
4 # Free Software Foundation, Inc.
5 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
6 # 2006, 2007, 2008, 2009, 2010, 2011
7 # National Institute of Advanced Industrial Science and Technology (AIST)
8 # Registration Number H14PRO021
10 # This file is part of GNU Emacs.
12 # GNU Emacs is free software: you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation, either version 3 of the License, or
15 # (at your option) any later version.
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.
22 # You should have received a copy of the GNU General Public License
23 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
26 # Avoid trouble on systems where the `SHELL' variable might be
27 # inherited from the environment.
28 SHELL = /bin/sh
30 # Here are the things that we expect ../configure to edit.
31 version=@version@
32 prefix=@prefix@
33 datarootdir=@datarootdir@
34 datadir=@datadir@
35 srcdir=@srcdir@
36 ns_appresdir=@ns_appresdir@
38 # Where to install LEIM files.
39 INSTALLDIR=$(DESTDIR)${datadir}/emacs/${version}/leim
41 GZIP_PROG = @GZIP_PROG@
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.
45 BUILT-EMACS = ../src/emacs
47 buildlisppath=${srcdir}/../lisp
49 # How to run Emacs.
50 RUN-EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C \
51 ${BUILT-EMACS} -batch --no-site-file --no-site-lisp
53 # Subdirectories to be made if ${srcdir} is different from the current
54 # directory.
55 SUBDIRS=quail
57 # Files generated from TIT dictionaries for Chinese GB character set.
58 TIT-GB=\
59 quail/CCDOSPY.elc \
60 quail/Punct.elc \
61 quail/QJ.elc \
62 quail/SW.elc \
63 quail/TONEPY.elc
65 # Files generated from TIT dictionaries for Chinese BIG5 character set.
66 TIT-BIG5=\
67 quail/4Corner.elc \
68 quail/ARRAY30.elc \
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
76 CHINESE-TIT=${TIT-GB} ${TIT-BIG5}
78 NON-TIT-GB=${srcdir}/quail/py-punct.elc
80 NON-TIT-BIG5=${srcdir}/quail/pypunct-b5.elc
82 CHINESE-NON-TIT=${NON-TIT-GB} ${NON-TIT-BIG5}
84 CHINESE-GB=${TIT-GB} ${NON-TIT-GB}
86 CHINESE-BIG5=${TIT-BIG5} ${NON-TIT-BIG5}
88 JAPANESE=${srcdir}/quail/japanese.elc ${srcdir}/ja-dic/ja-dic.elc
90 KOREAN= ${srcdir}/quail/hangul.elc \
91 ${srcdir}/quail/hanja.elc \
92 ${srcdir}/quail/hanja3.elc \
93 ${srcdir}/quail/hanja-jis.elc \
94 ${srcdir}/quail/symbol-ksc.elc
96 THAI=${srcdir}/quail/thai.elc
98 VIETNAMESE=${srcdir}/quail/viqr.elc ${srcdir}/quail/vntelex.elc
100 LAO=${srcdir}/quail/lao.elc ${srcdir}/quail/lrt.elc
102 INDIAN=${srcdir}/quail/indian.elc
104 TIBETAN=${srcdir}/quail/tibetan.elc
106 LATIN= ${srcdir}/quail/latin-pre.elc \
107 ${srcdir}/quail/latin-post.elc \
108 ${srcdir}/quail/latin-alt.elc \
109 ${srcdir}/quail/latin-ltx.elc \
110 ${srcdir}/quail/welsh.elc
112 UNICODE=${srcdir}/quail/sgml-input.elc ${srcdir}/quail/rfc1345.elc \
113 ${srcdir}/quail/uni-input.elc
115 SLAVIC= \
116 ${srcdir}/quail/czech.elc \
117 ${srcdir}/quail/croatian.elc \
118 ${srcdir}/quail/slovak.elc
120 GREEK=${srcdir}/quail/greek.elc
122 RUSSIAN=${srcdir}/quail/cyrillic.elc ${srcdir}/quail/cyril-jis.elc
124 OTHERS= \
125 ${srcdir}/quail/arabic.elc \
126 ${srcdir}/quail/ethiopic.elc \
127 ${srcdir}/quail/ipa.elc \
128 ${srcdir}/quail/hebrew.elc \
129 ${srcdir}/quail/georgian.elc \
130 ${srcdir}/quail/sisheng.elc
132 MISC= \
133 quail/tsang-b5.elc \
134 quail/quick-b5.elc \
135 quail/tsang-cns.elc \
136 quail/quick-cns.elc \
137 quail/PY.elc \
138 quail/ZIRANMA.elc \
139 quail/CTLau.elc \
140 quail/CTLau-b5.elc
142 CHINESE=${CHINESE-GB} ${CHINESE-BIG5}
143 EASTASIA=${CHINESE} ${JAPANESE} ${KOREAN}
144 ASIA=${EASTASIA} ${THAI} ${VIETNAMESE} ${LAO} ${INDIAN} ${TIBETAN}
145 EUROPEAN=${LATIN} ${SLAVIC} ${GREEK} ${RUSSIAN}
146 WORLD=${ASIA} ${EUROPEAN} ${OTHERS} ${MISC} ${UNICODE}
148 TIT-MISC=${CHINESE-TIT} ${MISC}
149 NON-TIT-MISC=${CHINESE-NON-TIT} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${OTHERS}
151 .SUFFIXES: .elc .el
153 .el.elc:
154 @echo Compiling $<
155 @${RUN-EMACS} -f batch-byte-compile $<
157 all: ${BUILT-EMACS} ${SUBDIRS} leim-list.el ${WORLD}
159 # To ensure that we can run Emacs. This target is ignored (never
160 # being hit) if a user changes default value of EMACS.
161 ../src/emacs:
162 cd ../src; ${MAKE} ${MFLAGS} emacs
164 ${SUBDIRS}:
165 mkdir $@
166 touch stamp-subdir
168 TIT-SOURCES= \
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
183 ${CHINESE-TIT:.elc=.el}: changed.tit
184 @true
186 changed.tit: ${TIT-SOURCES}
187 ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
188 -f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \
189 echo "changed" > $@
191 MISC-SOURCES= \
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
199 ${MISC:.elc=.el}: changed.misc
200 @true
202 changed.misc: ${MISC-SOURCES}
203 ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
204 -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \
205 echo "changed" > $@
207 leim-list.el: ${SUBDIRS} ${TIT-MISC} changed.tit changed.misc ${srcdir}/leim-ext.el
208 rm -f leim-list.el
209 ${RUN-EMACS} -l ${buildlisppath}/international/quail \
210 -f batch-byte-compile-if-not-done ${TIT-MISC:.elc=.el}
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}\")" ; \
218 sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
220 MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done
222 install: all
223 if [ ! -d ${INSTALLDIR} ] ; then \
224 umask 022; ${srcdir}/../mkinstalldirs ${INSTALLDIR}; \
225 else true; fi
226 if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
227 rm -f ${INSTALLDIR}/leim-list.el; \
228 rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \
229 echo "Copying leim files to ${INSTALLDIR} ..." ; \
230 if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
231 tar -chf - leim-list.el quail ja-dic \
232 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
233 else \
234 tar -chf - leim-list.el quail \
235 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
236 cd ${srcdir}; \
237 tar -chf - quail/* ja-dic \
238 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
239 fi; \
240 rm -f ${INSTALLDIR}/.gitignore ${INSTALLDIR}/*/.gitignore; \
241 rm -f ${INSTALLDIR}/.arch-inventory ${INSTALLDIR}/*/.arch-inventory; \
242 rm -f ${INSTALLDIR}/\#* ${INSTALLDIR}/*/\#* ; \
243 rm -f ${INSTALLDIR}/.\#* ${INSTALLDIR}/*/.\#* ; \
244 rm -f ${INSTALLDIR}/*~ ${INSTALLDIR}/*/*~ ; \
245 rm -f ${INSTALLDIR}/*.orig ${INSTALLDIR}/*/*.orig ; \
246 else true; fi
247 -unset CDPATH; \
248 if [ -n "${GZIP_PROG}" ]; \
249 then \
250 echo "Compressing *.el ..." ; \
251 (cd ${INSTALLDIR}; for f in `find . -name "*.elc" -print`; do \
252 ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
253 done) \
254 else true; fi
255 -chmod -R a+r ${INSTALLDIR}
256 for installuser in $${LOGNAME} $${USERNAME} $${USER} \
257 `id -un 2> /dev/null`; do \
258 [ -n "$${installuser}" ] && break ; \
259 done ; \
260 find ${INSTALLDIR} -exec chown $${installuser} '{}' ';'
261 if [ "${ns_appresdir}" != "" ]; then \
262 ( cd ${ns_appresdir} ; \
263 if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\
264 rm -fr share ) ; \
265 else true ; fi
267 clean mostlyclean:
268 rm -f ${TIT-MISC} ${TIT-MISC:.elc=.el} \
269 leim-list.el changed.tit changed.misc
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.
274 bootstrap-clean: clean
275 rm -f ${WORLD}
276 ## FIXME some compiled files go to srcdir, some don't?
277 # cd ${srcdir}; rm -f *.elc */*.elc
279 distclean: clean
280 if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi
281 rm -f Makefile
283 maintainer-clean: distclean bootstrap-clean
285 extraclean: maintainer-clean
286 -rm -f *~ \#* */*~ */\#*
288 .PHONY: check-declare
290 check-declare:
291 $(RUN-EMACS) -l $(buildlisppath)/emacs-lisp/check-declare \
292 --eval '(check-declare-directory "$(srcdir)")'