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