diff options
| author | Glenn Morris | 2012-04-08 23:34:21 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-04-08 23:34:21 -0700 |
| commit | 414559565dd2f9eb568ac7b64e1d298df3b73076 (patch) | |
| tree | 1e2de5bd782fe98e14e6744d1389dbc3a8974f06 | |
| parent | f8f2e1d87365930455325c46f3f786caf7b5ef8c (diff) | |
| download | emacs-414559565dd2f9eb568ac7b64e1d298df3b73076.tar.gz emacs-414559565dd2f9eb568ac7b64e1d298df3b73076.zip | |
Make leim/Makefile compute the list of .el files like lisp/Makefile
* leim/Makefile.in: (TIT_GB, TIT_BIG5, CHINESE_TIT, MISC, TIT_MISC):
Make them store the .el files rather than the .elc files.
(NON_TIT_GB, NON_TIT_BIG5, CHINESE_NON_TIT, CHINESE_GB)
(CHINESE_GB, CHINESE_BIG5, JAPANESE, KOREAN, THAI, VIETNAMESE)
(LAO, INDIAN, TIBETAN, LATIN, UNICODE, SLAVIC, GREEK, RUSSIAN)
(OTHERS, CHINESE, EASTASIA, ASIA, EUROPEAN, WORLD, NON_TIT_MISC):
Remove variables listing the non-generated .el files.
(.el.elc): Add explicit load-path for quail.
(all): Depend on compile-main rule rather than $WORLD.
(changed.tit, changed.misc): Also depend on $SUBDIRS.
(leim-list.el): Don't depend on changed.tit or changed.misc.
Remove unnecessary compilation check.
(setwins, compile-targets, compile-main): New.
(clean, mostlyclean): Update for change in TIT_MISC contents.
(bootstrap-clean): Use a glob match to delete .elc, not a fixed list.
| -rw-r--r-- | leim/ChangeLog | 20 | ||||
| -rw-r--r-- | leim/Makefile.in | 159 |
2 files changed, 79 insertions, 100 deletions
diff --git a/leim/ChangeLog b/leim/ChangeLog index 51eb5a8a6cf..be65c6088cb 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2012-04-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in: Compute the list of .el files to be compiled dynamically, | ||
| 4 | as the lisp/ directory does, rather than hard-coding it. | ||
| 5 | (TIT_GB, TIT_BIG5, CHINESE_TIT, MISC, TIT_MISC): | ||
| 6 | Make them store the .el files rather than the .elc files. | ||
| 7 | (NON_TIT_GB, NON_TIT_BIG5, CHINESE_NON_TIT, CHINESE_GB) | ||
| 8 | (CHINESE_GB, CHINESE_BIG5, JAPANESE, KOREAN, THAI, VIETNAMESE) | ||
| 9 | (LAO, INDIAN, TIBETAN, LATIN, UNICODE, SLAVIC, GREEK, RUSSIAN) | ||
| 10 | (OTHERS, CHINESE, EASTASIA, ASIA, EUROPEAN, WORLD, NON_TIT_MISC): | ||
| 11 | Remove variables listing the non-generated .el files. | ||
| 12 | (.el.elc): Add explicit load-path for quail. | ||
| 13 | (all): Depend on compile-main rule rather than $WORLD. | ||
| 14 | (changed.tit, changed.misc): Also depend on $SUBDIRS. | ||
| 15 | (leim-list.el): Don't depend on changed.tit or changed.misc. | ||
| 16 | Remove unnecessary compilation check. | ||
| 17 | (setwins, compile-targets, compile-main): New. | ||
| 18 | (clean, mostlyclean): Update for change in TIT_MISC contents. | ||
| 19 | (bootstrap-clean): Use a glob match to delete .elc, not a fixed list. | ||
| 20 | |||
| 1 | 2012-04-09 Stefan Monnier <monnier@iro.umontreal.ca> | 21 | 2012-04-09 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 22 | ||
| 3 | * quail/latin-ltx.el: Auto-generate some of the entries. | 23 | * quail/latin-ltx.el: Auto-generate some of the entries. |
diff --git a/leim/Makefile.in b/leim/Makefile.in index 9556ecb3bb7..2f707f0f46d 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # Makefile for leim subdirectory in GNU Emacs. | 1 | # Makefile for leim subdirectory in GNU Emacs. |
| 2 | 2 | ||
| 3 | # Copyright (C) 1997-2012 Free Software Foundation, Inc. | 3 | # Copyright (C) 1997-2012 Free Software Foundation, Inc. |
| 4 | # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, | 4 | # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, |
| 5 | # 2006, 2007, 2008, 2009, 2010, 2011 | 5 | # 2006, 2007, 2008, 2009, 2010, 2011 |
| 6 | # National Institute of Advanced Industrial Science and Technology (AIST) | 6 | # National Institute of Advanced Industrial Science and Technology (AIST) |
| @@ -55,110 +55,48 @@ SUBDIRS=quail | |||
| 55 | 55 | ||
| 56 | # Files generated from TIT dictionaries for Chinese GB character set. | 56 | # Files generated from TIT dictionaries for Chinese GB character set. |
| 57 | TIT_GB=\ | 57 | TIT_GB=\ |
| 58 | quail/CCDOSPY.elc \ | 58 | quail/CCDOSPY.el \ |
| 59 | quail/Punct.elc \ | 59 | quail/Punct.el \ |
| 60 | quail/QJ.elc \ | 60 | quail/QJ.el \ |
| 61 | quail/SW.elc \ | 61 | quail/SW.el \ |
| 62 | quail/TONEPY.elc | 62 | quail/TONEPY.el |
| 63 | 63 | ||
| 64 | # Files generated from TIT dictionaries for Chinese BIG5 character set. | 64 | # Files generated from TIT dictionaries for Chinese BIG5 character set. |
| 65 | TIT_BIG5=\ | 65 | TIT_BIG5=\ |
| 66 | quail/4Corner.elc \ | 66 | quail/4Corner.el \ |
| 67 | quail/ARRAY30.elc \ | 67 | quail/ARRAY30.el \ |
| 68 | quail/ECDICT.elc \ | 68 | quail/ECDICT.el \ |
| 69 | quail/ETZY.elc \ | 69 | quail/ETZY.el \ |
| 70 | quail/Punct-b5.elc \ | 70 | quail/Punct-b5.el \ |
| 71 | quail/PY-b5.elc \ | 71 | quail/PY-b5.el \ |
| 72 | quail/QJ-b5.elc \ | 72 | quail/QJ-b5.el \ |
| 73 | quail/ZOZY.elc | 73 | quail/ZOZY.el |
| 74 | 74 | ||
| 75 | CHINESE_TIT=${TIT_GB} ${TIT_BIG5} | 75 | CHINESE_TIT=${TIT_GB} ${TIT_BIG5} |
| 76 | 76 | ||
| 77 | NON_TIT_GB=${srcdir}/quail/py-punct.elc | ||
| 78 | |||
| 79 | NON_TIT_BIG5=${srcdir}/quail/pypunct-b5.elc | ||
| 80 | |||
| 81 | CHINESE_NON_TIT=${NON_TIT_GB} ${NON_TIT_BIG5} | ||
| 82 | |||
| 83 | CHINESE_GB=${TIT_GB} ${NON_TIT_GB} | ||
| 84 | |||
| 85 | CHINESE_BIG5=${TIT_BIG5} ${NON_TIT_BIG5} | ||
| 86 | |||
| 87 | JAPANESE=${srcdir}/quail/japanese.elc ${srcdir}/ja-dic/ja-dic.elc | ||
| 88 | |||
| 89 | KOREAN= ${srcdir}/quail/hangul.elc \ | ||
| 90 | ${srcdir}/quail/hanja.elc \ | ||
| 91 | ${srcdir}/quail/hanja3.elc \ | ||
| 92 | ${srcdir}/quail/hanja-jis.elc \ | ||
| 93 | ${srcdir}/quail/symbol-ksc.elc | ||
| 94 | |||
| 95 | THAI=${srcdir}/quail/thai.elc | ||
| 96 | |||
| 97 | VIETNAMESE=${srcdir}/quail/viqr.elc ${srcdir}/quail/vntelex.elc | ||
| 98 | |||
| 99 | LAO=${srcdir}/quail/lao.elc ${srcdir}/quail/lrt.elc | ||
| 100 | |||
| 101 | INDIAN=${srcdir}/quail/indian.elc | ||
| 102 | |||
| 103 | TIBETAN=${srcdir}/quail/tibetan.elc | ||
| 104 | |||
| 105 | LATIN= ${srcdir}/quail/latin-pre.elc \ | ||
| 106 | ${srcdir}/quail/latin-post.elc \ | ||
| 107 | ${srcdir}/quail/latin-alt.elc \ | ||
| 108 | ${srcdir}/quail/latin-ltx.elc \ | ||
| 109 | ${srcdir}/quail/welsh.elc | ||
| 110 | |||
| 111 | UNICODE=${srcdir}/quail/sgml-input.elc ${srcdir}/quail/rfc1345.elc \ | ||
| 112 | ${srcdir}/quail/uni-input.elc | ||
| 113 | |||
| 114 | SLAVIC= \ | ||
| 115 | ${srcdir}/quail/czech.elc \ | ||
| 116 | ${srcdir}/quail/croatian.elc \ | ||
| 117 | ${srcdir}/quail/slovak.elc | ||
| 118 | |||
| 119 | GREEK=${srcdir}/quail/greek.elc | ||
| 120 | |||
| 121 | RUSSIAN=${srcdir}/quail/cyrillic.elc ${srcdir}/quail/cyril-jis.elc | ||
| 122 | |||
| 123 | OTHERS= \ | ||
| 124 | ${srcdir}/quail/arabic.elc \ | ||
| 125 | ${srcdir}/quail/ethiopic.elc \ | ||
| 126 | ${srcdir}/quail/ipa.elc \ | ||
| 127 | ${srcdir}/quail/ipa-praat.elc \ | ||
| 128 | ${srcdir}/quail/hebrew.elc \ | ||
| 129 | ${srcdir}/quail/georgian.elc \ | ||
| 130 | $(srcdir)/quail/persian.elc \ | ||
| 131 | ${srcdir}/quail/sisheng.elc | ||
| 132 | |||
| 133 | MISC= \ | 77 | MISC= \ |
| 134 | quail/tsang-b5.elc \ | 78 | quail/tsang-b5.el \ |
| 135 | quail/quick-b5.elc \ | 79 | quail/quick-b5.el \ |
| 136 | quail/tsang-cns.elc \ | 80 | quail/tsang-cns.el \ |
| 137 | quail/quick-cns.elc \ | 81 | quail/quick-cns.el \ |
| 138 | quail/PY.elc \ | 82 | quail/PY.el \ |
| 139 | quail/ZIRANMA.elc \ | 83 | quail/ZIRANMA.el \ |
| 140 | quail/CTLau.elc \ | 84 | quail/CTLau.el \ |
| 141 | quail/CTLau-b5.elc | 85 | quail/CTLau-b5.el |
| 142 | 86 | ||
| 143 | CHINESE=${CHINESE_GB} ${CHINESE_BIG5} | 87 | ## The generated .el files. |
| 144 | EASTASIA=${CHINESE} ${JAPANESE} ${KOREAN} | ||
| 145 | ASIA=${EASTASIA} ${THAI} ${VIETNAMESE} ${LAO} ${INDIAN} ${TIBETAN} | ||
| 146 | EUROPEAN=${LATIN} ${SLAVIC} ${GREEK} ${RUSSIAN} | ||
| 147 | WORLD=${ASIA} ${EUROPEAN} ${OTHERS} ${MISC} ${UNICODE} | ||
| 148 | |||
| 149 | TIT_MISC=${CHINESE_TIT} ${MISC} | 88 | TIT_MISC=${CHINESE_TIT} ${MISC} |
| 150 | NON_TIT_MISC=${CHINESE_NON_TIT} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${OTHERS} | ||
| 151 | 89 | ||
| 152 | .SUFFIXES: .elc .el | 90 | .SUFFIXES: .elc .el |
| 153 | 91 | ||
| 154 | .el.elc: | 92 | .el.elc: |
| 155 | @echo Compiling $< | 93 | @echo Compiling $< |
| 156 | @${RUN_EMACS} -f batch-byte-compile $< | 94 | @${RUN_EMACS} -l ${buildlisppath}/international/quail -f batch-byte-compile $< |
| 157 | 95 | ||
| 158 | all: ${BUILT_EMACS} ${SUBDIRS} leim-list.el ${WORLD} | 96 | all: ${BUILT_EMACS} ${SUBDIRS} leim-list.el compile-main |
| 159 | 97 | ||
| 160 | # To ensure that we can run Emacs. This target is ignored (never | 98 | # To ensure that we can run Emacs. This target is ignored (never |
| 161 | # being hit) if a user changes default value of EMACS. | 99 | # being hit) if a user changes default value of BUILT_EMACS. |
| 162 | ../src/emacs: | 100 | ../src/emacs: |
| 163 | cd ../src; ${MAKE} ${MFLAGS} emacs | 101 | cd ../src; ${MAKE} ${MFLAGS} emacs |
| 164 | 102 | ||
| @@ -181,10 +119,12 @@ TIT_SOURCES= \ | |||
| 181 | ${srcdir}/CXTERM-DIC/TONEPY.tit \ | 119 | ${srcdir}/CXTERM-DIC/TONEPY.tit \ |
| 182 | ${srcdir}/CXTERM-DIC/ZOZY.tit | 120 | ${srcdir}/CXTERM-DIC/ZOZY.tit |
| 183 | 121 | ||
| 184 | ${CHINESE_TIT:.elc=.el}: changed.tit | 122 | ${CHINESE_TIT}: changed.tit |
| 185 | @true | 123 | @true |
| 186 | 124 | ||
| 187 | changed.tit: ${TIT_SOURCES} | 125 | ## FIXME remove subdirs if poss - time-stamping. |
| 126 | ## Emacs should make the directory if it does not exist. | ||
| 127 | changed.tit: ${SUBDIRS} ${TIT_SOURCES} | ||
| 188 | ${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \ | 128 | ${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \ |
| 189 | -f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \ | 129 | -f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \ |
| 190 | echo "changed" > $@ | 130 | echo "changed" > $@ |
| @@ -197,18 +137,16 @@ MISC_SOURCES= \ | |||
| 197 | ${srcdir}/MISC-DIC/pinyin.map \ | 137 | ${srcdir}/MISC-DIC/pinyin.map \ |
| 198 | ${srcdir}/MISC-DIC/ziranma.cin | 138 | ${srcdir}/MISC-DIC/ziranma.cin |
| 199 | 139 | ||
| 200 | ${MISC:.elc=.el}: changed.misc | 140 | ${MISC}: changed.misc |
| 201 | @true | 141 | @true |
| 202 | 142 | ||
| 203 | changed.misc: ${MISC_SOURCES} | 143 | changed.misc: ${SUBDIRS} ${MISC_SOURCES} |
| 204 | ${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \ | 144 | ${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \ |
| 205 | -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \ | 145 | -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \ |
| 206 | echo "changed" > $@ | 146 | echo "changed" > $@ |
| 207 | 147 | ||
| 208 | leim-list.el: ${SUBDIRS} ${TIT_MISC} changed.tit changed.misc ${srcdir}/leim-ext.el | 148 | leim-list.el: ${SUBDIRS} ${TIT_MISC} ${srcdir}/leim-ext.el |
| 209 | rm -f leim-list.el | 149 | rm -f leim-list.el |
| 210 | ${RUN_EMACS} -l ${buildlisppath}/international/quail \ | ||
| 211 | -f batch-byte-compile-if-not-done ${TIT_MISC:.elc=.el} | ||
| 212 | if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \ | 150 | if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \ |
| 213 | ${RUN_EMACS} -l ${buildlisppath}/international/quail \ | 151 | ${RUN_EMACS} -l ${buildlisppath}/international/quail \ |
| 214 | --eval "(update-leim-list-file \".\")" ; \ | 152 | --eval "(update-leim-list-file \".\")" ; \ |
| @@ -218,6 +156,29 @@ leim-list.el: ${SUBDIRS} ${TIT_MISC} changed.tit changed.misc ${srcdir}/leim-ext | |||
| 218 | fi | 156 | fi |
| 219 | sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@ | 157 | sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@ |
| 220 | 158 | ||
| 159 | ## Following adapted from lisp/Makefile.in. | ||
| 160 | setwins=wins="${srcdir}/ja-dic quail"; \ | ||
| 161 | [ `cd ${srcdir} && /bin/pwd` != `/bin/pwd` ] && \ | ||
| 162 | wins="$$wins ${srcdir}/quail" | ||
| 163 | |||
| 164 | .PHONY: compile-targets | ||
| 165 | # TARGETS is set dynamically in the recursive call from `compile-main'. | ||
| 166 | compile-targets: $(TARGETS) | ||
| 167 | |||
| 168 | # Compile all the Elisp files that need it. Beware: it approximates | ||
| 169 | # `no-byte-compile', so watch out for false-positives! | ||
| 170 | compile-main: ${TIT_MISC} | ||
| 171 | @($(setwins); \ | ||
| 172 | els=`echo "$$wins " | sed -e 's| |/*.el |g'`; \ | ||
| 173 | for el in $$els; do \ | ||
| 174 | test -f $$el || continue; \ | ||
| 175 | test ! -f $${el}c && GREP_OPTIONS= grep '^;.*no-byte-compile: t' $$el > /dev/null && continue; \ | ||
| 176 | echo "$${el}c"; \ | ||
| 177 | done | xargs echo) | \ | ||
| 178 | while read chunk; do \ | ||
| 179 | $(MAKE) $(MFLAGS) compile-targets BUILT_EMACS="$(BUILT_EMACS)" TARGETS="$$chunk"; \ | ||
| 180 | done | ||
| 181 | |||
| 221 | MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done | 182 | MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done |
| 222 | 183 | ||
| 223 | install: all | 184 | install: all |
| @@ -266,16 +227,14 @@ install: all | |||
| 266 | else true ; fi | 227 | else true ; fi |
| 267 | 228 | ||
| 268 | clean mostlyclean: | 229 | clean mostlyclean: |
| 269 | rm -f ${TIT_MISC} ${TIT_MISC:.elc=.el} \ | 230 | rm -f ${TIT_MISC} ${TIT_MISC:.el=.elc} \ |
| 270 | leim-list.el changed.tit changed.misc | 231 | leim-list.el changed.tit changed.misc |
| 271 | 232 | ||
| 272 | # The following target is needed because the `clean' target only removes | 233 | # The following target is needed because the `clean' target only removes |
| 273 | # TIT-generated files and doesn't touch compiled Quail packages. But | 234 | # TIT-generated files and doesn't touch compiled Quail packages. But |
| 274 | # bootstrapping should not leave non-fresh .elc files behind. | 235 | # bootstrapping should not leave non-fresh .elc files behind. |
| 275 | bootstrap-clean: clean | 236 | bootstrap-clean: clean |
| 276 | rm -f ${WORLD} | 237 | $(setwins); for w in $$wins; do rm -f $$w/*.elc; done |
| 277 | ## FIXME some compiled files go to srcdir, some don't? | ||
| 278 | # cd ${srcdir}; rm -f *.elc */*.elc | ||
| 279 | 238 | ||
| 280 | distclean: clean | 239 | distclean: clean |
| 281 | if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi | 240 | if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi |