]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Added a wrinkle to the version.c build in the Unix makefile, which
authorSimon Tatham <anakin@pobox.com>
Sat, 7 Feb 2004 18:10:54 +0000 (18:10 +0000)
committerSimon Tatham <anakin@pobox.com>
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).

[originally from svn r3818]

mkfiles.pl

index be9f01fff1d6d201064ca05a28c5bfc9f200ad8a..87c2dba9ccce11c80c608b4175508cdcbe988e52 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",