1 # Makefile for leim subdirectory in GNU Emacs.
2 # Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
3 # Licensed to the Free Software Foundation.
5 # This file is part of GNU Emacs.
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)
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.
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.
22 # Avoid trouble on systems where the `SHELL' variable might be
23 # inherited from the environment.
26 # Here are the things that we expect ../configure to edit.
32 # Where to install LEIM files.
33 INSTALLDIR=${datadir}/emacs/${version}/leim
35 # On Xenix and the IBM RS6000, double-dot gets screwed up.
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
42 buildlisppath=${srcdir}/${dot}${dot}/lisp
45 RUN-EMACS = ${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte
47 # Subdirectories to be made if ${srcdir} is different from the current
51 # Files generated from TIT dictionaries for Chinese GB character set.
62 # Files generated from TIT dictionaries for Chinese BIG5 character set.
74 CHINESE-TIT=${TIT-GB} ${TIT-BIG5}
76 NON-TIT-GB=${srcdir}/quail/py-punct.el
78 NON-TIT-BIG5=${srcdir}/quail/quick-b5.el ${srcdir}/quail/tsang-b5.el \
79 ${srcdir}/quail/pypunct-b5.el
81 NON-TIT-CNS=${srcdir}/quail/quick-cns.el ${srcdir}/quail/tsang-cns.el
83 CHINESE-NON-TIT=${NON-TIT-GB} ${NON-TIT-BIG5} ${NON-TIT-CNS}
85 CHINESE-GB=${TIT-GB} ${NON-TIT-GB}
87 CHINESE-BIG5=${TIT-BIG5} ${NON-TIT-BIG5}
89 CHINESE-CNS=${NON-TIT-CNS}
91 JAPANESE=${srcdir}/quail/japanese.el ${srcdir}/skk/skkdic.el
93 KOREAN= ${srcdir}/quail/hangul.el \
94 ${srcdir}/quail/hangul3.el \
95 ${srcdir}/quail/hanja.el \
96 ${srcdir}/quail/hanja-jis.el \
97 ${srcdir}/quail/symbol-ksc.el
99 THAI=${srcdir}/quail/thai.el
101 VIETNAMESE=${srcdir}/quail/viqr.el
103 LAO=${srcdir}/quail/lao.el ${srcdir}/quail/lrt.el
105 INDIAN=${srcdir}/quail/devanagari.el
107 TIBETAN=${srcdir}/quail/tibetan.el
109 LATIN=${srcdir}/quail/latin-pre.el ${srcdir}/quail/latin-post.el
112 ${srcdir}/quail/czech.el \
113 ${srcdir}/quail/slovak.el
115 GREEK=${srcdir}/quail/greek.el
117 RUSSIAN=${srcdir}/quail/cyrillic.el ${srcdir}/quail/cyril-jis.el
120 ${srcdir}/quail/ethiopic.el \
121 ${srcdir}/quail/ipa.el \
122 ${srcdir}/quail/hebrew.el
124 CHINESE=${CHINESE-GB} ${CHINESE-BIG5} ${CHINESE-CNS}
125 EASTASIA=${CHINESE} ${JAPANESE} ${KOREAN}
126 ASIA=${EASTASIA} ${THAI} ${VIETNAMESE} ${LAO} ${INDIAN} ${TIBETAN}
127 EUROPEAN=${LATIN} ${SLAVIC} ${GREEK} ${RUSSIAN}
128 WORLD=${ASIA} ${EUROPEAN} ${MISC}
131 NON-TIT=${CHINESE-NON-TIT} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${MISC}
133 all: ${BUILT-EMACS} ${SUBDIRS} ${TIT} leim-list.el
135 # To ensure that we can run Emacs. This target is ignored (never
136 # being hit) if a user changes default value of EMACS.
137 ${dot}${dot}/src/emacs:
138 cd ../src; ${MAKE} ${MFLAGS} emacs
144 # Rule to generate quail/*.el from CXTERM-DIC/*.tit.
146 if [ -d quail ]; then true; else make quail; fi
147 ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
148 --eval '(batch-titdic-convert t)' -dir quail ${srcdir}/CXTERM-DIC
149 ${RUN-EMACS} -l ${buildlisppath}/international/quail \
150 -f batch-byte-compile ${TIT}
152 leim-list.el: ${SUBDIRS} ${WORLD}
153 if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
154 ${RUN-EMACS} -l ${buildlisppath}/international/quail \
155 --eval "(update-leim-list-file \".\")" ; \
157 ${RUN-EMACS} -l ${buildlisppath}/international/quail \
158 --eval "(update-leim-list-file \".\" \"${srcdir}\")" ; \
162 if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
163 rm -rf ${INSTALLDIR}/leim-list.el; \
164 rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/skk ; \
165 echo "Copying leim files to ${INSTALLDIR} ..." ; \
166 if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
167 tar -cf - leim-list.el quail skk \
168 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
170 tar -cf - leim-list.el quail \
171 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
173 tar -cf - quail/* skk \
174 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
177 -chmod -R a+r ${INSTALLDIR}
180 ELC=`echo ${TIT} | sed 's/\.el/.elc/g'`; \
181 rm -f ${TIT} $$ELC leim-list.el
183 distclean maintainer-clean:
184 if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi