]> code.delx.au - gnu-emacs/commitdiff
* Makefile.in (install-arch-indep): Simplify.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Feb 2014 18:59:24 +0000 (10:59 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Feb 2014 18:59:24 +0000 (10:59 -0800)
This should make it more reliable, and hopefully more portable to
non-GNU 'make' implementations such as HP-UX 'make'.

Fixes: debbugs:16717
ChangeLog
Makefile.in

index 22f33b07b13fdc03e13c5255f45ec7a1e852452b..4a470cb0dcceef0fe603cd69c92d04fdf3c05537 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-02-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (install-arch-indep): Simplify (Bug#16717).
+       This should make it more reliable, and hopefully more portable to
+       non-GNU 'make' implementations such as HP-UX 'make'.
+
 2014-02-13  Juanma Barranquero  <lekktu@gmail.com>
 
        * Makefile.in (install-nt): Also pass datadir.
index 192c9483eb0ec4ee6ed826e564d27adf06c23310..44ba084bee4e1f5a57b9ec14e7a66b4086a9ce97 100644 (file)
@@ -612,18 +612,11 @@ install-arch-indep: lisp install-info install-man ${INSTALL_ARCH_INDEP_EXTRA}
          ${write_subdir}
        subdir="$(DESTDIR)${datadir}/emacs/site-lisp" ; \
          ${write_subdir} || true
-       [ -z "${GZIP_PROG}" ] || \
-         ( echo "Compressing *.el ..." ; \
-           unset CDPATH; \
-           thisdir=`/bin/pwd`; \
-           for dir in "$(DESTDIR)${lispdir}"; do \
-             cd "$${thisdir}" ; \
-             cd "$${dir}" || exit 1 ; \
-             for f in `find . -name "*.elc" -print`; do \
-               f_el=`echo "$$f" | sed 's/.elc$$/.el/'`; \
-               ${GZIP_PROG} -9n "$$f_el" ; \
-             done ; \
-           done )
+       [ -z "${GZIP_PROG}" ] || { \
+         echo "Compressing *.el ..." && \
+         find "$(DESTDIR)${lispdir}" -name '*.elc' -exec sh -c \
+           '${GZIP_PROG} -9n `expr "$$@" : "\\(.*\\)c"`' dummy '{}' ';'; \
+       }
        -chmod -R a+r "$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS}
 
 ## The above chmods are needed because "umask 022; tar ..." is not