]> code.delx.au - gnu-emacs/blobdiff - leim/Makefile.in
(Table of Resources): Remove xref to non-existent node "LessTif Resources".
[gnu-emacs] / leim / Makefile.in
index a5ff75e81db38432d122a623e346f243938db456..7f354e7cd759a14568a133afd6fbd1af25042618 100644 (file)
@@ -1,6 +1,9 @@
 # Makefile for leim subdirectory in GNU Emacs.
-# Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
-# Licensed to the Free Software Foundation.
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+#   Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+#   National Institute of Advanced Industrial Science and Technology (AIST)
+#   Registration Number H14PRO021
 
 # This file is part of GNU Emacs.
 
@@ -16,8 +19,8 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with GNU Emacs; see the file COPYING.  If not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
 
 # Avoid trouble on systems where the `SHELL' variable might be
 # inherited from the environment.
@@ -30,19 +33,22 @@ datadir=@datadir@
 srcdir=@srcdir@
 
 # Where to install LEIM files.
-INSTALLDIR=${datadir}/emacs/${version}/leim
+INSTALLDIR=$(DESTDIR)${datadir}/emacs/${version}/leim
+
+GZIP_PROG = @GZIP_PROG@
 
 # On Xenix and the IBM RS6000, double-dot gets screwed up.
 dot = .
 
 # Which Emacs to use to convert TIT files to Emacs Lisp files,
 # byte-compile Emacs Lisp files, and generate the file leim-list.el.
-EMACS = ${dot}${dot}/src/emacs
+BUILT-EMACS = ${dot}${dot}/src/emacs
 
 buildlisppath=${srcdir}/${dot}${dot}/lisp
 
 # How to run Emacs.
-RUN-EMACS = ${EMACS} -batch --no-init-file --no-site-file
+RUN-EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C\
+       ${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte
 
 # Subdirectories to be made if ${srcdir} is different from the current
 # directory.
@@ -50,79 +56,104 @@ SUBDIRS=quail
 
 # Files generated from TIT dictionaries for Chinese GB character set.
 TIT-GB=\
-       quail/CTLau.el          \
-       quail/CCDOSPY.el        \
-       quail/Punct.el          \
-       quail/PY.el             \
-       quail/QJ.el             \
-       quail/SW.el             \
-       quail/TONEPY.el         \
-       quail/ZIRANMA.el
+       quail/CCDOSPY.elc       \
+       quail/Punct.elc         \
+       quail/QJ.elc            \
+       quail/SW.elc            \
+       quail/TONEPY.elc
 
 # Files generated from TIT dictionaries for Chinese BIG5 character set.
 TIT-BIG5=\
-       quail/4Corner.el        \
-       quail/ARRAY30.el        \
-       quail/CTLauB.el         \
-       quail/ECDICT.el         \
-       quail/ETZY.el           \
-       quail/Punct-b5.el       \
-       quail/PY-b5.el          \
-       quail/QJ-b5.el          \
-       quail/ZOZY.el
+       quail/4Corner.elc       \
+       quail/ARRAY30.elc       \
+       quail/ECDICT.elc        \
+       quail/ETZY.elc          \
+       quail/Punct-b5.elc      \
+       quail/PY-b5.elc         \
+       quail/QJ-b5.elc         \
+       quail/ZOZY.elc
 
 CHINESE-TIT=${TIT-GB} ${TIT-BIG5}
 
-NON-TIT-GB=quail/py-punct.el
-
-NON-TIT-BIG5=quail/quick-b5.el quail/tsang-b5.el quail/pypunct-b5.el
+NON-TIT-GB=${srcdir}/quail/py-punct.elc
 
-NON-TIT-CNS=quail/quick-cns.el quail/tsang-cns.el
+NON-TIT-BIG5=${srcdir}/quail/pypunct-b5.elc
 
-CHINESE-NON-TIT=${NON-TIT-GB} ${NON-TIT-BIG5} ${NON-TIT-CNS}
+CHINESE-NON-TIT=${NON-TIT-GB} ${NON-TIT-BIG5}
 
 CHINESE-GB=${TIT-GB} ${NON-TIT-GB}
 
-CHINESE-BIG5=${TIT-BIG5} ${NON-TIT-BIG5} 
+CHINESE-BIG5=${TIT-BIG5} ${NON-TIT-BIG5}
+
+JAPANESE=${srcdir}/quail/japanese.elc ${srcdir}/ja-dic/ja-dic.elc
+
+KOREAN=        ${srcdir}/quail/hangul.elc      \
+       ${srcdir}/quail/hangul3.elc     \
+       ${srcdir}/quail/hanja.elc       \
+       ${srcdir}/quail/hanja3.elc      \
+       ${srcdir}/quail/hanja-jis.elc   \
+       ${srcdir}/quail/symbol-ksc.elc
 
-CHINESE-CNS=${NON-TIT-CNS} 
+THAI=${srcdir}/quail/thai.elc
 
-JAPANESE=quail/japanese.el skk/skkdic.el
+VIETNAMESE=${srcdir}/quail/viqr.elc ${srcdir}/quail/vntelex.elc
 
-KOREAN=        quail/hangul.el         \
-       quail/hangul3.el        \
-       quail/hanja.el          \
-       quail/hanja-jis.el      \
-       quail/symbol-ksc.el
+LAO=${srcdir}/quail/lao.elc ${srcdir}/quail/lrt.elc
 
-THAI=quail/thai.el
+INDIAN=${srcdir}/quail/indian.elc
 
-VIETNAMESE=quail/viqr.el
+TIBETAN=${srcdir}/quail/tibetan.elc
 
-LAO=quail/lao.el quail/lrt.el
+LATIN= ${srcdir}/quail/latin-pre.elc   \
+       ${srcdir}/quail/latin-post.elc  \
+       ${srcdir}/quail/latin-alt.elc   \
+       ${srcdir}/quail/latin-ltx.elc   \
+       ${srcdir}/quail/welsh.elc
 
-INDIAN=quail/devanagari.el
+UNICODE=${srcdir}/quail/sgml-input.elc ${srcdir}/quail/rfc1345.elc \
+       ${srcdir}/quail/uni-input.elc
 
-TIBETAN=quail/tibetan.el
+SLAVIC= \
+       ${srcdir}/quail/czech.elc \
+       ${srcdir}/quail/croatian.elc \
+       ${srcdir}/quail/slovak.elc
 
-LATIN=quail/latin-pre.el quail/latin-post.el
+GREEK=${srcdir}/quail/greek.elc
 
-GREEK=quail/greek.el
+RUSSIAN=${srcdir}/quail/cyrillic.elc ${srcdir}/quail/cyril-jis.elc
 
-RUSSIAN=quail/cyrillic.el quail/cyril-jis.el
+OTHERS= \
+       ${srcdir}/quail/ethiopic.elc \
+       ${srcdir}/quail/ipa.elc \
+       ${srcdir}/quail/hebrew.elc \
+       ${srcdir}/quail/georgian.elc \
+       ${srcdir}/quail/sisheng.elc
 
-MISC=quail/ethiopic.el quail/ipa.el
+MISC= \
+       quail/tsang-b5.elc      \
+       quail/quick-b5.elc      \
+       quail/tsang-cns.elc     \
+       quail/quick-cns.elc     \
+       quail/PY.elc            \
+       quail/ZIRANMA.elc       \
+       quail/CTLau.elc         \
+       quail/CTLau-b5.elc
 
-CHINESE=${CHINESE-GB} ${CHINESE-BIG5} ${CHINESE-CNS}
+CHINESE=${CHINESE-GB} ${CHINESE-BIG5}
 EASTASIA=${CHINESE} ${JAPANESE} ${KOREAN}
 ASIA=${EASTASIA} ${THAI} ${VIETNAMESE} ${LAO} ${INDIAN} ${TIBETAN}
-EUROPEAN=${LATIN} ${GREEK} ${RUSSIAN}
-WORLD=${ASIA} ${EUROPEAN} ${MISC}
+EUROPEAN=${LATIN} ${SLAVIC} ${GREEK} ${RUSSIAN}
+WORLD=${ASIA} ${EUROPEAN} ${OTHERS} ${MISC} ${UNICODE}
 
-TIT=${CHINESE-TIT}
-NON-TIT=${CHINESE-NON-TIT} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${MISC}
+TIT-MISC=${CHINESE-TIT} ${MISC}
+NON-TIT-MISC=${CHINESE-NON-TIT} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${OTHERS}
 
-all: ${EMACS} ${SUBDIRS} ${TIT} leim-list.el
+.SUFFIXES: .elc .el
+
+.el.elc:
+       ${RUN-EMACS} -f batch-byte-compile $<
+
+all: ${BUILT-EMACS} ${SUBDIRS} leim-list.el ${WORLD}
 
 # To ensure that we can run Emacs.  This target is ignored (never
 # being hit) if a user changes default value of EMACS.
@@ -133,41 +164,100 @@ ${SUBDIRS}:
        mkdir $@
        touch stamp-subdir
 
-# Rule to generate quail/*.el from CXTERM-DIC/*.tit.
-${TIT}:
-       [ -d quail ] || mkdir quail
+TIT-SOURCES= \
+       ${srcdir}/CXTERM-DIC/4Corner.tit \
+       ${srcdir}/CXTERM-DIC/ARRAY30.tit \
+       ${srcdir}/CXTERM-DIC/CCDOSPY.tit \
+       ${srcdir}/CXTERM-DIC/ECDICT.tit \
+       ${srcdir}/CXTERM-DIC/ETZY.tit \
+       ${srcdir}/CXTERM-DIC/PY-b5.tit \
+       ${srcdir}/CXTERM-DIC/Punct-b5.tit \
+       ${srcdir}/CXTERM-DIC/Punct.tit \
+       ${srcdir}/CXTERM-DIC/QJ-b5.tit \
+       ${srcdir}/CXTERM-DIC/QJ.tit \
+       ${srcdir}/CXTERM-DIC/SW.tit \
+       ${srcdir}/CXTERM-DIC/TONEPY.tit \
+       ${srcdir}/CXTERM-DIC/ZOZY.tit
+
+${CHINESE-TIT:.elc=.el}: changed.tit
+       @true
+
+changed.tit: ${TIT-SOURCES}
+       ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
+         -f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \
+         echo "changed" > $@
+
+MISC-SOURCES= \
+       ${srcdir}/MISC-DIC/CTLau-b5.html \
+       ${srcdir}/MISC-DIC/CTLau.html \
+       ${srcdir}/MISC-DIC/cangjie-table.b5 \
+       ${srcdir}/MISC-DIC/cangjie-table.cns \
+       ${srcdir}/MISC-DIC/pinyin.map \
+       ${srcdir}/MISC-DIC/ziranma.cin
+
+${MISC:.elc=.el}: changed.misc
+       @true
+
+changed.misc: ${MISC-SOURCES}
        ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
-           --eval '(batch-titdic-convert t)' -dir quail ${srcdir}/CXTERM-DIC
-       ${RUN-EMACS} -f batch-byte-compile ${TIT}
+         -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \
+         echo "changed" > $@
 
-leim-list.el: ${SUBDIRS} ${TIT}
-       if [ x`(cd ${srcdir}; /bin/pwd)` = x`(/bin/pwd)` ] ; then \
+leim-list.el: ${SUBDIRS} ${NON-TIT-MISC} changed.tit changed.misc ${srcdir}/leim-ext.el
+       ${RUN-EMACS}  -l ${buildlisppath}/international/quail \
+         -f batch-byte-compile-if-not-done ${TIT-MISC:.elc=.el}
+       if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
          ${RUN-EMACS} -l ${buildlisppath}/international/quail \
            --eval "(update-leim-list-file \".\")" ; \
        else \
          ${RUN-EMACS} -l ${buildlisppath}/international/quail \
            --eval "(update-leim-list-file \".\" \"${srcdir}\")" ; \
        fi
+       sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
 
 install: all
-       if [ x`(cd ${INSTALLDIR}; /bin/pwd)` != x`(/bin/pwd)` ] ; then \
+       if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
          rm -rf ${INSTALLDIR}/leim-list.el; \
-         rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/skk ; \
+         rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \
          echo "Copying leim files to ${INSTALLDIR} ..." ; \
-         cp leim-list.el ${INSTALLDIR} ; \
-         tar -cf - leim-list.el ${SUBDIRS} \
+         if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
+           tar -chf - leim-list.el quail ja-dic \
+               | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
+         else \
+           tar -chf - leim-list.el quail \
                | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
-         if [ x`(cd ${srcdir}; /bin/pwd)` != x`(/bin/pwd)` ] ; then \
            cd ${srcdir}; \
-           tar -cf - ${SUBDIRS} \
+           tar -chf - quail/* ja-dic \
                | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
-         else true; fi; \
+         fi; \
+         rm -rf ${INSTALLDIR}/CVS        ${INSTALLDIR}/*/CVS; \
+         rm -f  ${INSTALLDIR}/.cvsignore ${INSTALLDIR}/*/.cvsignore; \
+         rm -f  ${INSTALLDIR}/.arch-inventory ${INSTALLDIR}/*/.arch-inventory; \
+         rm -f  ${INSTALLDIR}/\#*        ${INSTALLDIR}/*/\#* ; \
+         rm -f  ${INSTALLDIR}/.\#*       ${INSTALLDIR}/*/.\#* ; \
+         rm -f  ${INSTALLDIR}/*~         ${INSTALLDIR}/*/*~ ; \
+         rm -f  ${INSTALLDIR}/*.orig     ${INSTALLDIR}/*/*.orig ; \
        else true; fi
+       -unset CDPATH; \
+       if [ -n "${GZIP_PROG}" ]; \
+       then \
+          echo "Compressing *.el ..." ; \
+          (cd ${INSTALLDIR}; for f in `find . -name "*.elc" -print`; do \
+               ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
+           done) \
+       else true; fi
+       -chmod -R a+r ${INSTALLDIR}
 
 clean mostlyclean:
-       ELC=`echo ${TIT} | sed 's/\.el/.elc/g'`; \
-       rm -f ${TIT} $$ELC leim-list.el
+       rm -f ${TIT-MISC} ${TIT-MISC:.elc=.el} \
+               leim-list.el changed.tit changed.misc
 
-distclean maintainer-clean:
+distclean: clean
        if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi
        rm -f Makefile
+
+maintainer-clean: distclean
+       rm -f ${WORLD}
+
+extraclean: maintainer-clean
+       -rm -f *~ \#* m/?*~ s/?*~