(KOREAN): Add ${srcdir}/quail/hanja3.elc. From
[bpt/emacs.git] / leim / Makefile.in
1 # Makefile for leim subdirectory in GNU Emacs.
2 # Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
3 # Licensed to the Free Software Foundation.
4
5 # This file is part of GNU Emacs.
6
7 # GNU Emacs is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11 #
12 # GNU Emacs is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Emacs; see the file COPYING. If not, write to the
19 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 # Boston, MA 02111-1307, USA.
21
22 # Avoid trouble on systems where the `SHELL' variable might be
23 # inherited from the environment.
24 SHELL = /bin/sh
25
26 # Here are the things that we expect ../configure to edit.
27 version=@version@
28 prefix=@prefix@
29 datadir=@datadir@
30 srcdir=@srcdir@
31
32 # Where to install LEIM files.
33 INSTALLDIR=${datadir}/emacs/${version}/leim
34
35 # On Xenix and the IBM RS6000, double-dot gets screwed up.
36 dot = .
37
38 # Which Emacs to use to convert TIT files to Emacs Lisp files,
39 # byte-compile Emacs Lisp files, and generate the file leim-list.el.
40 BUILT-EMACS = ${dot}${dot}/src/emacs
41
42 buildlisppath=${srcdir}/${dot}${dot}/lisp
43
44 # How to run Emacs.
45 RUN-EMACS = EMACSLOADPATH=$(buildlisppath) \
46 ${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte
47
48 # Subdirectories to be made if ${srcdir} is different from the current
49 # directory.
50 SUBDIRS=quail
51
52 # Files generated from TIT dictionaries for Chinese GB character set.
53 TIT-GB=\
54 quail/CTLau.elc \
55 quail/CCDOSPY.elc \
56 quail/Punct.elc \
57 quail/QJ.elc \
58 quail/SW.elc \
59 quail/TONEPY.elc
60
61 # Files generated from TIT dictionaries for Chinese BIG5 character set.
62 TIT-BIG5=\
63 quail/4Corner.elc \
64 quail/ARRAY30.elc \
65 quail/CTLauB.elc \
66 quail/ECDICT.elc \
67 quail/ETZY.elc \
68 quail/Punct-b5.elc \
69 quail/PY-b5.elc \
70 quail/QJ-b5.elc \
71 quail/ZOZY.elc
72
73 CHINESE-TIT=${TIT-GB} ${TIT-BIG5}
74
75 NON-TIT-GB=${srcdir}/quail/py-punct.elc
76
77 NON-TIT-BIG5=${srcdir}/quail/pypunct-b5.elc
78
79 CHINESE-NON-TIT=${NON-TIT-GB} ${NON-TIT-BIG5}
80
81 CHINESE-GB=${TIT-GB} ${NON-TIT-GB}
82
83 CHINESE-BIG5=${TIT-BIG5} ${NON-TIT-BIG5}
84
85 JAPANESE=${srcdir}/quail/japanese.elc ${srcdir}/ja-dic/ja-dic.elc
86
87 KOREAN= ${srcdir}/quail/hangul.elc \
88 ${srcdir}/quail/hangul3.elc \
89 ${srcdir}/quail/hanja.elc \
90 ${srcdir}/quail/hanja3.elc \
91 ${srcdir}/quail/hanja-jis.elc \
92 ${srcdir}/quail/symbol-ksc.elc
93
94 THAI=${srcdir}/quail/thai.elc
95
96 VIETNAMESE=${srcdir}/quail/viqr.elc
97
98 LAO=${srcdir}/quail/lao.elc ${srcdir}/quail/lrt.elc
99
100 INDIAN=${srcdir}/quail/devanagari.elc
101
102 TIBETAN=${srcdir}/quail/tibetan.elc
103
104 LATIN= ${srcdir}/quail/latin-pre.elc \
105 ${srcdir}/quail/latin-post.elc \
106 ${srcdir}/quail/latin-alt.elc \
107 ${srcdir}/quail/latin-ltx.elc
108
109 SLAVIC= \
110 ${srcdir}/quail/czech.elc \
111 ${srcdir}/quail/slovak.elc
112
113 GREEK=${srcdir}/quail/greek.elc
114
115 RUSSIAN=${srcdir}/quail/cyrillic.elc ${srcdir}/quail/cyril-jis.elc
116
117 MISC= \
118 ${srcdir}/quail/ethiopic.elc \
119 ${srcdir}/quail/ipa.elc \
120 ${srcdir}/quail/hebrew.elc
121
122 MISC-DIC=\
123 quail/tsang-b5.elc \
124 quail/quick-b5.elc \
125 quail/tsang-cns.elc \
126 quail/quick-cns.elc \
127 quail/PY.elc \
128 quail/ZIRANMA.elc
129
130 CHINESE=${CHINESE-GB} ${CHINESE-BIG5}
131 EASTASIA=${CHINESE} ${JAPANESE} ${KOREAN}
132 ASIA=${EASTASIA} ${THAI} ${VIETNAMESE} ${LAO} ${INDIAN} ${TIBETAN}
133 EUROPEAN=${LATIN} ${SLAVIC} ${GREEK} ${RUSSIAN}
134 WORLD=${ASIA} ${EUROPEAN} ${MISC} ${MISC-DIC}
135
136 TIT=${CHINESE-TIT}
137 NON-TIT=${CHINESE-NON-TIT} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${MISC}
138
139 .SUFFIXES: .elc .el
140
141 .el.elc:
142 ${RUN-EMACS} -f batch-byte-compile $<
143
144 all: ${BUILT-EMACS} ${SUBDIRS} ${TIT} ${MISC-DIC} leim-list.el
145
146 # To ensure that we can run Emacs. This target is ignored (never
147 # being hit) if a user changes default value of EMACS.
148 ${dot}${dot}/src/emacs:
149 cd ../src; ${MAKE} ${MFLAGS} emacs
150
151 ${SUBDIRS}:
152 mkdir $@
153 touch stamp-subdir
154
155 # The rules which generate ${TIT} and ${MISC-DIC} files create them all
156 # in one go. So we need to prevent parallel execution for that target,
157 # otherwise Emacs complains about files being locked. .NOTPARALLEL is
158 # for GNU Make, .NO_PARALLEL is for other Make's.
159 .NOTPARALLEL: ${TIT} ${MISC-DIC}
160
161 .NO_PARALLEL: ${TIT} ${MISC-DIC}
162
163 # Rule to generate quail/*.el from CXTERM-DIC/*.tit.
164 # The "if [ -f $@ ]; then true; " part prevents parallel Make's
165 # which don't honor .NOTPARALLEL, such as SGI's Make, from running
166 # this rule many times, one each for every file it creates.
167 ${TIT}:
168 if [ -d quail ]; then true; else make quail; fi
169 if [ -f $@ ]; then true; else \
170 ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
171 --eval '(batch-titdic-convert t)' -dir quail ${srcdir}/CXTERM-DIC; fi
172 if [ -f $@ ]; then true; else \
173 ${RUN-EMACS} -l ${buildlisppath}/international/quail \
174 -f batch-byte-compile ${TIT:.elc=.el}; fi
175
176 # Rule to generate quail/*.el from MISC-DIC/*.
177 ${MISC-DIC}:
178 if [ -d quail ]; then true; else make quail; fi
179 if [ -f $@ ]; then true; else \
180 ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
181 -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; fi
182 if [ -f $@ ]; then true; else \
183 ${RUN-EMACS} -l ${buildlisppath}/international/quail \
184 -f batch-byte-compile ${MISC-DIC:.elc=.el}; fi
185
186 leim-list.el: ${SUBDIRS} ${WORLD}
187 if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
188 ${RUN-EMACS} -l ${buildlisppath}/international/quail \
189 --eval "(update-leim-list-file \".\")" ; \
190 else \
191 ${RUN-EMACS} -l ${buildlisppath}/international/quail \
192 --eval "(update-leim-list-file \".\" \"${srcdir}\")" ; \
193 fi
194
195 install: all
196 if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
197 rm -rf ${INSTALLDIR}/leim-list.el; \
198 rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \
199 echo "Copying leim files to ${INSTALLDIR} ..." ; \
200 if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
201 tar -cf - leim-list.el quail ja-dic \
202 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
203 else \
204 tar -cf - leim-list.el quail \
205 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
206 cd ${srcdir}; \
207 tar -cf - quail/* ja-dic \
208 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
209 fi; \
210 else true; fi
211 -chmod -R a+r ${INSTALLDIR}
212
213 clean mostlyclean:
214 rm -f ${TIT} ${NON-TIT} ${WORLD} ${TIT:.elc=.el} \
215 ${MISC-DIC} ${MISC-DIC:.elc=.el} leim-list.el
216
217 distclean maintainer-clean:
218 if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi
219 rm -f Makefile
220
221 extraclean: distclean
222 -rm -f *~ \#* m/?*~ s/?*~