Substitute date and version into docs when we do gitdist
authorSteve McIntyre <steve@einval.com>
Wed, 27 Nov 2019 17:56:37 +0000 (17:56 +0000)
committerSteve McIntyre <steve@einval.com>
Wed, 27 Nov 2019 18:09:59 +0000 (18:09 +0000)
.gitignore
Makefile
README.in [moved from README with 99% similarity]
jigdump.1.in [moved from jigdump.1 with 92% similarity]
jigit-mkimage.1.in [moved from jigit-mkimage.1 with 98% similarity]
jigsum-sha256.1.in [moved from jigsum-sha256.1 with 94% similarity]
jigsum.1.in [moved from jigsum.1 with 95% similarity]
mkjigsnap.8.in [moved from mkjigsnap.8 with 99% similarity]
parallel-sums.1.in [moved from parallel-sums.1 with 96% similarity]

index 64cec94..aaa4ea6 100644 (file)
@@ -11,3 +11,6 @@ jigsum
 jigsum-sha256
 parallel-sums
 rsyncsum
+*.8
+*.1
+README
index e7a448b..5c61856 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -42,11 +42,18 @@ clean:
 distclean: clean
        -make -C libjte distclean
 
+docdist:
+       for file in *.in; do \
+         OUT=$$(echo $$file | sed 's/\.in$$//'); \
+         sed "s/@VERSION@/$$VERSION/g;s/@MON_YEAR@/$$MON_YEAR/g" $$file > $$OUT; \
+       done
+
 # Create source tarball from git. Complicated some - do autoconf dance
 # in there too
 gitdist:       Makefile
                @VERSION=$$(git describe | awk '{gsub("^.*/","");gsub("^v","");print $$0}'); \
-               echo "VERSION is $$VERSION"; \
+               MON_YEAR=$$(date '+%B %Y'); \
+               echo "VERSION is $$VERSION, MON_YEAR is \"$$MON_YEAR\""; \
                OUTPUT="jigit-$$VERSION"; \
                WD=$$(pwd); \
                if [ -e "../$$OUTPUT.tar.xz" ]; then \
@@ -60,7 +67,9 @@ gitdist:      Makefile
                echo "Creating working dir in ../$$OUTPUT"; \
                git archive --format=tar --prefix="$$OUTPUT/" HEAD | tar -C .. -xf - ; \
                echo "Running autoconf then cleanup in ../$$OUTPUT"; \
-               cd ../$$OUTPUT/libjte && ./bootstrap && rm -rf autom4te.cache && cd $$WD; \
+               cd ../$$OUTPUT/libjte && ./bootstrap && rm -rf autom4te.cache && \
+                 cd .. && make docdist VERSION="$$VERSION" MON_YEAR="$$MON_YEAR" && rm -f *.in; \
                echo "Creating dist tarball in ../$$OUTPUT.tar.xz"; \
-               tar -C .. -c --xz -f ../$$OUTPUT.tar.xz $$OUTPUT; rm -rf ../$$OUTPUT
+               tar -C .. -c --xz -f ../$$OUTPUT.tar.xz $$OUTPUT; rm -rf ../$$OUTPUT; \
+               cd $$WD;
 
similarity index 99%
rename from README
rename to README.in
index af24d32..6733840 100644 (file)
--- a/README
+++ b/README.in
@@ -1,7 +1,7 @@
 README for JTE version @VERSION@
 
 Steve McIntyre <steve@einval.com>
-@DATE@
+@MON_YEAR@
 
 License - GPL v2+. See the file COPYING for more details.
 
similarity index 92%
rename from jigdump.1
rename to jigdump.1.in
index 48450c1..0396f8b 100644 (file)
--- a/jigdump.1
@@ -1,4 +1,4 @@
-.TH JIGDUMP 1 "November 2019" "Jigit jigdo tools"
+.TH JIGDUMP 1 "@MON_YEAR@" "Jigit jigdo tools"
 .SH NAME
 jigdump \- Dump the contents of a template file
 .SH SYNOPSIS
similarity index 98%
rename from jigit-mkimage.1
rename to jigit-mkimage.1.in
index 294b83b..86998a4 100644 (file)
@@ -1,4 +1,4 @@
-.TH JIGIT-MKIMAGE 1 "November 2019" "Jigit jigdo tools"
+.TH JIGIT-MKIMAGE 1 "@MON_YEAR@" "Jigit jigdo tools"
 .SH NAME
 jigit-mkimage \- Create an ISO image from jigdo files
 .SH SYNOPSIS
similarity index 94%
rename from jigsum-sha256.1
rename to jigsum-sha256.1.in
index 917bcec..ae92e8c 100644 (file)
@@ -1,4 +1,4 @@
-.TH JIGSUM-SHA256 1 "November 2019" "Jigit jigdo tools"
+.TH JIGSUM-SHA256 1 "@MON_YEAR@" "Jigit jigdo tools"
 .SH NAME
 jigsum-sha256 \- List SHA256 sums of files in jigdo's base64-like format
 .SH SYNOPSIS
similarity index 95%
rename from jigsum.1
rename to jigsum.1.in
index fbcd3ae..9476004 100644 (file)
--- a/jigsum.1
@@ -1,4 +1,4 @@
-.TH JIGSUM 1 "November 2019" "Jigit jigdo tools"
+.TH JIGSUM 1 "@MON_YEAR@" "Jigit jigdo tools"
 .SH NAME
 jigsum \- List MD5 sums of files in jigdo's bas64-alike format
 .SH SYNOPSIS
similarity index 99%
rename from mkjigsnap.8
rename to mkjigsnap.8.in
index 725aa26..fb12147 100644 (file)
@@ -1,4 +1,4 @@
-.TH MKJIGSNAP 8 "November 2019" "Jigit jigdo tools"
+.TH MKJIGSNAP 8 "@MON_YEAR@" "Jigit jigdo tools"
 .SH NAME
 mkjigsnap \- Create a snapshot tree on a jigdo server
 .SH SYNOPSIS
similarity index 96%
rename from parallel-sums.1
rename to parallel-sums.1.in
index 002089c..66691c1 100644 (file)
@@ -1,4 +1,4 @@
-.TH PARALLEL-SUMS 1 "November 2019" "Jigit jigdo tools"
+.TH PARALLEL-SUMS 1 "@MON_YEAR@" "Jigit jigdo tools"
 .SH NAME
 parallel-sums \- Calculate checksums in parallel using multiple algorithms
 .SH SYNOPSIS