Module Name:    src
Committed By:   rillig
Date:           Sun Feb 14 13:24:45 UTC 2021

Modified Files:
        src/usr.bin/make/unit-tests: Makefile

Log Message:
make: fix TMPDIR in unit-tests

Combining the assignment operator ':=' with the variable modifier ':U'
on the same variable does not work as intended.  At the point where the
':U' is evaluated, the variable is guaranteed to be defined because the
code in VarAssign_EvalSubst says so.


To generate a diff of this commit:
cvs rdiff -u -r1.269 -r1.270 src/usr.bin/make/unit-tests/Makefile

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/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.269 src/usr.bin/make/unit-tests/Makefile:1.270
--- src/usr.bin/make/unit-tests/Makefile:1.269	Sat Feb  6 18:26:03 2021
+++ src/usr.bin/make/unit-tests/Makefile	Sun Feb 14 13:24:45 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.269 2021/02/06 18:26:03 sjg Exp $
+# $NetBSD: Makefile,v 1.270 2021/02/14 13:24:45 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -622,8 +622,10 @@ LANG=		C
 .if ${.OBJDIR} != ${.CURDIR}
 # easy
 TMPDIR:=	${.OBJDIR}/tmp
+.elif defined(TMPDIR)
+TMPDIR:=	${TMPDIR}/uid${.MAKE.UID}
 .else
-TMPDIR:=	${TMPDIR:U/tmp}/uid${.MAKE.UID}
+TMPDIR:=	/tmp/uid${.MAKE.UID}
 .endif
 # make sure it exists
 .if !exist(${TMPDIR})

Reply via email to