Suppress unnecessary non-ASCII chatter during build process.
[bpt/emacs.git] / leim / Makefile.in
CommitLineData
dadbf673 1# Makefile for leim subdirectory in GNU Emacs.
95df8112 2
ab422c4d 3# Copyright (C) 1997-2013 Free Software Foundation, Inc.
6d344054 4# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
d0981f82 5# 2006, 2007, 2008, 2009, 2010, 2011
eda20bd8
KH
6# National Institute of Advanced Industrial Science and Technology (AIST)
7# Registration Number H14PRO021
24b31c88 8
dadbf673
GM
9# This file is part of GNU Emacs.
10
d3fb0974 11# GNU Emacs is free software: you can redistribute it and/or modify
dadbf673 12# it under the terms of the GNU General Public License as published by
d3fb0974
GM
13# the Free Software Foundation, either version 3 of the License, or
14# (at your option) any later version.
15
dadbf673
GM
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.
d3fb0974 20
dadbf673 21# You should have received a copy of the GNU General Public License
d3fb0974
GM
22# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
23
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.
dadbf673 30srcdir=@srcdir@
7a7f042f 31
dadbf673
GM
32# Which Emacs to use to convert TIT files to Emacs Lisp files,
33# byte-compile Emacs Lisp files, and generate the file leim-list.el.
935396c0 34EMACS = ../src/emacs
dadbf673 35
c1d05286 36buildlisppath=${srcdir}/../lisp
dadbf673
GM
37
38# How to run Emacs.
68b5f855 39RUN_EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C \
935396c0 40 ${EMACS} -batch --no-site-file --no-site-lisp
dadbf673 41
35c46c2f 42MKDIR_P = @MKDIR_P@
dadbf673
GM
43
44# Files generated from TIT dictionaries for Chinese GB character set.
68b5f855 45TIT_GB=\
41455956
GM
46 quail/CCDOSPY.el \
47 quail/Punct.el \
48 quail/QJ.el \
49 quail/SW.el \
50 quail/TONEPY.el
dadbf673
GM
51
52# Files generated from TIT dictionaries for Chinese BIG5 character set.
acb8e1dd 53TIT_BIG5=\
41455956
GM
54 quail/4Corner.el \
55 quail/ARRAY30.el \
56 quail/ECDICT.el \
57 quail/ETZY.el \
58 quail/Punct-b5.el \
59 quail/PY-b5.el \
60 quail/QJ-b5.el \
61 quail/ZOZY.el
dadbf673 62
68b5f855 63CHINESE_TIT=${TIT_GB} ${TIT_BIG5}
dadbf673 64
242a2def 65MISC= \
41455956
GM
66 quail/tsang-b5.el \
67 quail/quick-b5.el \
68 quail/tsang-cns.el \
69 quail/quick-cns.el \
70 quail/PY.el \
71 quail/ZIRANMA.el \
72 quail/CTLau.el \
73 quail/CTLau-b5.el
74
75## The generated .el files.
68b5f855 76TIT_MISC=${CHINESE_TIT} ${MISC}
dadbf673 77
e1e539ed
KH
78.SUFFIXES: .elc .el
79
dadbf673 80.el.elc:
8e0214ec 81 @echo Compiling $<
41455956 82 @${RUN_EMACS} -l ${buildlisppath}/international/quail -f batch-byte-compile $<
dadbf673 83
35c46c2f 84all: leim-list.el compile-main
0aee6912 85.PHONY: all
dadbf673 86
68b5f855 87TIT_SOURCES= \
2cd23d89
KH
88 ${srcdir}/CXTERM-DIC/4Corner.tit \
89 ${srcdir}/CXTERM-DIC/ARRAY30.tit \
90 ${srcdir}/CXTERM-DIC/CCDOSPY.tit \
91 ${srcdir}/CXTERM-DIC/ECDICT.tit \
92 ${srcdir}/CXTERM-DIC/ETZY.tit \
93 ${srcdir}/CXTERM-DIC/PY-b5.tit \
94 ${srcdir}/CXTERM-DIC/Punct-b5.tit \
95 ${srcdir}/CXTERM-DIC/Punct.tit \
96 ${srcdir}/CXTERM-DIC/QJ-b5.tit \
97 ${srcdir}/CXTERM-DIC/QJ.tit \
98 ${srcdir}/CXTERM-DIC/SW.tit \
99 ${srcdir}/CXTERM-DIC/TONEPY.tit \
100 ${srcdir}/CXTERM-DIC/ZOZY.tit
242a2def 101
41455956 102${CHINESE_TIT}: changed.tit
4c603b0c
AS
103 @true
104
e7333757
GM
105## The changed.* files act to serialize this part of the build.
106## A single Emacs invocation creates all the CHINESE_TIT files.
107## Otherwise in a parallel build multiple Emacs instances could
108## interfere with each other. If we used GNU make we could probably
109## parallelize this without the need for an explicit rule for each
41a2ce39
GM
110## file. Something like the pattern rule:
111## quail/%.el: CXTERM-DIC/%.tit
112## It doesn't seem possible to do this with VPATH and suffix rules.
35c46c2f
GM
113changed.tit: ${TIT_SOURCES}
114 @${MKDIR_P} quail
68b5f855 115 ${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \
026e4e51
EZ
116 -f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \
117 echo "changed" > $@
242a2def 118
68b5f855 119MISC_SOURCES= \
2cd23d89
KH
120 ${srcdir}/MISC-DIC/CTLau-b5.html \
121 ${srcdir}/MISC-DIC/CTLau.html \
122 ${srcdir}/MISC-DIC/cangjie-table.b5 \
123 ${srcdir}/MISC-DIC/cangjie-table.cns \
124 ${srcdir}/MISC-DIC/pinyin.map \
125 ${srcdir}/MISC-DIC/ziranma.cin
242a2def 126
41455956 127${MISC}: changed.misc
4c603b0c
AS
128 @true
129
35c46c2f
GM
130changed.misc: ${MISC_SOURCES}
131 @${MKDIR_P} quail
68b5f855 132 ${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \
026e4e51
EZ
133 -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \
134 echo "changed" > $@
242a2def 135
35c46c2f 136leim-list.el: ${TIT_MISC} ${srcdir}/leim-ext.el
7069bd16 137 rm -f leim-list.el
b847032c 138 if [ x`cd ${srcdir} && /bin/pwd` = x`/bin/pwd` ] ; then \
68b5f855 139 ${RUN_EMACS} -l ${buildlisppath}/international/quail \
dadbf673
GM
140 --eval "(update-leim-list-file \".\")" ; \
141 else \
68b5f855 142 ${RUN_EMACS} -l ${buildlisppath}/international/quail \
dadbf673
GM
143 --eval "(update-leim-list-file \".\" \"${srcdir}\")" ; \
144 fi
8f34b40c 145 sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
dadbf673 146
982efbcd
PE
147$(srcdir)/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L
148 @$(MKDIR_P) $(srcdir)/ja-dic
149 $(RUN_EMACS) -l $(buildlisppath)/international/ja-dic-cnv \
150 --eval '(skkdic-convert "$(srcdir)/SKK-DIC/SKK-JISYO.L" "$(srcdir)/ja-dic")'
151
41455956
GM
152## Following adapted from lisp/Makefile.in.
153setwins=wins="${srcdir}/ja-dic quail"; \
154 [ `cd ${srcdir} && /bin/pwd` != `/bin/pwd` ] && \
155 wins="$$wins ${srcdir}/quail"
156
157.PHONY: compile-targets
158# TARGETS is set dynamically in the recursive call from `compile-main'.
159compile-targets: $(TARGETS)
160
161# Compile all the Elisp files that need it. Beware: it approximates
162# `no-byte-compile', so watch out for false-positives!
0aee6912 163.PHONY: compile-main
982efbcd 164compile-main: ${TIT_MISC} $(srcdir)/ja-dic/ja-dic.el
41455956
GM
165 @($(setwins); \
166 els=`echo "$$wins " | sed -e 's| |/*.el |g'`; \
167 for el in $$els; do \
168 test -f $$el || continue; \
169 test ! -f $${el}c && GREP_OPTIONS= grep '^;.*no-byte-compile: t' $$el > /dev/null && continue; \
170 echo "$${el}c"; \
171 done | xargs echo) | \
172 while read chunk; do \
935396c0 173 $(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \
41455956
GM
174 done
175
0aee6912
PE
176.PHONY: clean mostlyclean bootstrap-clean distclean maintainer-clean extraclean
177
dadbf673 178clean mostlyclean:
41455956 179 rm -f ${TIT_MISC} ${TIT_MISC:.el=.elc} \
242a2def 180 leim-list.el changed.tit changed.misc
dadbf673 181
9200c926
RF
182# The following target is needed because the `clean' target only removes
183# TIT-generated files and doesn't touch compiled Quail packages. But
184# bootstrapping should not leave non-fresh .elc files behind.
185bootstrap-clean: clean
41455956 186 $(setwins); for w in $$wins; do rm -f $$w/*.elc; done
9200c926 187
e6f528ba 188distclean: clean
35c46c2f 189 -[ `cd ${srcdir} && /bin/pwd` != `/bin/pwd` ] && rm -rf quail
dadbf673 190 rm -f Makefile
a070e0b7 191
cbeed5af 192maintainer-clean: distclean bootstrap-clean
e6f528ba
KH
193
194extraclean: maintainer-clean
cbeed5af 195 -rm -f *~ \#* */*~ */\#*
63150f3c
GM
196
197.PHONY: check-declare
198
199check-declare:
68b5f855 200 $(RUN_EMACS) -l $(buildlisppath)/emacs-lisp/check-declare \
63150f3c 201 --eval '(check-declare-directory "$(srcdir)")'