Sync better from sources.
[bpt/emacs.git] / leim / Makefile.in
CommitLineData
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 24SHELL = @SHELL@
dadbf673
GM
25
26# Here are the things that we expect ../configure to edit.
dadbf673 27srcdir=@srcdir@
7a7f042f 28
cb6c95a3
GM
29# Where the generated files go.
30leimdir = ${srcdir}/../lisp/leim
31
dadbf673 32# Which Emacs to use to convert TIT files to Emacs Lisp files,
cb6c95a3 33# and generate the file leim-list.el.
935396c0 34EMACS = ../src/emacs
dadbf673 35
dadbf673 36# How to run Emacs.
8fb8c4f3
PE
37RUN_EMACS = EMACSLOADPATH='$(srcdir)/../lisp' '$(EMACS)' \
38 -batch --no-site-file --no-site-lisp
dadbf673 39
35c46c2f 40MKDIR_P = @MKDIR_P@
dadbf673
GM
41
42# Files generated from TIT dictionaries for Chinese GB character set.
68b5f855 43TIT_GB=\
cb6c95a3
GM
44 ${leimdir}/quail/CCDOSPY.el \
45 ${leimdir}/quail/Punct.el \
46 ${leimdir}/quail/QJ.el \
47 ${leimdir}/quail/SW.el \
48 ${leimdir}/quail/TONEPY.el
dadbf673
GM
49
50# Files generated from TIT dictionaries for Chinese BIG5 character set.
acb8e1dd 51TIT_BIG5=\
cb6c95a3
GM
52 ${leimdir}/quail/4Corner.el \
53 ${leimdir}/quail/ARRAY30.el \
54 ${leimdir}/quail/ECDICT.el \
55 ${leimdir}/quail/ETZY.el \
56 ${leimdir}/quail/Punct-b5.el \
57 ${leimdir}/quail/PY-b5.el \
58 ${leimdir}/quail/QJ-b5.el \
59 ${leimdir}/quail/ZOZY.el
dadbf673 60
68b5f855 61CHINESE_TIT=${TIT_GB} ${TIT_BIG5}
dadbf673 62
242a2def 63MISC= \
cb6c95a3
GM
64 ${leimdir}/quail/tsang-b5.el \
65 ${leimdir}/quail/quick-b5.el \
66 ${leimdir}/quail/tsang-cns.el \
67 ${leimdir}/quail/quick-cns.el \
68 ${leimdir}/quail/PY.el \
69 ${leimdir}/quail/ZIRANMA.el \
70 ${leimdir}/quail/CTLau.el \
71 ${leimdir}/quail/CTLau-b5.el
41455956
GM
72
73## The generated .el files.
68b5f855 74TIT_MISC=${CHINESE_TIT} ${MISC}
dadbf673 75
cb6c95a3 76all: ${leimdir}/leim-list.el ${leimdir}/ja-dic/ja-dic.el
0aee6912 77.PHONY: all
dadbf673 78
68b5f855 79TIT_SOURCES= \
2cd23d89
KH
80 ${srcdir}/CXTERM-DIC/4Corner.tit \
81 ${srcdir}/CXTERM-DIC/ARRAY30.tit \
82 ${srcdir}/CXTERM-DIC/CCDOSPY.tit \
83 ${srcdir}/CXTERM-DIC/ECDICT.tit \
84 ${srcdir}/CXTERM-DIC/ETZY.tit \
85 ${srcdir}/CXTERM-DIC/PY-b5.tit \
86 ${srcdir}/CXTERM-DIC/Punct-b5.tit \
87 ${srcdir}/CXTERM-DIC/Punct.tit \
88 ${srcdir}/CXTERM-DIC/QJ-b5.tit \
89 ${srcdir}/CXTERM-DIC/QJ.tit \
90 ${srcdir}/CXTERM-DIC/SW.tit \
91 ${srcdir}/CXTERM-DIC/TONEPY.tit \
92 ${srcdir}/CXTERM-DIC/ZOZY.tit
242a2def 93
41455956 94${CHINESE_TIT}: changed.tit
4c603b0c
AS
95 @true
96
e7333757
GM
97## The changed.* files act to serialize this part of the build.
98## A single Emacs invocation creates all the CHINESE_TIT files.
99## Otherwise in a parallel build multiple Emacs instances could
100## interfere with each other. If we used GNU make we could probably
101## parallelize this without the need for an explicit rule for each
41a2ce39
GM
102## file. Something like the pattern rule:
103## quail/%.el: CXTERM-DIC/%.tit
104## It doesn't seem possible to do this with VPATH and suffix rules.
35c46c2f 105changed.tit: ${TIT_SOURCES}
cb6c95a3 106 @${MKDIR_P} ${leimdir}/quail
bc00793e 107 ${RUN_EMACS} -l titdic-cnv \
cb6c95a3
GM
108 -f batch-titdic-convert -dir ${leimdir}/quail ${srcdir}/CXTERM-DIC
109 echo "changed" > $@
242a2def 110
68b5f855 111MISC_SOURCES= \
2cd23d89
KH
112 ${srcdir}/MISC-DIC/CTLau-b5.html \
113 ${srcdir}/MISC-DIC/CTLau.html \
114 ${srcdir}/MISC-DIC/cangjie-table.b5 \
115 ${srcdir}/MISC-DIC/cangjie-table.cns \
116 ${srcdir}/MISC-DIC/pinyin.map \
117 ${srcdir}/MISC-DIC/ziranma.cin
242a2def 118
41455956 119${MISC}: changed.misc
4c603b0c
AS
120 @true
121
35c46c2f 122changed.misc: ${MISC_SOURCES}
cb6c95a3 123 @${MKDIR_P} ${leimdir}/quail
bc00793e 124 ${RUN_EMACS} -l titdic-cnv \
cb6c95a3
GM
125 -f batch-miscdic-convert -dir ${leimdir}/quail ${srcdir}/MISC-DIC
126 echo "changed" > $@
127
128.PHONY: leim-list.el
129leim-list.el: ${leimdir}/leim-list.el
130
131${leimdir}/leim-list.el: ${TIT_MISC} ${srcdir}/leim-ext.el
132 rm -f $@
133 ${RUN_EMACS} -l international/quail \
134 --eval "(update-leim-list-file (unmsys--file-name \"${leimdir}\"))"
bb28366f 135 sed -n -e '/^[^;]/p' -e 's/^;\(;*\)inc /;\1 /p' < ${srcdir}/leim-ext.el >> $@
dadbf673 136
cb6c95a3
GM
137${leimdir}/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L
138 @$(MKDIR_P) $(leimdir)/ja-dic
bc00793e 139 $(RUN_EMACS) -batch -l ja-dic-cnv \
cb6c95a3 140 -f batch-skkdic-convert -dir "$(leimdir)/ja-dic" \
faaecb52 141 "$(srcdir)/SKK-DIC/SKK-JISYO.L"
982efbcd 142
ccd4fb3d 143.PHONY: bootstrap-clean distclean maintainer-clean extraclean
dadbf673 144
cb6c95a3 145bootstrap-clean:
2b58a9cc 146 rm -f ${TIT_MISC} ${leimdir}/leim-list.el changed.tit changed.misc
9200c926 147
cb6c95a3 148distclean:
dadbf673 149 rm -f Makefile
a070e0b7 150
cbeed5af 151maintainer-clean: distclean bootstrap-clean
e6f528ba 152
ccd4fb3d
GM
153## We do not delete ja-dic, even in a bootstrap, because it rarely
154## changes and is slow to regenerate.
2b58a9cc
GM
155## TODO? Could consider doing the same with TIT_MISC, though those
156## are much faster to generate.
ccd4fb3d
GM
157extraclean:
158 rm -rf ${leimdir}/ja-dic
159
cb6c95a3 160### Makefile.in ends here