]> git.eshelyaron.com Git - emacs.git/commitdiff
Stop keeping doc/emacs/emacsver.texi in the repository
authorGlenn Morris <rgm@gnu.org>
Mon, 10 Nov 2014 00:17:17 +0000 (16:17 -0800)
committerGlenn Morris <rgm@gnu.org>
Mon, 10 Nov 2014 00:17:17 +0000 (16:17 -0800)
* configure.ac (doc/emacs/emacsver.texi): Generate it.

* make-dist (doc/emacs/emacsver.texi) [update]: No longer check it.

* doc/emacs/Makefile.in (top_srcdir, version): New, set by configure.
(doc-emacsver): New rule.
(bootstrap-clean, maintainer-clean): Delete emacsver.texi.
(emacsver.texi.in): Rename from emacsver.texi.

* admin/admin.el (set-version): No need to update doc/emacs/emacsver.texi.
(make-manuals-dist-output-variables): Add top_srcdir.
(make-manuals-dist--1): Handle @version@ specially.

* .bzrignore: Add doc/emacs/emacsver.texi.

ChangeLog
admin/ChangeLog
admin/admin.el
configure.ac
doc/emacs/ChangeLog
doc/emacs/Makefile.in
doc/emacs/emacsver.texi [deleted file]
doc/emacs/emacsver.texi.in [new file with mode: 0644]
make-dist

index 24e883b3cea084c5716d96de550a5593f94f6dc4..07c334c3548122c10463ad2044cf9f0ac4a69ca0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,15 @@
+2014-11-10  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac (doc/emacs/emacsver.texi): Generate it.
+       * make-dist (doc/emacs/emacsver.texi) [update]: No longer check it.
+
 2014-11-08  Dani Moncayo  <dmoncayo@gmail.com>
 
-       * build-aux/msys-to-w32: simplify the initial over-engineered
+       * build-aux/msys-to-w32: Simplify the initial over-engineered
        interface, and the implementation.
        * Makefile.in (epaths-force-w32): Update for the above.  Also
-       simplify, assuming that the shell is bash (which is the case in
-       MSYS).
-       (msys_w32prefix_subst, msys_sed_sh_escape): Remove (no longer
-       used).
+       simplify, assuming that the shell is bash (which is the case in MSYS).
+       (msys_w32prefix_subst, msys_sed_sh_escape): Remove (no longer used).
 
 2014-11-05  Glenn Morris  <rgm@gnu.org>
 
index e85c21a6cf990819b2df5e92358a5786f17e471c..2ec447b133c36af39a189b966b2e7647b19c20b2 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-10  Glenn Morris  <rgm@gnu.org>
+
+       * admin.el (set-version): No need to update doc/emacs/emacsver.texi.
+       (make-manuals-dist-output-variables): Add top_srcdir.
+       (make-manuals-dist--1): Handle @version@ specially.
+
 2014-11-09  Eric Ludlam <zappo@gnu.org>
 
        * grammars/c.by (template-type): Add :template-specifier and
index 48e083d77898c43d15a6dd057b6e14487b815e0d..14d851eb2028bd49c346c56630800c19244a1ccd 100644 (file)
@@ -94,9 +94,6 @@ Root must be the root of an Emacs source tree."
                       (rx (and "AC_INIT" (1+ (not (in ?,)))
                                 ?, (0+ space)
                                 (submatch (1+ (in "0-9."))))))
-  (set-version-in-file root "doc/emacs/emacsver.texi" version
-                      (rx (and "EMACSVER" (1+ space)
-                               (submatch (1+ (in "0-9."))))))
   (set-version-in-file root "doc/man/emacs.1" version
                       (rx (and ".TH EMACS" (1+ not-newline)
                                 "GNU Emacs" (1+ space)
@@ -611,7 +608,7 @@ style=\"text-align:left\">")
 
 \f
 (defconst make-manuals-dist-output-variables
-  `(("@srcdir@" . ".")
+  `(("@\\(top_\\)?srcdir@" . ".")      ; top_srcdir is wrong, but not used
     ("^\\(\\(?:texinfo\\|buildinfo\\|emacs\\)dir *=\\).*" . "\\1 .")
     ("^\\(clean:.*\\)" . "\\1 infoclean")
     ("@MAKEINFO@" . "makeinfo")
@@ -655,11 +652,13 @@ style=\"text-align:left\">")
                   (string-match-p "\\.\\(eps\\|pdf\\)\\'" file)))
          (copy-file file stem)))
     (with-temp-buffer
-      (insert-file-contents (format "../doc/%s/Makefile.in" type))
-      (dolist (cons make-manuals-dist-output-variables)
-       (while (re-search-forward (car cons) nil t)
-         (replace-match (cdr cons) t))
-       (goto-char (point-min)))
+      (let ((outvars make-manuals-dist-output-variables))
+       (push `("@version@" . ,version) outvars)
+       (insert-file-contents (format "../doc/%s/Makefile.in" type))
+       (dolist (cons outvars)
+         (while (re-search-forward (car cons) nil t)
+           (replace-match (cdr cons) t))
+         (goto-char (point-min))))
       (let (ats)
        (while (re-search-forward "@[a-zA-Z_]+@" nil t)
          (setq ats t)
index cb42ed6c7246c26972804d4a03e2fedbb936926f..f7aa407265da964a778388272d885a9e9ab2b59e 100644 (file)
@@ -5174,6 +5174,11 @@ if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
 fi
 ])
 
+AC_CONFIG_COMMANDS([doc/emacs/emacsver.texi], [
+${MAKE-make} -s --no-print-directory -C doc/emacs doc-emacsver || \
+AC_MSG_ERROR(['doc/emacs/emacsver.texi' could not be made.])
+])
+
 AC_OUTPUT
 
 test "$MAKE" = make || AC_MSG_NOTICE([Now you can run '$MAKE'.])
index 0ca6af0e648a46a68d3240ffcad8805e86c5b574..68ac9f5af78a9d1467698a92c60970074470a27d 100644 (file)
@@ -1,3 +1,10 @@
+2014-11-10  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (top_srcdir, version): New, set by configure.
+       (doc-emacsver): New rule.
+       (bootstrap-clean, maintainer-clean): Delete emacsver.texi.
+       (emacsver.texi.in): Rename from emacsver.texi.
+
 2014-11-09  Juri Linkov  <juri@jurta.org>
 
        * search.texi (Other Repeating Search): Add documentation for
index 67c324e1f9d4a53c1ba2e0adde8a891922fd335c..d03a9fc6eaced2bb417f9645896bc97c8a8faaae 100644 (file)
@@ -26,6 +26,10 @@ SHELL = @SHELL@
 # of the source tree.  This is set by configure's `--srcdir' option.
 srcdir=@srcdir@
 
+top_srcdir = @top_srcdir@
+
+version = @version@
+
 ## Where the output files go.
 ## Note that the setfilename command in the .texi files assumes this.
 ## This is a bit funny.  Because the info files are in the
@@ -178,6 +182,18 @@ emacs-xtra.pdf: $(EMACS_XTRA)
 %.ps: %.dvi
        $(DVIPS) -o $@ $<
 
+.PHONY: doc-emacsver
+
+# If configure were to just generate emacsver.texi from emacsver.texi.in
+# in the normal way, the timestamp of emacsver.texi would always be
+# newer than that of the info files, which are prebuilt in release tarfiles.
+# So we use this rule, and move-if-change, to avoid that.
+doc-emacsver:
+       sed 's/[@]version@/${version}/' \
+         ${srcdir}/emacsver.texi.in > emacsver.texi.in.$$$$ && \
+         ${top_srcdir}/build-aux/move-if-change emacsver.texi.in.$$$$ \
+         ${srcdir}/emacsver.texi
+
 .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean infoclean
 
 ## Temp files.
@@ -200,6 +216,7 @@ infoclean:
          $(buildinfodir)/emacs.info-[1-9][0-9]
 
 bootstrap-clean maintainer-clean: distclean infoclean
+       rm -f ${srcdir}/emacsver.texi
 
 .PHONY: install-dvi install-html install-pdf install-ps install-doc
 
diff --git a/doc/emacs/emacsver.texi b/doc/emacs/emacsver.texi
deleted file mode 100644 (file)
index ac01c18..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-@c It would be nicer to generate this using configure and @version@.
-@c However, that would mean emacsver.texi would always be newer
-@c then the info files in release tarfiles.
-@set EMACSVER 25.0.50
diff --git a/doc/emacs/emacsver.texi.in b/doc/emacs/emacsver.texi.in
new file mode 100644 (file)
index 0000000..fa68512
--- /dev/null
@@ -0,0 +1,2 @@
+@c configure generates emacsver.texi from emacsver.texi.in via a Makefile rule
+@set EMACSVER @version@
index 3202f1f0e69b9efa2817fb43788b831067ea05ca..bbb0f95bb4cd3c39d716e1b8ef7606e76887c722 100755 (executable)
--- a/make-dist
+++ b/make-dist
@@ -169,9 +169,8 @@ fi
 echo Version number is $version
 
 if [ $update = yes ]; then
-  if ! grep -q "@set EMACSVER  *${version}" doc/emacs/emacsver.texi || \
-     ! grep -q "tree holds version  *${version}" README; then
-    echo "WARNING: README and/or emacsver.texi have the wrong version number"
+  if ! grep -q "tree holds version  *${version}" README; then
+    echo "WARNING: README has the wrong version number"
     echo "Consider running M-x set-version from admin/admin.el"
     sleep 5
   fi