]> git.eshelyaron.com Git - emacs.git/commitdiff
Install self-contained ns leim files directly to their final destination
authorGlenn Morris <rgm@gnu.org>
Thu, 10 May 2012 03:40:20 +0000 (20:40 -0700)
committerGlenn Morris <rgm@gnu.org>
Thu, 10 May 2012 03:40:20 +0000 (20:40 -0700)
This is instead of installing them first in one place, then moving them.
It also fixes the previous change, which was incorrect for
the -disable-ns-self-contained case.

* configure.in (LEIM_INSTALLDIR): New output variable.

* leim/Makefile.in: (install_prefix): New.
(LEIM_INSTALLDIR): New, set by configure.
(install): Use LEIM_INSTALLDIR.

ChangeLog
configure.in
leim/ChangeLog
leim/Makefile.in

index 96ad5c2d189fdc6efa5c6d458f5a47d2f305c90f..ae355df0c8b12b210a0efcc3d305db9af0ad3a79 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-05-10  Glenn Morris  <rgm@gnu.org>
+
+       * configure.in (LEIM_INSTALLDIR): New output variable.
+
 2012-05-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * .dir-locals.el (log-edit-mode): Enable gnu-style checks.
index 5fe14322a95f0e407dff1236f1e4a5e9633862b7..1554d8e2aeef347c9fd65c5c78e5b1acd6684dac 100644 (file)
@@ -1636,6 +1636,7 @@ fail;
 fi
 AC_SUBST(TEMACS_LDFLAGS2)
 
+LEIM_INSTALLDIR="\${install_prefix}/leim"
 ns_frag=/dev/null
 NS_OBJ=
 NS_OBJC_OBJ=
@@ -1651,6 +1652,7 @@ if test "${HAVE_NS}" = yes; then
      prefix=${ns_appresdir}
      exec_prefix=${ns_appbindir}
      libexecdir=${ns_appbindir}/libexec
+     LEIM_INSTALLDIR="\${ns_appresdir}/leim"
   fi
   ns_frag=$srcdir/src/ns.mk
   NS_OBJ="fontset.o fringe.o image.o"
@@ -1658,6 +1660,7 @@ if test "${HAVE_NS}" = yes; then
 fi
 CFLAGS="$tmp_CFLAGS"
 CPPFLAGS="$tmp_CPPFLAGS"
+AC_SUBST(LEIM_INSTALLDIR)
 AC_SUBST(NS_OBJ)
 AC_SUBST(NS_OBJC_OBJ)
 AC_SUBST(LIB_STANDARD)
index 49d5b8c0b9ae203099f30e24a8b34e5e6bad8e36..85878f657347da20a8da264d3b8212c6bf927e01 100644 (file)
@@ -1,5 +1,11 @@
 2012-05-10  Glenn Morris  <rgm@gnu.org>
 
+       * Makefile.in: Install self-contained ns files directly to
+       their final destination.
+       (install_prefix): New.
+       (LEIM_INSTALLDIR): New, set by configure.
+       (install): Use LEIM_INSTALLDIR.
+
        * Makefile.in (MV_DIRS): Remove.
        (install): Simplify the --with-ns case.
 
index 1b1cd3fbcfdff57c4f0e54e602b686808579b489..2bf16c0be7eb649b373b5ece2e2f9c243068883e 100644 (file)
@@ -34,9 +34,12 @@ datadir=@datadir@
 srcdir=@srcdir@
 ns_appresdir=@ns_appresdir@
 
+install_prefix=$(DESTDIR)${datadir}/emacs/${version}
+
 # Where to install LEIM files.
-# Should be $ns_appresdir/leim if $ns_appresdir is set.
-INSTALLDIR=$(DESTDIR)${datadir}/emacs/${version}/leim
+# For most builds, this is ${install_prefix}/leim.
+# For self-contained ns builds, it is ${ns_appresdir}/leim.
+LEIM_INSTALLDIR=@LEIM_INSTALLDIR@
 
 GZIP_PROG = @GZIP_PROG@
 
@@ -176,49 +179,44 @@ compile-main: ${TIT_MISC}
        done
 
 install: all
-       if [ ! -d ${INSTALLDIR} ] ; then \
-          umask 022; ${srcdir}/../build-aux/install-sh -d ${INSTALLDIR}; \
+       if [ ! -d ${LEIM_INSTALLDIR} ] ; then \
+          umask 022; ${srcdir}/../build-aux/install-sh -d ${LEIM_INSTALLDIR}; \
        else true; fi
-       if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
-         rm -f ${INSTALLDIR}/leim-list.el; \
-         rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \
-         echo "Copying leim files to ${INSTALLDIR} ..." ; \
+       if [ x`(cd ${LEIM_INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
+         rm -f ${LEIM_INSTALLDIR}/leim-list.el; \
+         rm -rf ${LEIM_INSTALLDIR}/quail ${LEIM_INSTALLDIR}/ja-dic ; \
+         echo "Copying leim files to ${LEIM_INSTALLDIR} ..." ; \
          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) ;\
+               | (cd ${LEIM_INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
          else \
            tar -chf - leim-list.el quail \
-               | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
+               | (cd ${LEIM_INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
            cd ${srcdir}; \
            tar -chf - quail/* ja-dic \
-               | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
+               | (cd ${LEIM_INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
          fi; \
-         rm -f  ${INSTALLDIR}/.gitignore ${INSTALLDIR}/*/.gitignore; \
-         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 ; \
+         rm -f  ${LEIM_INSTALLDIR}/.gitignore ${LEIM_INSTALLDIR}/*/.gitignore; \
+         rm -f  ${LEIM_INSTALLDIR}/.arch-inventory ${LEIM_INSTALLDIR}/*/.arch-inventory; \
+         rm -f  ${LEIM_INSTALLDIR}/\#*        ${LEIM_INSTALLDIR}/*/\#* ; \
+         rm -f  ${LEIM_INSTALLDIR}/.\#*       ${LEIM_INSTALLDIR}/*/.\#* ; \
+         rm -f  ${LEIM_INSTALLDIR}/*~         ${LEIM_INSTALLDIR}/*/*~ ; \
+         rm -f  ${LEIM_INSTALLDIR}/*.orig     ${LEIM_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 \
+          (cd ${LEIM_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}
+       -chmod -R a+r ${LEIM_INSTALLDIR}
        for installuser in $${LOGNAME} $${USERNAME} $${USER} \
          `id -un 2> /dev/null`; do \
          [ -n "$${installuser}" ] && break ; \
        done ; \
-       find ${INSTALLDIR} -exec chown $${installuser} '{}' ';'
-       if [ "${ns_appresdir}" != "" ]; then \
-         rm -rf ${ns_appresdir}/leim; \
-         mv ${INSTALLDIR} ${ns_appresdir} || exit 1; \
-         rmdir -p ${ns_appresdir}/share/emacs/${version} 2>/dev/null || true; \
-       else true ; fi
+       find ${LEIM_INSTALLDIR} -exec chown $${installuser} '{}' ';'
 
 clean mostlyclean:
        rm -f ${TIT_MISC} ${TIT_MISC:.el=.elc} \