Stop keeping doc/emacs/emacsver.texi in the repository

* 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.
This commit is contained in:
Glenn Morris 2014-11-09 16:17:17 -08:00
parent 5d4da32d4e
commit a16d6f90ee
9 changed files with 55 additions and 21 deletions

View file

@ -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> 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. interface, and the implementation.
* Makefile.in (epaths-force-w32): Update for the above. Also * Makefile.in (epaths-force-w32): Update for the above. Also
simplify, assuming that the shell is bash (which is the case in simplify, assuming that the shell is bash (which is the case in MSYS).
MSYS). (msys_w32prefix_subst, msys_sed_sh_escape): Remove (no longer used).
(msys_w32prefix_subst, msys_sed_sh_escape): Remove (no longer
used).
2014-11-05 Glenn Morris <rgm@gnu.org> 2014-11-05 Glenn Morris <rgm@gnu.org>

View 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> 2014-11-09 Eric Ludlam <zappo@gnu.org>
* grammars/c.by (template-type): Add :template-specifier and * grammars/c.by (template-type): Add :template-specifier and

View file

@ -94,9 +94,6 @@ Root must be the root of an Emacs source tree."
(rx (and "AC_INIT" (1+ (not (in ?,))) (rx (and "AC_INIT" (1+ (not (in ?,)))
?, (0+ space) ?, (0+ space)
(submatch (1+ (in "0-9.")))))) (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 (set-version-in-file root "doc/man/emacs.1" version
(rx (and ".TH EMACS" (1+ not-newline) (rx (and ".TH EMACS" (1+ not-newline)
"GNU Emacs" (1+ space) "GNU Emacs" (1+ space)
@ -611,7 +608,7 @@ style=\"text-align:left\">")
(defconst make-manuals-dist-output-variables (defconst make-manuals-dist-output-variables
`(("@srcdir@" . ".") `(("@\\(top_\\)?srcdir@" . ".") ; top_srcdir is wrong, but not used
("^\\(\\(?:texinfo\\|buildinfo\\|emacs\\)dir *=\\).*" . "\\1 .") ("^\\(\\(?:texinfo\\|buildinfo\\|emacs\\)dir *=\\).*" . "\\1 .")
("^\\(clean:.*\\)" . "\\1 infoclean") ("^\\(clean:.*\\)" . "\\1 infoclean")
("@MAKEINFO@" . "makeinfo") ("@MAKEINFO@" . "makeinfo")
@ -655,11 +652,13 @@ style=\"text-align:left\">")
(string-match-p "\\.\\(eps\\|pdf\\)\\'" file))) (string-match-p "\\.\\(eps\\|pdf\\)\\'" file)))
(copy-file file stem))) (copy-file file stem)))
(with-temp-buffer (with-temp-buffer
(insert-file-contents (format "../doc/%s/Makefile.in" type)) (let ((outvars make-manuals-dist-output-variables))
(dolist (cons make-manuals-dist-output-variables) (push `("@version@" . ,version) outvars)
(while (re-search-forward (car cons) nil t) (insert-file-contents (format "../doc/%s/Makefile.in" type))
(replace-match (cdr cons) t)) (dolist (cons outvars)
(goto-char (point-min))) (while (re-search-forward (car cons) nil t)
(replace-match (cdr cons) t))
(goto-char (point-min))))
(let (ats) (let (ats)
(while (re-search-forward "@[a-zA-Z_]+@" nil t) (while (re-search-forward "@[a-zA-Z_]+@" nil t)
(setq ats t) (setq ats t)

View file

@ -5174,6 +5174,11 @@ if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
fi 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 AC_OUTPUT
test "$MAKE" = make || AC_MSG_NOTICE([Now you can run '$MAKE'.]) test "$MAKE" = make || AC_MSG_NOTICE([Now you can run '$MAKE'.])

View 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> 2014-11-09 Juri Linkov <juri@jurta.org>
* search.texi (Other Repeating Search): Add documentation for * search.texi (Other Repeating Search): Add documentation for

View file

@ -26,6 +26,10 @@ SHELL = @SHELL@
# of the source tree. This is set by configure's `--srcdir' option. # of the source tree. This is set by configure's `--srcdir' option.
srcdir=@srcdir@ srcdir=@srcdir@
top_srcdir = @top_srcdir@
version = @version@
## Where the output files go. ## Where the output files go.
## Note that the setfilename command in the .texi files assumes this. ## Note that the setfilename command in the .texi files assumes this.
## This is a bit funny. Because the info files are in the ## This is a bit funny. Because the info files are in the
@ -178,6 +182,18 @@ emacs-xtra.pdf: $(EMACS_XTRA)
%.ps: %.dvi %.ps: %.dvi
$(DVIPS) -o $@ $< $(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 .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean infoclean
## Temp files. ## Temp files.
@ -200,6 +216,7 @@ infoclean:
$(buildinfodir)/emacs.info-[1-9][0-9] $(buildinfodir)/emacs.info-[1-9][0-9]
bootstrap-clean maintainer-clean: distclean infoclean bootstrap-clean maintainer-clean: distclean infoclean
rm -f ${srcdir}/emacsver.texi
.PHONY: install-dvi install-html install-pdf install-ps install-doc .PHONY: install-dvi install-html install-pdf install-ps install-doc

View file

@ -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

View file

@ -0,0 +1,2 @@
@c configure generates emacsver.texi from emacsver.texi.in via a Makefile rule
@set EMACSVER @version@

View file

@ -169,9 +169,8 @@ fi
echo Version number is $version echo Version number is $version
if [ $update = yes ]; then if [ $update = yes ]; then
if ! grep -q "@set EMACSVER *${version}" doc/emacs/emacsver.texi || \ if ! grep -q "tree holds version *${version}" README; then
! grep -q "tree holds version *${version}" README; then echo "WARNING: README has the wrong version number"
echo "WARNING: README and/or emacsver.texi have the wrong version number"
echo "Consider running M-x set-version from admin/admin.el" echo "Consider running M-x set-version from admin/admin.el"
sleep 5 sleep 5
fi fi