[gnus git] branch master updated: m0-11-23-gdd2ab07 =1= Compress Lisp source files and info files by gzip by default

Katsumi Yamaoka <[email protected]> Wed, 11 Jun 2014 10:54:05 +0200
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  dd2ab0746dda0b9baa460050ba97463182147a08 (commit)
      from  6d39a9df4127918e7cb38a3f240142c8b538dcdb (commit)


- Log -----------------------------------------------------------------
commit dd2ab0746dda0b9baa460050ba97463182147a08
Author: Katsumi Yamaoka <[email protected]>
Date:   Wed Jun 11 08:53:43 2014 +0000

    Compress Lisp source files and info files by gzip by default
    
    * configure.in: Add --without-compress-install option; check for gzip.
    
    * Makefile.in (GZIP_PROG): Be substituted by configure.
    
    * lisp/Makefile.in (install-el, install-el-elc): Compress .el files.
    (uninstall): Remove compressed .el files.
    
    * texi/Makefile.in (.texi, makeinfo): Don't split info files.
    (install): Compress info files.
    (uninstall): Remove compressed info files.
    (gnus-manual-a4.ps.gz, gnus-manual-standard.ps.gz): Use GZIP_PROG.
    
    * texi/infohack.el (infohack): Don't split info files.
    
    * texi/gnus.texi (Ma Gnus): Mention that Lisp source files and info files
    to be installed will be compressed by gzip by default.

diff --git a/ChangeLog b/ChangeLog
index 9b30f70..5f41b90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-06-11  Katsumi Yamaoka  <[email protected]>
+
+	* configure.in: Add --without-compress-install option; check for gzip.
+
+	* Makefile.in (GZIP_PROG): Be substituted by configure.
+
 2014-01-31  Lars Ingebrigtsen  <[email protected]>
 
 	* make.bat (REM FIXME): Remove mention of outdated w3.
diff --git a/Makefile.in b/Makefile.in
index 537ef84..ad78f7a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -9,7 +9,7 @@ srcdir = @srcdir@
 EMACS = @EMACS@
 XEMACS = @EMACS@
 
-GZIP_PROG = gzip -f
+GZIP_PROG = @GZIP_PROG@
 
 SED_I = sed -i -e
 
@@ -282,7 +282,7 @@ release-make-tar-ball:	$(CIN)gnus-$(VERSION)
 release-diff:	release-check-settings
 	cvs diff -r $(OLD_TAG) -r $(TAG) | sed -e '/^\? /d' > temp.diff || true
 	mv temp.diff $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff
-	$(GZIP_PROG) $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff
+	$(GZIP_PROG) -f $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff
 	ls -l        $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz
 
 release-post-clean:	release-check-settings
diff --git a/configure.in b/configure.in
index 0988122..f516395 100644
--- a/configure.in
+++ b/configure.in
@@ -29,4 +29,24 @@ AC_PATH_INFO_DIR
 AC_SET_BUILD_FLAGS
 GNUS_CHECK_FONTS
 
+AC_PATH_PROG(GZIP_PROG, gzip)
+AC_ARG_WITH(compress-install,
+	[AS_HELP_STRING([[--without-compress-install]],
+		[do not compress .el and .info files when installing.])],
+	[ if test "${withval}" = no; then
+		COMPRESS_INSTALL=no;
+	  else
+		if test -n "${GZIP_PROG}"; then
+			COMPRESS_INSTALL=yes;
+		else
+			COMPRESS_INSTALL=no;
+		fi;
+	  fi ],
+	[ if test -n "${GZIP_PROG}"; then
+		COMPRESS_INSTALL=yes;
+	  else
+		COMPRESS_INSTALL=no;
+	  fi ])
+AC_SUBST(COMPRESS_INSTALL)
+
 AC_OUTPUT(Makefile etc/Makefile lisp/Makefile texi/Makefile texi/gnusconfig.tex texi/ps/Makefile)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 662557a..8ed6086 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-11  Katsumi Yamaoka  <[email protected]>
+
+	* Makefile.in (install-el, install-el-elc): Compress .el files.
+	(uninstall): Remove compressed .el files.
+
 2014-06-05  Katsumi Yamaoka  <[email protected]>
 
 	* gnus-art.el (gnus-article-edit-part): Don't modifiy markers.
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index d60d5b8..58c02c1 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -13,6 +13,8 @@ INSTALL_DATA = @INSTALL_DATA@
 SHELL = /bin/sh
 VPATH = @srcdir@
 EMACS_COMP = lispdir="$(lispdir)" srcdir=$(srcdir) $(EMACS) $(FLAGS)
+GZIP_PROG = @GZIP_PROG@
+COMPRESS_INSTALL = @COMPRESS_INSTALL@
 
 all total: clean-some gnus-load.el
 	$(EMACS_COMP) -f dgnushack-compile
@@ -51,6 +53,10 @@ install-el: gnus-load.el
 	  if [ -f "$(srcdir)/$$p" ]; then \
 	    echo "$(INSTALL_DATA) $$p \"$(DESTDIR)$(lispdir)/$$p\""; \
 	    $(INSTALL_DATA) $(srcdir)/$$p "$(DESTDIR)$(lispdir)/$$p"; \
+	    if test $(COMPRESS_INSTALL) = yes -a -n "$(GZIP_PROG)"; then \
+	      rm -f "$(DESTDIR)$(lispdir)/$$p.gz"; \
+	      $(GZIP_PROG) -9n "$(DESTDIR)$(lispdir)/$$p"; \
+	    fi; \
 	  fi; \
 	done
 
@@ -71,6 +77,10 @@ install-el-elc: clever
 	  if [ -f "$(srcdir)/$$q" ]; then \
 	    echo "$(INSTALL_DATA) $$q \"$(DESTDIR)$(lispdir)/$$q\""; \
 	    $(INSTALL_DATA) $(srcdir)/$$q "$(DESTDIR)$(lispdir)/$$q"; \
+	    if test $(COMPRESS_INSTALL) = yes -a -n "$(GZIP_PROG)"; then \
+	      rm -f "$(DESTDIR)$(lispdir)/$$q.gz"; \
+	      $(GZIP_PROG) -9n "$(DESTDIR)$(lispdir)/$$q"; \
+	    fi; \
 	  fi; \
 	  echo "$(INSTALL_DATA) $$p \"$(DESTDIR)$(lispdir)/$$p\""; \
 	  $(INSTALL_DATA) $$p "$(DESTDIR)$(lispdir)/$$p"; \
@@ -88,7 +98,7 @@ uninstall:
 	done
 	cd $(srcdir); \
 	for p in *.el; do \
-	  rm -f "$(DESTDIR)$(lispdir)/$$p"; \
+	  rm -f "$(DESTDIR)$(lispdir)/$$p" "$(DESTDIR)$(lispdir)/$$p.gz"; \
 	done
 
 tags:
diff --git a/texi/ChangeLog b/texi/ChangeLog
index 7806de9..530ff58 100644
--- a/texi/ChangeLog
+++ b/texi/ChangeLog
@@ -1,3 +1,15 @@
+2014-06-11  Katsumi Yamaoka  <[email protected]>
+
+	* Makefile.in (.texi, makeinfo): Don't split info files.
+	(install): Compress info files.
+	(uninstall): Remove compressed info files.
+	(gnus-manual-a4.ps.gz, gnus-manual-standard.ps.gz): Use GZIP_PROG.
+
+	* infohack.el (infohack): Don't split info files.
+
+	* gnus.texi (Ma Gnus): Mention that Lisp source files and info files
+	to be installed will be compressed by gzip by default.
+
 2014-06-10  Katsumi Yamaoka  <[email protected]>
 
 	Add .info extension to info files.
diff --git a/texi/Makefile.in b/texi/Makefile.in
index 5a56e7d..520ce37 100644
--- a/texi/Makefile.in
+++ b/texi/Makefile.in
@@ -22,6 +22,8 @@ PAPERTYPE=a4
 INFO_DEPS=gnus message emacs-mime sieve epa auth sasl
 REFCARD=gnus-refcard
 LOGO=gnus-logo
+GZIP_PROG = @GZIP_PROG@
+COMPRESS_INSTALL = @COMPRESS_INSTALL@
 
 all: $(INFO_DEPS)
 
@@ -36,7 +38,7 @@ most: texi2latex.elc latex latexps
 .texi:
 	rm -f $@{,-[0-9],.info,.info-[0-9]}; \
 	if test "x$(MAKEINFO)" != "xno" ; then \
-	  LC_ALL=C $(MAKEINFO) -I $(srcdir) --enable-encoding $<; \
+	  LC_ALL=C $(MAKEINFO) -I $(srcdir) --enable-encoding --no-split $<; \
 	else \
 	  $(EMACSINFO) $<; \
 	fi
@@ -105,8 +107,8 @@ almost-clean:
 	thumbdta.tex xface.tex *.tpt gnus-manual-*.pdf gnus-manual-*.ps.gz
 
 makeinfo:
-	LC_ALL=C makeinfo --enable-encoding gnus.texi
-	LC_ALL=C makeinfo --enable-encoding message.texi
+	LC_ALL=C makeinfo --enable-encoding --no-split gnus.texi
+	LC_ALL=C makeinfo --enable-encoding --no-split message.texi
 
 texi2latex.elc: texi2latex.el
 	srcdir=$(srcdir)/../lisp $(EMACSCOMP) -l $(srcdir)/../lisp/dgnushack.el --eval '(byte-compile-file "$(srcdir)/texi2latex.el")'
@@ -167,10 +169,10 @@ gnus-manual-standard.latexi: gnus.latexi
 	sed 's/,a4paper/,letterpaper/' $< > $@
 
 gnus-manual-a4.ps.gz: gnus-manual-a4.dvi-x
-	TEXPICTS=$(srcdir) $(DVIPS) -t a4 -f $< | gzip -c > $@
+	TEXPICTS=$(srcdir) $(DVIPS) -t a4 -f $< | $(GZIP_PROG) -c > $@
 
 gnus-manual-standard.ps.gz: gnus-manual-standard.dvi-x
-	TEXPICTS=$(srcdir) $(DVIPS) -t letter -f $< | gzip -c > $@
+	TEXPICTS=$(srcdir) $(DVIPS) -t letter -f $< | $(GZIP_PROG) -c > $@
 
 pdfs: gnus-manual-a4.pdf-x gnus-manual-standard.pdf-x
 	mv gnus-manual-a4.pdf-x gnus-manual-a4.pdf
@@ -207,10 +209,14 @@ install: $(INFO_DEPS)
 	$(SHELL) $(top_srcdir)/mkinstalldirs "$(DESTDIR)$(infodir)"
 	@for file in $(INFO_DEPS); do \
 	  rm -f $(DESTDIR)$(infodir)/$$file{,-[0-9],.info,.info-[0-9]}; \
+	  rm -f $(DESTDIR)$(infodir)/$$file{,-[0-9],.info,.info-[0-9]}.gz; \
 	  for ifile in `echo $$file.info $$file.info-[0-9]`; do \
 	    if test -f $$ifile; then \
 	      echo "$(INSTALL_DATA) $$ifile \"$(DESTDIR)$(infodir)/$$ifile\""; \
 	      $(INSTALL_DATA) $$ifile "$(DESTDIR)$(infodir)/$$ifile"; \
+	      if test $(COMPRESS_INSTALL) = yes -a -n "$(GZIP_PROG)"; then \
+		$(GZIP_PROG) -9n "$(DESTDIR)$(infodir)/$$ifile"; \
+	      fi;\
 	    else : ; fi; \
 	  done; \
 	done
@@ -231,6 +237,8 @@ uninstall:
 	@for file in $(INFO_DEPS); do \
 	  echo "rm -f $(DESTDIR)$(infodir)/$$file{,-[0-9],.info,.info-[0-9]}"; \
 	  rm -f $(DESTDIR)$(infodir)/$$file{,-[0-9],.info,.info-[0-9]}; \
+	  echo "rm -f $(DESTDIR)$(infodir)/$$file{,-[0-9],.info,.info-[0-9]}.gz"; \
+	  rm -f $(DESTDIR)$(infodir)/$$file{,-[0-9],.info,.info-[0-9]}.gz; \
 	done
 
 tmps:
diff --git a/texi/gnus.texi b/texi/gnus.texi
index c77d4db..9165112 100644
--- a/texi/gnus.texi
+++ b/texi/gnus.texi
@@ -28385,6 +28385,21 @@ New features in Ma Gnus:
 
 @itemize @bullet
 
+@item Installation changes
+@c ***********************
+
+@itemize @bullet
+@item
+Lisp source files and info files to be installed will be compressed by
+gzip by default.
+
+If you don't want those files to be compressed, use the configure option
+@samp{--without-compress-install}.  Lisp source files that don't have
+the compiled elc version in the installation directory will not be
+compressed.
+
+@end itemize
+
 @item Changes in summary and article mode
 @c **************************************
 
diff --git a/texi/infohack.el b/texi/infohack.el
index f4d468d..3cd72e0 100644
--- a/texi/infohack.el
+++ b/texi/infohack.el
@@ -161,10 +161,10 @@ which are indicated by the @copying ... @end copying command."
 	  (expand-file-name (file-name-nondirectory buffer-file-name)
 			    default-directory))
     (setq buffer-file-coding-system coding-system)
-    (if (> (buffer-size) (if (boundp 'Info-split-threshold)
-			     (+ 50000 Info-split-threshold)
-			   100000))
-	(Info-split))
+    ;;(if (> (buffer-size) (if (boundp 'Info-split-threshold)
+    ;;			       (+ 50000 Info-split-threshold)
+    ;;			     100000))
+    ;;	  (Info-split))
     (save-buffer)))
 
 (eval-and-compile

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 ChangeLog        |    6 ++++++
 Makefile.in      |    4 ++--
 configure.in     |   20 ++++++++++++++++++++
 lisp/ChangeLog   |    5 +++++
 lisp/Makefile.in |   12 +++++++++++-
 texi/ChangeLog   |   12 ++++++++++++
 texi/Makefile.in |   18 +++++++++++++-----
 texi/gnus.texi   |   15 +++++++++++++++
 texi/infohack.el |    8 ++++----
 9 files changed, 88 insertions(+), 12 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project