Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.bin/xlint/lint1 tests/lint1: fix build error "must...



details:   https://anonhg.NetBSD.org/src/rev/2c8a723c0b98
branches:  trunk
changeset: 961457:2c8a723c0b98
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Apr 20 21:20:24 2021 +0000

description:
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

diffstat:

 tests/usr.bin/xlint/lint1/Makefile |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r 1d542050e44f -r 2c8a723c0b98 tests/usr.bin/xlint/lint1/Makefile
--- a/tests/usr.bin/xlint/lint1/Makefile        Tue Apr 20 17:42:31 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/Makefile        Tue Apr 20 21:20:24 2021 +0000
@@ -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+=                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



Home | Main Index | Thread Index | Old Index