* (log-edit-show-diff): Error out if the diff function is not set.
[bpt/emacs.git] / leim / Makefile.in
index f14e78a..14bcffb 100644 (file)
@@ -1,12 +1,15 @@
 # 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, 2007
+#   Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+#   National Institute of Advanced Industrial Science and Technology (AIST)
+#   Registration Number H14PRO021
 
 # This file is part of GNU Emacs.
 
 # GNU Emacs is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
+# the Free Software Foundation; either version 3, or (at your option)
 # any later version.
 #
 # GNU Emacs is distributed in the hope that it will be useful,
@@ -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.
@@ -26,11 +29,14 @@ SHELL = /bin/sh
 # Here are the things that we expect ../configure to edit.
 version=@version@
 prefix=@prefix@
+datarootdir=@datarootdir@
 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 = .
@@ -42,7 +48,7 @@ BUILT-EMACS = ${dot}${dot}/src/emacs
 buildlisppath=${srcdir}/${dot}${dot}/lisp
 
 # How to run Emacs.
-RUN-EMACS = EMACSLOADPATH=$(buildlisppath) \
+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
@@ -121,7 +127,8 @@ OTHERS= \
        ${srcdir}/quail/ethiopic.elc \
        ${srcdir}/quail/ipa.elc \
        ${srcdir}/quail/hebrew.elc \
-       ${srcdir}/quail/georgian.elc
+       ${srcdir}/quail/georgian.elc \
+       ${srcdir}/quail/sisheng.elc
 
 MISC= \
        quail/tsang-b5.elc      \
@@ -147,7 +154,7 @@ NON-TIT-MISC=${CHINESE-NON-TIT} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${OTHERS}
 .el.elc:
        ${RUN-EMACS} -f batch-byte-compile $<
 
-all: ${BUILT-EMACS} ${SUBDIRS} leim-list.el
+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.
@@ -159,45 +166,45 @@ ${SUBDIRS}:
        touch stamp-subdir
 
 TIT-SOURCES= \
-       CXTERM-DIC/4Corner.tit \
-       CXTERM-DIC/ARRAY30.tit \
-       CXTERM-DIC/CCDOSPY.tit \
-       CXTERM-DIC/ECDICT.tit \
-       CXTERM-DIC/ETZY.tit \
-       CXTERM-DIC/PY-b5.tit \
-       CXTERM-DIC/Punct-b5.tit \
-       CXTERM-DIC/Punct.tit \
-       CXTERM-DIC/QJ-b5.tit \
-       CXTERM-DIC/QJ.tit \
-       CXTERM-DIC/SW.tit \
-       CXTERM-DIC/TONEPY.tit \
-       CXTERM-DIC/ZOZY.tit
+       ${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}
-       echo "0" > $@
+       ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
+         -f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \
+         echo "changed" > $@
 
 MISC-SOURCES= \
-       MISC-DIC/CTLau-b5.html \
-       MISC-DIC/CTLau.html \
-       MISC-DIC/cangjie-table.b5 \
-       MISC-DIC/cangjie-table.cns \
-       MISC-DIC/pinyin.map \
-       MISC-DIC/ziranma.cin
+       ${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}
-       echo "0" > $@
+       ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
+         -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \
+         echo "changed" > $@
 
-leim-list.el: ${SUBDIRS} ${NON-TIT-MISC} changed.tit changed.misc
-       if [ `(cat changed.tit)` = 0 ] ; then \
-         ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
-           -f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \
-         echo "1" > changed.tit; \
-       else true; fi
-       if [ `(cat changed.misc)` = 0 ] ; then \
-         ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
-           -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \
-         echo "1" > changed.misc; \
-       else true; fi
+leim-list.el: ${SUBDIRS} ${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 \
@@ -207,8 +214,12 @@ leim-list.el: ${SUBDIRS} ${NON-TIT-MISC} changed.tit changed.misc
          ${RUN-EMACS} -l ${buildlisppath}/international/quail \
            --eval "(update-leim-list-file \".\" \"${srcdir}\")" ; \
        fi
+       sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
 
 install: all
+       if [ ! -d ${INSTALLDIR} ] ; then \
+          ${srcdir}/${dot}${dot}/mkinstalldirs ${INSTALLDIR}; \
+       else true; fi
        if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
          rm -rf ${INSTALLDIR}/leim-list.el; \
          rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \
@@ -225,17 +236,37 @@ install: all
          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}
+       for installuser in $${LOGNAME} $${USERNAME} $${USER} \
+         `id -un 2> /dev/null`; do \
+         [ -n "$${installuser}" ] && break ; \
+       done ; \
+       find ${INSTALLDIR} -exec chown $${installuser} '{}' ';'
 
 clean mostlyclean:
        rm -f ${TIT-MISC} ${TIT-MISC:.elc=.el} \
                leim-list.el changed.tit changed.misc
 
+# The following target is needed because the `clean' target only removes
+# TIT-generated files and doesn't touch compiled Quail packages.  But
+# bootstrapping should not leave non-fresh .elc files behind.
+bootstrap-clean: clean
+       rm -f ${WORLD}
+
 distclean: clean
        if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi
        rm -f Makefile
@@ -246,4 +277,8 @@ maintainer-clean: distclean
 extraclean: maintainer-clean
        -rm -f *~ \#* m/?*~ s/?*~
 
-# arch-tag: f666a939-8145-4d64-a6a6-cc1f61bd32ca
+.PHONY: check-declare
+
+check-declare:
+       $(RUN-EMACS) -l $(buildlisppath)/emacs-lisp/check-declare \
+         --eval '(check-declare-directory "$(srcdir)")'