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