Module Name: src
Committed By: rillig
Date: Tue Apr 20 21:20:24 UTC 2021
Modified Files:
src/tests/usr.bin/xlint/lint1: Makefile
Log Message:
tests/lint1: fix build error "must name an existing directory"
The build failed with this error message:
x86_64--netbsd-install: the last argument (/.../emit.ln) must
name an existing directory
The cause for this message was that ${DESTDIR}/.../emit.ln has
${DESTDIR}/.../emit.c as implicit target, which is kind of correct but
unintended in this case. Because of this, the command 'install' was run
like this:
install ${NETBSDSRCDIR}/.../emit.ln ${DESTDIR}/.../emit.c \
${DESTDIR}/.../emit.ln
To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/tests/usr.bin/xlint/lint1/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/usr.bin/xlint/lint1/Makefile
diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.46 src/tests/usr.bin/xlint/lint1/Makefile:1.47
--- src/tests/usr.bin/xlint/lint1/Makefile:1.46 Sun Apr 18 23:05:26 2021
+++ src/tests/usr.bin/xlint/lint1/Makefile Tue Apr 20 21:20:24 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.46 2021/04/18 23:05:26 rillig Exp $
+# $NetBSD: Makefile,v 1.47 2021/04/20 21:20:24 rillig Exp $
NOMAN= # defined
MAX_MESSAGE= 343 # see lint1/err.c
@@ -111,6 +111,16 @@ FILES+= ${:U0 ${:U:${:Urange=${MAX_MESS
FILES+= op_colon.c
FILES+= op_colon.exp
+# ----- begin hack -----
+# Prevent that ${DESTDIR}/emit.ln gets ${DESTDIR}/emit.c as implicit source.
+# The suffix transformation rule '.c.ln' thinks that ${DESTDIR}/emit.ln should
+# depend in ${DESTDIR}/emit.c, but these files are not intended to depend on
+# each other, they have these suffixes just for convenience and convention.
+.if make(install)
+${DESTDIR}${FILESDIR}/emit.ln: .PHONY
+.endif
+# ----- end hack -----
+
# Note: only works for adding tests.
# To remove a test, the $$mi file must be edited manually.
sync-mi: .PHONY