]> code.delx.au - gnu-emacs/blobdiff - leim/Makefile.in
Merge from trunk
[gnu-emacs] / leim / Makefile.in
index 2ce3503e6ee660979d5170bddaf2a13a91e4d797..6eb18bc76d9a62411236c2254d3a06f0b876d171 100644 (file)
@@ -1,9 +1,9 @@
 # Makefile for leim subdirectory in GNU Emacs.
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-#   2006, 2007, 2008
+#   2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-#   2006, 2007, 2008
+#   2006, 2007, 2008, 2009, 2010
 #   National Institute of Advanced Industrial Science and Technology (AIST)
 #   Registration Number H14PRO021
 
@@ -33,20 +33,18 @@ prefix=@prefix@
 datarootdir=@datarootdir@
 datadir=@datadir@
 srcdir=@srcdir@
+ns_appresdir=@ns_appresdir@
 
 # Where to install LEIM files.
 INSTALLDIR=$(DESTDIR)${datadir}/emacs/${version}/leim
 
 GZIP_PROG = @GZIP_PROG@
 
-# On 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.
-BUILT-EMACS = ${dot}${dot}/src/emacs
+BUILT-EMACS = ../src/emacs
 
-buildlisppath=${srcdir}/${dot}${dot}/lisp
+buildlisppath=${srcdir}/../lisp
 
 # How to run Emacs.
 RUN-EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C \
@@ -90,7 +88,6 @@ 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   \
@@ -154,13 +151,14 @@ NON-TIT-MISC=${CHINESE-NON-TIT} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${OTHERS}
 .SUFFIXES: .elc .el
 
 .el.elc:
-       ${RUN-EMACS} -f batch-byte-compile $<
+       @echo Compiling $<
+       @${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.
-${dot}${dot}/src/emacs:
+../src/emacs:
        cd ../src; ${MAKE} ${MFLAGS} emacs
 
 ${SUBDIRS}:
@@ -207,6 +205,7 @@ changed.misc: ${MISC-SOURCES}
          echo "changed" > $@
 
 leim-list.el: ${SUBDIRS} ${TIT-MISC} changed.tit changed.misc ${srcdir}/leim-ext.el
+       rm -f leim-list.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 \
@@ -218,12 +217,14 @@ leim-list.el: ${SUBDIRS} ${TIT-MISC} changed.tit changed.misc ${srcdir}/leim-ext
        fi
        sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
 
+MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done
+
 install: all
        if [ ! -d ${INSTALLDIR} ] ; then \
-          ${srcdir}/${dot}${dot}/mkinstalldirs ${INSTALLDIR}; \
+          umask 022; ${srcdir}/../mkinstalldirs ${INSTALLDIR}; \
        else true; fi
        if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
-         rm -rf ${INSTALLDIR}/leim-list.el; \
+         rm -f ${INSTALLDIR}/leim-list.el; \
          rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \
          echo "Copying leim files to ${INSTALLDIR} ..." ; \
          if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
@@ -236,8 +237,7 @@ install: all
            tar -chf - quail/* ja-dic \
                | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
          fi; \
-         rm -rf ${INSTALLDIR}/CVS        ${INSTALLDIR}/*/CVS; \
-         rm -f  ${INSTALLDIR}/.cvsignore ${INSTALLDIR}/*/.cvsignore; \
+         rm -f  ${INSTALLDIR}/.gitignore ${INSTALLDIR}/*/.gitignore; \
          rm -f  ${INSTALLDIR}/.arch-inventory ${INSTALLDIR}/*/.arch-inventory; \
          rm -f  ${INSTALLDIR}/\#*        ${INSTALLDIR}/*/\#* ; \
          rm -f  ${INSTALLDIR}/.\#*       ${INSTALLDIR}/*/.\#* ; \
@@ -258,6 +258,11 @@ install: all
          [ -n "$${installuser}" ] && break ; \
        done ; \
        find ${INSTALLDIR} -exec chown $${installuser} '{}' ';'
+       if [ "${ns_appresdir}" != "" ]; then \
+         ( cd ${ns_appresdir} ; \
+           if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\
+           rm -fr share ) ; \
+       else true ; fi
 
 clean mostlyclean:
        rm -f ${TIT-MISC} ${TIT-MISC:.elc=.el} \
@@ -268,16 +273,17 @@ clean mostlyclean:
 # bootstrapping should not leave non-fresh .elc files behind.
 bootstrap-clean: clean
        rm -f ${WORLD}
+## FIXME some compiled files go to srcdir, some don't?
+#      cd ${srcdir}; rm -f *.elc */*.elc
 
 distclean: clean
        if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi
        rm -f Makefile
 
-maintainer-clean: distclean
-       rm -f ${WORLD}
+maintainer-clean: distclean bootstrap-clean
 
 extraclean: maintainer-clean
-       -rm -f *~ \#* m/?*~ s/?*~
+       -rm -f *~ \#* */*~ */\#*
 
 .PHONY: check-declare