]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Now we use Subversion, it seems excessive to have an individual $Id$
authorSimon Tatham <anakin@pobox.com>
Wed, 17 Nov 2004 18:16:59 +0000 (18:16 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 17 Nov 2004 18:16:59 +0000 (18:16 +0000)
line for every single .but file at the bottom of each page of the
HTML PuTTY docs. However, we can't _always_ replace that with a
single SVN revision, because there isn't always one available (SVN
still allows mixed working copies in which some files are
deliberately checked out against a different revision).

Hence, here's a mechanism for doing better. It uses `svnversion .'
to determine _whether_ a single revision number adequately describes
the current directory, and replaces all the version IDs with that if
so. If it can't do that, it uses the version IDs as before.

Also, this allows an explicit version string to be passed on the
make command line which will override _both_ these possibilities, so
that release documentation can be clearly labelled with the release
version number.

[originally from svn r4804]

17 files changed:
CHECKLST.txt
doc/Makefile
doc/blurb.but
doc/config.but
doc/errors.but
doc/faq.but
doc/feedback.but
doc/gs.but
doc/intro.but
doc/licence.but
doc/pageant.but
doc/plink.but
doc/pscp.but
doc/psftp.but
doc/pubkey.but
doc/using.but
doc/vids.but [new file with mode: 0644]

index 2be089e32a924e6c464ea528b8a9a4dd9148a86a..5c6d2cf161099ec287b4cda28b26b89ce11c4be8 100644 (file)
@@ -119,7 +119,10 @@ of the tag.
     + Make sure Owen has kept the Alpha release link maps somewhere
       useful.
 
- - Run Halibut to build the docs.
+ - Run Halibut to build the docs. Define VERSION on the make command
+   line to override the version strings, since Subversion revision
+   numbers are less meaningful on a tag.
+    + make -C doc VERSION="PuTTY release 0.XX"
 
  - Build the binary archives putty.zip (one for each architecture):
    each one just contains all the .exe files except PuTTYtel, and
index 6820f933fe311a2ccd7a10f5358d571eb9adab95..eb472d988a017ed1c16ac995c880bd670c15f772 100644 (file)
@@ -1,14 +1,46 @@
+all: man index.html
+
+# Decide on the versionid policy.
+#
+# If the user has passed in $(VERSION) on the command line (`make
+# VERSION="Release 0.56"'), we use that as an explicit version
+# string. Otherwise, we use `svnversion' to examine the checked-out
+# documentation source, and if that returns a single revision
+# number then we invent a version string reflecting just that
+# number. Failing _that_, we resort to versionids.but which shows a
+# $Id for each individual file.
+#
+# So here, we define VERSION using svnversion if it isn't already
+# defined ...
+ifndef VERSION
+SVNVERSION=$(shell test -d .svn && svnversion .)
+BADCHARS=$(findstring :,$(SVNVERSION))$(findstring S,$(SVNVERSION))
+ifeq ($(BADCHARS),)
+ifneq ($(SVNVERSION),)
+VERSION=Built from revision $(patsubst M,,$(SVNVERSION))
+endif
+endif
+endif
+# ... and now, we condition our build behaviour on whether or not
+# VERSION _is_ defined.
+ifdef VERSION
+VERSIONIDS=vstr
+vstr.but: FORCE
+       echo \\versionid $(VERSION) > vstr.but
+FORCE:;
+else
+VERSIONIDS=vids
+endif
+
 CHAPTERS := $(SITE) blurb intro gs using config pscp psftp plink pubkey
 CHAPTERS += pageant errors faq feedback licence
-CHAPTERS += index
+CHAPTERS += index $(VERSIONIDS)
 
 INPUTS = $(patsubst %,%.but,$(CHAPTERS))
 
 # This is temporary. Hack it locally or something.
 HALIBUT = $(HOME)/src/halibut/build/halibut
 
-all: man index.html
-
 index.html: $(INPUTS)
        $(HALIBUT) --text --html --winhelp $(INPUTS)
 
@@ -25,4 +57,4 @@ puttytel.1: man-ptel.but mancfg.but; $(MKMAN)
 pterm.1: man-pter.but mancfg.but; $(MKMAN)
 
 clean:
-       rm -f *.html *.txt *.hlp *.cnt *.1
+       rm -f *.html *.txt *.hlp *.cnt *.1 vstr.but
index cb0722e258b03a8f13a16f53c55b8b090f0da056..2c2b19b6513b336b861ce148688ec3e64f015b04 100644 (file)
@@ -1,3 +1,5 @@
+\define{versionidblurb} \versionid $Id$
+
 \title PuTTY User Manual
 
 \cfg{xhtml-leaf-level}{1}
@@ -26,5 +28,3 @@ Unix-specific documentation that currently exists is the man pages.
 \copyright This manual is copyright 2001-2004 Simon Tatham. All
 rights reserved. You may distribute this documentation under the MIT
 licence. See \k{licence} for the licence text in full.
-
-\versionid $Id: blurb.but,v 1.13 2004/10/24 22:57:36 jacob Exp $
index 59a551fc71835b78ba3e70a00d6050541cbda610..1dacb51907dea0ec5f2aca3dd20f42cd72dc2c44 100644 (file)
@@ -1,4 +1,4 @@
-\versionid $Id: config.but,v 1.97 2004/11/09 17:57:32 simon Exp $
+\define{versionidconfig} \versionid $Id$
 
 \C{config} Configuring PuTTY
 
index 66579ef6ddf5f90cd301b522b48226465a707965..c5f80436fcf28e70644baf78dbe0c39f9084f188 100644 (file)
@@ -1,4 +1,4 @@
-\versionid $Id: errors.but,v 1.10 2004/09/27 00:23:19 jacob Exp $
+\define{versioniderrors} \versionid $Id$
 
 \C{errors} Common error messages
 
index fea60ffaabd2f47af97eeb32f45da76503b62ead..52f7c0389635dae9011a7d207d1fe930c7642d90 100644 (file)
@@ -1,4 +1,4 @@
-\versionid $Id$
+\define{versionidfaq} \versionid $Id$
 
 \A{faq} PuTTY FAQ
 
index fadc00784c0196f5e1707154a87137b94d6671dc..b0b1d652cec859816e556172d826c60f57d1ba4f 100644 (file)
@@ -1,4 +1,4 @@
-\versionid $Id: feedback.but,v 1.20 2004/11/15 15:57:28 jacob Exp $
+\define{versionidfeedback} \versionid $Id$
 
 \A{feedback} Feedback and bug reporting
 
index 043d65fe3a0f54cf2be6001fcc3328ddedff7da4..26607233d6bc9a7c24265d1a621cbd3bea141531 100644 (file)
@@ -1,4 +1,4 @@
-\versionid $Id: gs.but,v 1.9 2004/10/24 16:24:58 jacob Exp $
+\define{versionidgs} \versionid $Id$
 
 \C{gs} Getting started with PuTTY
 
index aab1504f0f87fa76cbbab6ebeb319ce7a965f0f7..ab9b04e4df10d82f917d3273cd0db47d63baab24 100644 (file)
@@ -1,4 +1,4 @@
-\versionid $Id: intro.but,v 1.7 2004/10/24 15:58:31 jacob Exp $
+\define{versionidintro} \versionid $Id$
 
 \C{intro} Introduction to PuTTY
 
index 76368092014dd9377f54660f025aa18d7ad6ddd1..8a76e5f606a89ef4f523633150481b2a494f11d9 100644 (file)
@@ -1,4 +1,4 @@
-\versionid $Id: licence.but,v 1.7 2004/08/30 13:23:23 simon Exp $
+\define{versionidlicence} \versionid $Id$
 
 \A{licence} PuTTY Licence
 
index d08563e98aba97671c4ca75ae2eb3989d633088f..7e8a1988ad8d4f8a265e10f30b7d9e74964fbd17 100644 (file)
@@ -1,4 +1,4 @@
-\versionid $Id: pageant.but,v 1.11 2004/05/22 11:09:31 simon Exp $
+\define{versionidpageant} \versionid $Id$
 
 \C{pageant} Using Pageant for authentication
 
index e4cb0bc303853aa4812f76833cf7c52a0c3bb19c..abcf42fefec4b57ad6093605a802aafe347381a6 100644 (file)
@@ -1,4 +1,4 @@
-\versionid $Id: plink.but,v 1.26 2004/10/15 23:32:01 jacob Exp $
+\define{versionidplink} \versionid $Id$
 
 \C{plink} Using the command-line connection tool Plink
 
index 9154fbd1f479c851d888bd3c7d37ea8b88f601f8..e5f1778ceadf216f381140e8a5f99337976b85f4 100644 (file)
@@ -1,4 +1,4 @@
-\versionid $Id: pscp.but,v 1.29 2004/08/03 13:23:48 jacob Exp $
+\define{versionidpscp} \versionid $Id$
 
 \#FIXME: Need examples
 
index d18b1e7093ff46f77743712d49f52e8e6846bb0c..0b9f07004218f352bdb8c6aa1f8a67e1feec34d5 100644 (file)
@@ -1,4 +1,4 @@
-\versionid $Id: psftp.but,v 1.7 2004/10/24 18:30:10 jacob Exp $
+\define{versionidpsftp} \versionid $Id$
 
 \C{psftp} Using PSFTP to transfer files securely
 
index 8b9a3f9526668624d8f27ac07520b8afbefd626e..a8b9a33061a880d06cf1e0d91068a81e820ef247 100644 (file)
@@ -1,4 +1,4 @@
-\versionid $Id: pubkey.but,v 1.22 2004/05/06 11:27:58 simon Exp $
+\define{versionidpubkey} \versionid $Id$
 
 \C{pubkey} Using public keys for SSH authentication
 
index a3415887c92c3013f630aef0d3da97eb96513ea4..7390506604b54ca91756ac5e8f311a72c7172766 100644 (file)
@@ -1,4 +1,4 @@
-\versionid $Id: using.but,v 1.37 2004/10/24 16:48:43 jacob Exp $
+\define{versionidusing} \versionid $Id$
 
 \C{using} Using PuTTY
 
diff --git a/doc/vids.but b/doc/vids.but
new file mode 100644 (file)
index 0000000..93d2416
--- /dev/null
@@ -0,0 +1,30 @@
+\# Invoke the versionid macros defined in all the other manual
+\# chapter files.
+
+\versionidblurb
+
+\versionidintro
+
+\versionidgs
+
+\versionidusing
+
+\versionidconfig
+
+\versionidpscp
+
+\versionidpsftp
+
+\versionidplink
+
+\versionidpubkey
+
+\versionidpageant
+
+\versioniderrors
+
+\versionidfaq
+
+\versionidfeedback
+
+\versionidlicence