| 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 | EMACS = ${dot}${dot}/src/emacs |
| 41 | |
| 42 | buildlisppath=${srcdir}/${dot}${dot}/lisp |
| 43 | |
| 44 | # How to run Emacs. |
| 45 | RUN-EMACS = ${EMACS} -batch --no-init-file --no-site-file |
| 46 | |
| 47 | # Subdirectories to be made if ${srcdir} is different from the current |
| 48 | # directory. |
| 49 | SUBDIRS=quail |
| 50 | |
| 51 | # Files generated from TIT dictionaries for Chinese GB character set. |
| 52 | TIT-GB=\ |
| 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. |
| 63 | TIT-BIG5=\ |
| 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 |
| 73 | |
| 74 | CHINESE-TIT=${TIT-GB} ${TIT-BIG5} |
| 75 | |
| 76 | NON-TIT-GB=quail/py-punct.el |
| 77 | |
| 78 | NON-TIT-BIG5=quail/quick-b5.el quail/tsang-b5.el quail/pypunct-b5.el |
| 79 | |
| 80 | NON-TIT-CNS=quail/quick-cns.el quail/tsang-cns.el |
| 81 | |
| 82 | CHINESE-NON-TIT=${NON-TIT-GB} ${NON-TIT-BIG5} ${NON-TIT-CNS} |
| 83 | |
| 84 | CHINESE-GB=${TIT-GB} ${NON-TIT-GB} |
| 85 | |
| 86 | CHINESE-BIG5=${TIT-BIG5} ${NON-TIT-BIG5} |
| 87 | |
| 88 | CHINESE-CNS=${NON-TIT-CNS} |
| 89 | |
| 90 | JAPANESE=quail/japanese.el skk/skkdic.el |
| 91 | |
| 92 | KOREAN= quail/hangul.el \ |
| 93 | quail/hangul3.el \ |
| 94 | quail/hanja.el \ |
| 95 | quail/hanja-jis.el \ |
| 96 | quail/symbol-ksc.el |
| 97 | |
| 98 | THAI=quail/thai.el |
| 99 | |
| 100 | VIETNAMESE=quail/viqr.el |
| 101 | |
| 102 | LAO=quail/lao.el quail/lrt.el |
| 103 | |
| 104 | INDIAN=quail/devanagari.el |
| 105 | |
| 106 | TIBETAN=quail/tibetan.el |
| 107 | |
| 108 | LATIN=quail/latin-pre.el quail/latin-post.el |
| 109 | |
| 110 | GREEK=quail/greek.el |
| 111 | |
| 112 | RUSSIAN=quail/cyrillic.el quail/cyril-jis.el |
| 113 | |
| 114 | MISC=quail/ethiopic.el quail/ipa.el |
| 115 | |
| 116 | CHINESE=${CHINESE-GB} ${CHINESE-BIG5} ${CHINESE-CNS} |
| 117 | EASTASIA=${CHINESE} ${JAPANESE} ${KOREAN} |
| 118 | ASIA=${EASTASIA} ${THAI} ${VIETNAMESE} ${LAO} ${INDIAN} ${TIBETAN} |
| 119 | EUROPEAN=${LATIN} ${GREEK} ${RUSSIAN} |
| 120 | WORLD=${ASIA} ${EUROPEAN} ${MISC} |
| 121 | |
| 122 | TIT=${CHINESE-TIT} |
| 123 | NON-TIT=${CHINESE-NON-TIT} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${MISC} |
| 124 | |
| 125 | all: ${EMACS} ${SUBDIRS} ${TIT} leim-list.el |
| 126 | |
| 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 |
| 131 | |
| 132 | ${SUBDIRS}: |
| 133 | mkdir $@ |
| 134 | touch stamp-subdir |
| 135 | |
| 136 | # Rule to generate quail/*.el from CXTERM-DIC/*.tit. |
| 137 | ${TIT}: |
| 138 | [ -d quail ] || mkdir quail |
| 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} |
| 142 | |
| 143 | leim-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 |
| 151 | |
| 152 | install: all |
| 153 | if [ x`(cd ${INSTALLDIR}; /bin/pwd)` != x`(/bin/pwd)` ] ; then \ |
| 154 | rm -rf ${INSTALLDIR}/leim-list.el; \ |
| 155 | rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/skk ; \ |
| 156 | echo "Copying leim files to ${INSTALLDIR} ..." ; \ |
| 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 \ |
| 162 | | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\ |
| 163 | cd ${srcdir}; \ |
| 164 | tar -cf - quail skk \ |
| 165 | | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\ |
| 166 | fi; \ |
| 167 | else true; fi |
| 168 | |
| 169 | clean mostlyclean: |
| 170 | ELC=`echo ${TIT} | sed 's/\.el/.elc/g'`; \ |
| 171 | rm -f ${TIT} $$ELC leim-list.el |
| 172 | |
| 173 | distclean maintainer-clean: |
| 174 | if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi |
| 175 | rm -f Makefile |