Module Name: src Committed By: sjg Date: Sat Aug 19 01:34:21 UTC 2023
Modified Files: src/usr.bin/make/unit-tests: varmod-mtime.exp varmod-mtime.mk Log Message: varmod-mtime.mk: use :localtime for %s Add a comment to explain why ${%s:L:localtime} should be used to get a value that matches time(3). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/varmod-mtime.exp \ src/usr.bin/make/unit-tests/varmod-mtime.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/unit-tests/varmod-mtime.exp diff -u src/usr.bin/make/unit-tests/varmod-mtime.exp:1.3 src/usr.bin/make/unit-tests/varmod-mtime.exp:1.4 --- src/usr.bin/make/unit-tests/varmod-mtime.exp:1.3 Thu Aug 17 19:06:51 2023 +++ src/usr.bin/make/unit-tests/varmod-mtime.exp Sat Aug 19 01:34:21 2023 @@ -1,8 +1,8 @@ -make: "varmod-mtime.mk" line 58: Cannot determine mtime for 'no/such/file1': <ENOENT> -make: "varmod-mtime.mk" line 58: Cannot determine mtime for 'no/such/file2': <ENOENT> -make: "varmod-mtime.mk" line 58: Malformed conditional (${no/such/file1 no/such/file2:L:mtime=error}) -make: "varmod-mtime.mk" line 69: Invalid argument 'errorhandler-no' for modifier ':mtime' -make: "varmod-mtime.mk" line 69: Malformed conditional (${MAKEFILE:mtime=errorhandler-no} > 0) +make: "varmod-mtime.mk" line 60: Cannot determine mtime for 'no/such/file1': <ENOENT> +make: "varmod-mtime.mk" line 60: Cannot determine mtime for 'no/such/file2': <ENOENT> +make: "varmod-mtime.mk" line 60: Malformed conditional (${no/such/file1 no/such/file2:L:mtime=error}) +make: "varmod-mtime.mk" line 71: Invalid argument 'errorhandler-no' for modifier ':mtime' +make: "varmod-mtime.mk" line 71: Malformed conditional (${MAKEFILE:mtime=errorhandler-no} > 0) make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/varmod-mtime.mk diff -u src/usr.bin/make/unit-tests/varmod-mtime.mk:1.3 src/usr.bin/make/unit-tests/varmod-mtime.mk:1.4 --- src/usr.bin/make/unit-tests/varmod-mtime.mk:1.3 Thu Aug 17 19:06:51 2023 +++ src/usr.bin/make/unit-tests/varmod-mtime.mk Sat Aug 19 01:34:21 2023 @@ -1,9 +1,11 @@ -# $NetBSD: varmod-mtime.mk,v 1.3 2023/08/17 19:06:51 rillig Exp $ +# $NetBSD: varmod-mtime.mk,v 1.4 2023/08/19 01:34:21 sjg Exp $ # # Tests for the ':mtime' variable modifier, which maps each word of the # expression to that file's modification time. -start:= ${%s:L:gmtime} +# Note: strftime() uses mktime() for %s and mktime() assumes localtime +# so this should match time() +start:= ${%s:L:localtime} # Ensure that this makefile exists and has a modification time. If the file