Module Name: src Committed By: rillig Date: Sat Oct 31 21:40:20 UTC 2020
Modified Files: src/usr.bin/make: var.c src/usr.bin/make/unit-tests: varmod-gmtime.exp varmod-localtime.exp Log Message: make(1): make parsing of the :gmtime and :localtime modifiers stricter These variable modifiers accept an optional timestamp in seconds, to select which date to print. This feature is only used very rarely. The NetBSD build doesn't use it at all, and the FreeBSD build mainly uses the plain modifiers :gmtime and :localtime, but not their optional argument :gmtime=1500000000. Therefore, this change is not going to affect many builds. Those that are indeed affected had been wrong all the time anyway. At parse time, these errors stop the build, as intended. After that, when the actual shell commands of the targets are expanded and run, these errors don't stop anything, the build just continues as if nothing had happened. This is a general problem with Var_Parse, see the many "handle errors" markers in the code. Another problem is that on parse errors, parsing continues and spits out spurious strings of the form "mtime" and "ocaltime". This as well is a general problem with error handling in make. ok sjg To generate a diff of this commit: cvs rdiff -u -r1.630 -r1.631 src/usr.bin/make/var.c cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/varmod-gmtime.exp cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/varmod-localtime.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.