Do not copy leim-list.el twice.
[bpt/emacs.git] / leim / Makefile.in
CommitLineData
24b31c88
KH
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.
24SHELL = /bin/sh
25
26# Here are the things that we expect ../configure to edit.
27version=@version@
28prefix=@prefix@
29datadir=@datadir@
24b31c88
KH
30srcdir=@srcdir@
31
eb7440a5 32# Where to install LEIM files.
24b31c88
KH
33INSTALLDIR=${datadir}/emacs/${version}/leim
34
eb7440a5
KH
35# On Xenix and the IBM RS6000, double-dot gets screwed up.
36dot = .
24b31c88 37
eb7440a5
KH
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.
40EMACS = ${dot}${dot}/src/emacs
24b31c88 41
eb7440a5
KH
42buildlisppath=${srcdir}/${dot}${dot}/lisp
43
36f99a92
KH
44# How to run Emacs.
45RUN-EMACS = ${EMACS} -batch --no-init-file --no-site-file
eb7440a5
KH
46
47# Subdirectories to be made if ${srcdir} is different from the current
48# directory.
ac880bd6 49SUBDIRS=quail
24b31c88 50
eb7440a5 51# Files generated from TIT dictionaries for Chinese GB character set.
72388e59 52TIT-GB=\
eb7440a5
KH
53 quail/CTLau.el \
54 quail/CCDOSPY.el \
55 quail/Punct.el \
56 quail/PY.el \
57 quail/QJ.el \
58 quail/SW.el \
59 quail/TONEPY.el \
60 quail/ZIRANMA.el
61
62# Files generated from TIT dictionaries for Chinese BIG5 character set.
72388e59 63TIT-BIG5=\
eb7440a5
KH
64 quail/4Corner.el \
65 quail/ARRAY30.el \
66 quail/CTLauB.el \
67 quail/ECDICT.el \
68 quail/ETZY.el \
69 quail/Punct-b5.el \
70 quail/PY-b5.el \
71 quail/QJ-b5.el \
72 quail/ZOZY.el
72388e59 73
ef2300a7 74CHINESE-TIT=${TIT-GB} ${TIT-BIG5}
8f5aa81c 75
ef2300a7 76NON-TIT-GB=quail/py-punct.el
72388e59 77
ef2300a7 78NON-TIT-BIG5=quail/quick-b5.el quail/tsang-b5.el quail/pypunct-b5.el
72388e59 79
ef2300a7
KH
80NON-TIT-CNS=quail/quick-cns.el quail/tsang-cns.el
81
82CHINESE-NON-TIT=${NON-TIT-GB} ${NON-TIT-BIG5} ${NON-TIT-CNS}
83
84CHINESE-GB=${TIT-GB} ${NON-TIT-GB}
85
86CHINESE-BIG5=${TIT-BIG5} ${NON-TIT-BIG5}
87
88CHINESE-CNS=${NON-TIT-CNS}
24b31c88 89
eb7440a5 90JAPANESE=quail/japanese.el skk/skkdic.el
24b31c88 91
8f5aa81c 92KOREAN= quail/hangul.el \
eb7440a5
KH
93 quail/hangul3.el \
94 quail/hanja.el \
95 quail/hanja-jis.el \
96 quail/symbol-ksc.el
24b31c88 97
eb7440a5 98THAI=quail/thai.el
24b31c88 99
eb7440a5 100VIETNAMESE=quail/viqr.el
24b31c88 101
eb7440a5 102LAO=quail/lao.el quail/lrt.el
24b31c88 103
eb7440a5 104INDIAN=quail/devanagari.el
24b31c88 105
eb7440a5 106TIBETAN=quail/tibetan.el
24b31c88 107
eb7440a5 108LATIN=quail/latin-pre.el quail/latin-post.el
24b31c88 109
eb7440a5 110GREEK=quail/greek.el
24b31c88 111
29b398b6 112RUSSIAN=quail/cyrillic.el quail/cyril-jis.el
24b31c88 113
eb7440a5 114MISC=quail/ethiopic.el quail/ipa.el
24b31c88
KH
115
116CHINESE=${CHINESE-GB} ${CHINESE-BIG5} ${CHINESE-CNS}
117EASTASIA=${CHINESE} ${JAPANESE} ${KOREAN}
8f5aa81c 118ASIA=${EASTASIA} ${THAI} ${VIETNAMESE} ${LAO} ${INDIAN} ${TIBETAN}
24b31c88
KH
119EUROPEAN=${LATIN} ${GREEK} ${RUSSIAN}
120WORLD=${ASIA} ${EUROPEAN} ${MISC}
121
ef2300a7
KH
122TIT=${CHINESE-TIT}
123NON-TIT=${CHINESE-NON-TIT} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${MISC}
124
ac880bd6 125all: ${EMACS} ${SUBDIRS} ${TIT} leim-list.el
24b31c88 126
eb7440a5
KH
127# To ensure that we can run Emacs. This target is ignored (never
128# being hit) if a user changes default value of EMACS.
129${dot}${dot}/src/emacs:
130 cd ../src; ${MAKE} ${MFLAGS} emacs
24b31c88 131
eb7440a5
KH
132${SUBDIRS}:
133 mkdir $@
134 touch stamp-subdir
24b31c88 135
eb7440a5 136# Rule to generate quail/*.el from CXTERM-DIC/*.tit.
8f5aa81c 137${TIT}:
ac880bd6 138 [ -d quail ] || mkdir quail
8f5aa81c
KH
139 ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
140 --eval '(batch-titdic-convert t)' -dir quail ${srcdir}/CXTERM-DIC
141 ${RUN-EMACS} -f batch-byte-compile ${TIT}
24b31c88 142
ac880bd6
KH
143leim-list.el: ${SUBDIRS} ${TIT}
144 if [ x`(cd ${srcdir}; /bin/pwd)` = x`(/bin/pwd)` ] ; then \
145 ${RUN-EMACS} -l ${buildlisppath}/international/quail \
146 --eval "(update-leim-list-file \".\")" ; \
147 else \
148 ${RUN-EMACS} -l ${buildlisppath}/international/quail \
149 --eval "(update-leim-list-file \".\" \"${srcdir}\")" ; \
150 fi
24b31c88
KH
151
152install: all
8f5aa81c 153 if [ x`(cd ${INSTALLDIR}; /bin/pwd)` != x`(/bin/pwd)` ] ; then \
10c63e04 154 rm -rf ${INSTALLDIR}/leim-list.el; \
8f5aa81c 155 rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/skk ; \
10c63e04 156 echo "Copying leim files to ${INSTALLDIR} ..." ; \
b0a22482
KH
157 if [ x`(cd ${srcdir}; /bin/pwd)` == x`(/bin/pwd)` ] ; then \
158 tar -cf - leim-list.el quail skk \
159 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
160 else \
161 tar -cf - leim-list.el quail \
ef2300a7 162 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
ac880bd6 163 cd ${srcdir}; \
b0a22482 164 tar -cf - quail skk \
ef2300a7 165 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
b0a22482 166 fi; \
ecf38857 167 else true; fi
8f5aa81c
KH
168
169clean mostlyclean:
170 ELC=`echo ${TIT} | sed 's/\.el/.elc/g'`; \
171 rm -f ${TIT} $$ELC leim-list.el
72388e59 172
8f5aa81c 173distclean maintainer-clean:
eb7440a5 174 if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi
72388e59 175 rm -f Makefile