bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15297: 24.3.50; Compression of installed .el files should be configu


From: Ulrich Müller
Subject: bug#15297: 24.3.50; Compression of installed .el files should be configurable
Date: Sat, 7 Sep 2013 08:57:27 +0200

Tags: patch

Currently "make install" compresses the installed .el files depending
on the availability of the gzip program. In Gentoo we make this
compression configurable; with modern disk sizes the additional
disk footprint of 34 MiB is normally not an issue.

Since a long time Gentoo uses the following nasty hack for this:
<http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-editors/emacs/emacs-24.3-r2.ebuild?revision=1.15&view=markup#l98>

However, it would be much cleaner if the upstream build system
would allow to disable compression. The patch below adds a
--without-compress-lisp option for this. I've tested it on an
x86_64-pc-linux-gnu system and it works fine for me.


--- emacs-orig/ChangeLog
+++ emacs/ChangeLog
@@ -1,3 +1,11 @@
+2013-09-06  Ulrich Müller  <address@hidden>
+
+       * configure.ac (--without-compress-lisp): New option, suppresses
+       compression of installed .el files.
+       (GZIP_LISP): New variable.
+       * Makefile.in (GZIP_LISP): New, set by configure.
+       (install-arch-indep): Test for GZIP_LISP when compressing .el files.
+
 2013-09-05  Dmitry Antipov  <address@hidden>
 
        Make --without-x compatible with --enable-gcc-warnings.
--- emacs-orig/configure.ac
+++ emacs/configure.ac
@@ -264,6 +264,14 @@
 ## Makefile.in needs the cache file name.
 AC_SUBST(cache_file)
 
+OPTION_DEFAULT_ON([compress-lisp],[don't compress the installed .el files])
+if test $with_compress_lisp = yes; then
+   GZIP_LISP=yes
+else
+   GZIP_LISP=
+fi
+AC_SUBST(GZIP_LISP)
+
 ## This is an option because I do not know if all info/man support
 ## compressed files, nor how to test if they do so.
 OPTION_DEFAULT_ON([compress-info],[don't compress the installed Info pages])
--- emacs-orig/Makefile.in
+++ emacs/Makefile.in
@@ -257,8 +257,10 @@
 # Create a link to a file in the same directory as the target.
 LN_S_FILEONLY = @LN_S_FILEONLY@
 
-# We use gzip to compress installed .el files.
+# We use gzip to compress some installed files.
 GZIP_PROG = @GZIP_PROG@
+# If non-nil, compress the installed .el files.
+GZIP_LISP = @GZIP_LISP@
 # If non-nil, gzip the installed Info and man pages.
 GZIP_INFO = @GZIP_INFO@
 
@@ -613,7 +615,7 @@
          ${write_subdir}
        subdir=$(DESTDIR)${datadir}/emacs/site-lisp ; \
          ${write_subdir} || true
-       [ -z "${GZIP_PROG}" ] || \
+       if [ -n "${GZIP_LISP}" ] && [ -n "${GZIP_PROG}" ]; then \
          ( echo "Compressing *.el ..." ; \
            unset CDPATH; \
            thisdir=`/bin/pwd`; \
@@ -623,7 +625,8 @@
              for f in `find . -name "*.elc" -print`; do \
                ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
              done ; \
-           done )
+           done ) ; \
+       fi
        -chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} ${COPYDESTS}
 
 ## The above chmods are needed because "umask 022; tar ..." is not





reply via email to

[Prev in Thread] Current Thread [Next in Thread]