summaryrefslogtreecommitdiff
path: root/doc/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'doc/emacs')
-rw-r--r--doc/emacs/ChangeLog7
-rw-r--r--doc/emacs/Makefile.in17
-rw-r--r--doc/emacs/emacsver.texi4
-rw-r--r--doc/emacs/emacsver.texi.in2
4 files changed, 26 insertions, 4 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 0ca6af0e648..68ac9f5af78 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -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
diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in
index 67c324e1f9d..d03a9fc6eac 100644
--- a/doc/emacs/Makefile.in
+++ b/doc/emacs/Makefile.in
@@ -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
index ac01c185bc1..00000000000
--- a/doc/emacs/emacsver.texi
+++ /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
index 00000000000..fa685125301
--- /dev/null
+++ b/doc/emacs/emacsver.texi.in
@@ -0,0 +1,2 @@
+@c configure generates emacsver.texi from emacsver.texi.in via a Makefile rule
+@set EMACSVER @version@