[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6030] configure substitutions instead of version.texi for @VERSION@ and
From: |
karl |
Subject: |
[6030] configure substitutions instead of version.texi for @VERSION@ and @ UPDATED@ |
Date: |
Fri, 09 Jan 2015 01:14:24 +0000 |
Revision: 6030
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6030
Author: karl
Date: 2015-01-09 01:14:23 +0000 (Fri, 09 Jan 2015)
Log Message:
-----------
configure substitutions instead of version.texi for @VERSION@ and @UPDATED@
Modified Paths:
--------------
trunk/texindex/ChangeLog
trunk/texindex/Makefile.am
trunk/texindex/ti.twjr
Removed Paths:
-------------
trunk/texindex/version.texi
Modified: trunk/texindex/ChangeLog
===================================================================
--- trunk/texindex/ChangeLog 2015-01-09 00:41:20 UTC (rev 6029)
+++ trunk/texindex/ChangeLog 2015-01-09 01:14:23 UTC (rev 6030)
@@ -1,5 +1,10 @@
2015-01-08 Karl Berry <address@hidden>
+ * version.texi: remove, no easy way to automatically update it.
+ * ti.twjr,
+ * Makefile.am (do_subst, texindex.awk, ti.texi): use substitutions
+ for @VERSION@ and @UPDATED@ instead.
+
* texindex.in: also look for ../share/texinfo/texindex.awk,
relative to dirname $0.
Modified: trunk/texindex/Makefile.am
===================================================================
--- trunk/texindex/Makefile.am 2015-01-09 00:41:20 UTC (rev 6029)
+++ trunk/texindex/Makefile.am 2015-01-09 01:14:23 UTC (rev 6030)
@@ -39,31 +39,43 @@
# ../util/srclist.txt).
noinst_SCRIPTS = jrtangle jrweave
-# configure-time variables we use in texindex.in.
+# configure-time variables we use in texindex.in or ti.twjr.
+# Unlike regular Automake, we have to allow for @@VERSION@@,
+# which jrweave generates in the code segment.
do_subst = sed -e 's,address@hidden@],$(pkgdatadir),g' \
-e 's,address@hidden@],$(AWK),g' \
-e 's,address@hidden@],$(PACKAGE),g' \
- -e 's,address@hidden@],$(VERSION),g'
+ -e 's,address@hidden@address@hidden@]*,$(VERSION),g'
# build the texindex shell wrapper from texindex.in, following automake.
texindex: texindex.in Makefile
$(do_subst) <$(srcdir)/texindex.in >texindex
chmod +x texindex
-# build texindex.awk from ti.twjr using jrtangle.
+# build texindex.awk from ti.twjr using jrtangle; that creates
+# texindex.awk (hardwired). Then we substitute configure-time variables
+# to avoid manually updates of the version number.
+#
texindex.awk: ti.twjr
- $(AWK) -f $(srcdir)/jrtangle $(srcdir)/ti.twjr >texindex.awk \
- || rm -f texindex.awk
+ $(AWK) -f $(srcdir)/jrtangle $(srcdir)/ti.twjr || rm -f texindex.awk
+ $(do_subst) <texindex.awk >texindex.awk-tmp
+ mv texindex.awk-tmp texindex.awk
# how to build the pdf of the program-as-document.
ti.pdf: ti.texi
texi2pdf --tidy ti.texi
-
+ti.info: ti.texi
+ makeinfo --no-split ti.texi
ti.html: ti.texi
makeinfo --no-split --html ti.texi
+# unlink jrtangle, jrweave outputs to stdout; and we want the
+# usual UPDATED string.
ti.texi: ti.twjr
- $(AWK) -f $(srcdir)/jrweave $(srcdir)/ti.twjr >ti.texi || rm -f $@
+ UPDATED=`$(top_srcdir)/build-aux/mdate-sh $(srcdir)/ti.twjr`; \
+ $(AWK) -f $(srcdir)/jrweave $(srcdir)/ti.twjr \
+ | $(do_subst) -e "s,address@hidden@],$$UPDATED,g" \
+ >ti.texi || rm -f ti.texi
# just a fun cartoon used in the literate document.
EXTRA_DIST += dek_idx.png
Modified: trunk/texindex/ti.twjr
===================================================================
--- trunk/texindex/ti.twjr 2015-01-09 00:41:20 UTC (rev 6029)
+++ trunk/texindex/ti.twjr 2015-01-09 01:14:23 UTC (rev 6030)
@@ -3,8 +3,7 @@
@c $Id$
@c %**start of header (This is for running Texinfo on a region.)
@setfilename texindex.info
address@hidden version.texi
address@hidden Texindex @value{VERSION}: A program for sorting indices
address@hidden Texindex @VERSION@: A program for sorting indices
@c %**end of header (This is for running Texinfo on a region.)
@c Better brace handling, this texindex is needed to process!
@@ -22,10 +21,9 @@
@synindex cr cp
@copying
-This @command{texindex} program (version @value{VERSION},
address@hidden) sorts the raw index files created by
address@hidden (This Texinfo source is a literate program written
-using address@hidden, not a user manual.)
+This @command{texindex} program (version @VERSION@, @UPDATED@) sorts the
+raw index files created by @file{texinfo.tex}. (This Texinfo source is
+a literate program written using address@hidden, not a user manual.)
Copyright @copyright{} 2014, 2015 Free Software Foundation, Inc.
@@ -47,7 +45,7 @@
@titlepage
@title Texindex
address@hidden version @value{VERSION}, @value{UPDATED}
address@hidden version @VERSION@, @UPDATED@
@author Arnold D. Robbins
@author and Texinfo maintainers
@page
@@ -61,8 +59,8 @@
@node Top
@top Texindex
-This file defines @command{texindex} (version @value{VERSION},
address@hidden), an @code{awk} program that processes the raw index
+This file defines @command{texindex} (version @VERSION@,
address@hidden@), an @code{awk} program that processes the raw index
files produced by the @file{texinfo.tex} file.
@end ifnottex
@@ -306,7 +304,7 @@
EXIT_SUCCESS = 0
EXIT_FAILURE = 1
-Texindex_version = "5.2+dev"
+Texindex_version = "@VERSION@"
if (! Invocation_name) {
# provide fallback in case it's not passed in.
Invocation_name = "texindex"
@@ -837,9 +835,9 @@
Most characters map to their ASCII code. We add 512 to the value of
each of the digits. Both uppercase and lowercase letters map to the
same numeric value, which is the ASCII code for the uppercase letter
-plus address@hidden code should also work for EBCDIC systems,
+plus 512. (This code should also work for EBCDIC systems,
although @TeX{} does everything in ASCII, so it's not likely to make a
-difference.}
+difference.)
The table must be built completely before changing the mapping of the
letters, because all of the uppercase and lowercase letters must be in
Deleted: trunk/texindex/version.texi
===================================================================
--- trunk/texindex/version.texi 2015-01-09 00:41:20 UTC (rev 6029)
+++ trunk/texindex/version.texi 2015-01-09 01:14:23 UTC (rev 6030)
@@ -1,4 +0,0 @@
address@hidden UPDATED 15 December 2014
address@hidden UPDATED-MONTH December 2014
address@hidden EDITION 5.2+dev
address@hidden VERSION 5.2+dev
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6030] configure substitutions instead of version.texi for @VERSION@ and @ UPDATED@,
karl <=