Added a wrinkle to the version.c build in the Unix makefile, which
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 7 Feb 2004 18:10:54 +0000 (18:10 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 7 Feb 2004 18:10:54 +0000 (18:10 +0000)
will validate an md5sums manifest and if all md5sums match will use
a version number provided in a file. This should allow me to produce
a Unix release source archive with the property that when unpacked
and built it will produce binaries advertising themselves as
`Release X.YZ', but as soon as the user starts fiddling with the
sources it will revert to `Unidentified build' (though of course the
user can still _explicitly_ ask for a release tag, and in fact this
will override the default if any default is specified).

git-svn-id: svn://svn.tartarus.org/sgt/putty@3818 cda61777-01e9-0310-a592-d414129be87e

mkfiles.pl

index be9f01f..87c2dba 100755 (executable)
@@ -834,7 +834,11 @@ print
 "version.o: FORCE;\n".
 "# Hack to force version.o to be rebuilt always\n".
 "FORCE:\n".
-"\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) \$(VER) -c ../version.c\n".
+"\tif test -z \"\$(VER)\" && (cd ..; md5sum -c manifest); then \\\n".
+"\t\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) `cat ../version.def` -c ../version.c; \\\n".
+"\telse \\\n".
+"\t\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) \$(VER) -c ../version.c; \\\n".
+"\tfi\n".
 "clean:\n".
 "\trm -f *.o". (join "", map { " $_" } &progrealnames("XU")) . "\n".
 "\n",