Source-Changes-HG archive

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

[src/trunk]: src/share/mk Like everywhere else make sure DESTDIR is not empty...



details:   https://anonhg.NetBSD.org/src/rev/fb9552b7be18
branches:  trunk
changeset: 374518:fb9552b7be18
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Apr 29 20:31:59 2023 +0000

description:
Like everywhere else make sure DESTDIR is not empty before using it.
Otherwise if it is empty before we were adding an optargless -d, which
ended up using the next argument (a -Isomething) after the recent change
to xlint.c related to sysroot. This broke using the native tools make
with the cross toolchain (for example typing make in /usr/src/bin/ls)
to build and install a single program.

diffstat:

 share/mk/bsd.sys.mk |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r fc43320fa98b -r fb9552b7be18 share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk       Sat Apr 29 13:21:31 2023 +0000
+++ b/share/mk/bsd.sys.mk       Sat Apr 29 20:31:59 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.sys.mk,v 1.312 2023/01/22 15:20:01 rillig Exp $
+#      $NetBSD: bsd.sys.mk,v 1.313 2023/04/29 20:31:59 christos Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -163,7 +163,9 @@ CWARNFLAGS+=        ${CWARNFLAGS.${ACTIVE_CC}}
 CPPFLAGS+=     ${AUDIT:D-D__AUDIT__}
 _NOWERROR=     ${defined(NOGCCERROR) || (${ACTIVE_CC} == "clang" && defined(NOCLANGERROR)):?yes:no}
 CFLAGS+=       ${${_NOWERROR} == "no" :?-Werror:} ${CWARNFLAGS}
-LINTFLAGS+=    ${DESTDIR:D-d ${DESTDIR}}
+.if !empty(DESTDIR)
+LINTFLAGS+=    -d ${DESTDIR}
+.endif
 
 .if !defined(NOSSP) && (${USE_SSP:Uno} != "no") && (${BINDIR:Ux} != "/usr/mdec")
 .   if !defined(KERNSRCDIR) && !defined(KERN) # not for kernels / kern modules



Home | Main Index | Thread Index | Old Index