From: simon Date: Sat, 7 Feb 2004 18:10:54 +0000 (+0000) Subject: Added a wrinkle to the version.c build in the Unix makefile, which X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/commitdiff_plain/3a0e1b79fb6a88b0dab1d1eb5e1ce54502ad47f1 Added a wrinkle to the version.c build in the Unix makefile, which 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 --- diff --git a/mkfiles.pl b/mkfiles.pl index be9f01ff..87c2dba9 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -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",