Spelling fixes.
[emacs.git] / leim / Makefile.in
blob5a6f2ff4795ce449a358a61f5bb0e1e0a21a7fa1
1 ### @configure_input@
3 # Copyright (C) 1997-2013 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/>.
24 SHELL = @SHELL@
26 # Here are the things that we expect ../configure to edit.
27 srcdir=@srcdir@
29 # Which Emacs to use to convert TIT files to Emacs Lisp files,
30 # byte-compile Emacs Lisp files, and generate the file leim-list.el.
31 EMACS = ../src/emacs
33 # How to run Emacs.
34 # Prevent any setting of EMACSLOADPATH in user environment causing problems.
35 RUN_EMACS = EMACSLOADPATH= "${EMACS}" -batch --no-site-file --no-site-lisp
37 MKDIR_P = @MKDIR_P@
39 # Files generated from TIT dictionaries for Chinese GB character set.
40 TIT_GB=\
41 quail/CCDOSPY.el \
42 quail/Punct.el \
43 quail/QJ.el \
44 quail/SW.el \
45 quail/TONEPY.el
47 # Files generated from TIT dictionaries for Chinese BIG5 character set.
48 TIT_BIG5=\
49 quail/4Corner.el \
50 quail/ARRAY30.el \
51 quail/ECDICT.el \
52 quail/ETZY.el \
53 quail/Punct-b5.el \
54 quail/PY-b5.el \
55 quail/QJ-b5.el \
56 quail/ZOZY.el
58 CHINESE_TIT=${TIT_GB} ${TIT_BIG5}
60 MISC= \
61 quail/tsang-b5.el \
62 quail/quick-b5.el \
63 quail/tsang-cns.el \
64 quail/quick-cns.el \
65 quail/PY.el \
66 quail/ZIRANMA.el \
67 quail/CTLau.el \
68 quail/CTLau-b5.el
70 ## The generated .el files.
71 TIT_MISC=${CHINESE_TIT} ${MISC}
73 .SUFFIXES: .elc .el
75 .el.elc:
76 @echo Compiling $<
77 @${RUN_EMACS} -l international/quail -f batch-byte-compile $<
79 all: leim-list.el compile-main
80 .PHONY: all
82 TIT_SOURCES= \
83 ${srcdir}/CXTERM-DIC/4Corner.tit \
84 ${srcdir}/CXTERM-DIC/ARRAY30.tit \
85 ${srcdir}/CXTERM-DIC/CCDOSPY.tit \
86 ${srcdir}/CXTERM-DIC/ECDICT.tit \
87 ${srcdir}/CXTERM-DIC/ETZY.tit \
88 ${srcdir}/CXTERM-DIC/PY-b5.tit \
89 ${srcdir}/CXTERM-DIC/Punct-b5.tit \
90 ${srcdir}/CXTERM-DIC/Punct.tit \
91 ${srcdir}/CXTERM-DIC/QJ-b5.tit \
92 ${srcdir}/CXTERM-DIC/QJ.tit \
93 ${srcdir}/CXTERM-DIC/SW.tit \
94 ${srcdir}/CXTERM-DIC/TONEPY.tit \
95 ${srcdir}/CXTERM-DIC/ZOZY.tit
97 ${CHINESE_TIT}: changed.tit
98 @true
100 ## The changed.* files act to serialize this part of the build.
101 ## A single Emacs invocation creates all the CHINESE_TIT files.
102 ## Otherwise in a parallel build multiple Emacs instances could
103 ## interfere with each other. If we used GNU make we could probably
104 ## parallelize this without the need for an explicit rule for each
105 ## file. Something like the pattern rule:
106 ## quail/%.el: CXTERM-DIC/%.tit
107 ## It doesn't seem possible to do this with VPATH and suffix rules.
108 changed.tit: ${TIT_SOURCES}
109 @${MKDIR_P} quail
110 ${RUN_EMACS} -l titdic-cnv \
111 -f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \
112 echo "changed" > $@
114 MISC_SOURCES= \
115 ${srcdir}/MISC-DIC/CTLau-b5.html \
116 ${srcdir}/MISC-DIC/CTLau.html \
117 ${srcdir}/MISC-DIC/cangjie-table.b5 \
118 ${srcdir}/MISC-DIC/cangjie-table.cns \
119 ${srcdir}/MISC-DIC/pinyin.map \
120 ${srcdir}/MISC-DIC/ziranma.cin
122 ${MISC}: changed.misc
123 @true
125 changed.misc: ${MISC_SOURCES}
126 @${MKDIR_P} quail
127 ${RUN_EMACS} -l titdic-cnv \
128 -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \
129 echo "changed" > $@
131 leim-list.el: ${TIT_MISC} ${srcdir}/leim-ext.el
132 rm -f leim-list.el
133 if [ "`cd ${srcdir} && /bin/pwd`" = "`/bin/pwd`" ] ; then \
134 ${RUN_EMACS} -l international/quail \
135 --eval "(update-leim-list-file \".\")" ; \
136 else \
137 ${RUN_EMACS} -l international/quail \
138 --eval "(update-leim-list-file \".\" (unmsys--file-name \"${srcdir}\"))" ; \
140 sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
142 $(srcdir)/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L
143 @$(MKDIR_P) $(srcdir)/ja-dic
144 $(RUN_EMACS) -batch -l ja-dic-cnv \
145 -f batch-skkdic-convert -dir "$(srcdir)/ja-dic" \
146 "$(srcdir)/SKK-DIC/SKK-JISYO.L"
148 ## Following adapted from lisp/Makefile.in.
149 setwins=wins="${srcdir}/ja-dic quail"; \
150 [ "`cd ${srcdir} && /bin/pwd`" != "`/bin/pwd`" ] && \
151 wins="$$wins ${srcdir}/quail"
153 .PHONY: compile-targets
154 # TARGETS is set dynamically in the recursive call from `compile-main'.
155 compile-targets: $(TARGETS)
157 # Compile all the Elisp files that need it. Beware: it approximates
158 # `no-byte-compile', so watch out for false-positives!
159 .PHONY: compile-main
160 compile-main: ${TIT_MISC} $(srcdir)/ja-dic/ja-dic.el
161 @($(setwins); \
162 els=`echo "$$wins " | sed -e 's| |/*.el |g'`; \
163 for el in $$els; do \
164 test -f $$el || continue; \
165 test ! -f $${el}c && GREP_OPTIONS= grep '^;.*no-byte-compile: t' $$el > /dev/null && continue; \
166 echo "$${el}c"; \
167 done | xargs echo) | \
168 while read chunk; do \
169 $(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \
170 done
172 .PHONY: clean mostlyclean bootstrap-clean distclean maintainer-clean extraclean
174 clean mostlyclean:
175 rm -f ${TIT_MISC} ${TIT_MISC:.el=.elc} \
176 leim-list.el changed.tit changed.misc
178 # The following target is needed because the `clean' target only removes
179 # TIT-generated files and doesn't touch compiled Quail packages. But
180 # bootstrapping should not leave non-fresh .elc files behind.
181 bootstrap-clean: clean
182 $(setwins); for w in $$wins; do rm -f $$w/*.elc; done
184 distclean: clean
185 -[ "`cd ${srcdir} && /bin/pwd`" != "`/bin/pwd`" ] && rm -rf quail
186 rm -f Makefile
188 maintainer-clean: distclean bootstrap-clean
190 extraclean: maintainer-clean
191 -rm -f *~ \#* */*~ */\#*
193 .PHONY: check-declare
195 check-declare:
196 $(RUN_EMACS) -l check-declare \
197 --eval '(check-declare-directory (unmsys--file-name "$(srcdir)"))'