Source-Changes-HG archive

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

[src/trunk]: src/share/mk If CPPFLAGS or CXXFLAGS already contains -nostdinc ...



details:   https://anonhg.NetBSD.org/src/rev/3c7f36ed5451
branches:  trunk
changeset: 749348:3c7f36ed5451
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Fri Nov 27 11:44:36 2009 +0000

description:
If CPPFLAGS or CXXFLAGS already contains -nostdinc or -nostdinc++,
don't add ${CPPFLAGS_ISYSTEM} or ${CPPFLAGS_ISYSTEMXX} to refer
${DESTDIR}/usr/include or ${DESTDIR}/usr/include/g++.

This change might cause errors on some MD stand dir, but in that case
each Makefile should be fixed to search proper system include paths
by -Ipath option in own CPPFLAGS.

diffstat:

 share/mk/bsd.lib.mk  |  6 +++++-
 share/mk/bsd.prog.mk |  6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diffs (45 lines):

diff -r 647b1f3f6705 -r 3c7f36ed5451 share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk       Fri Nov 27 11:23:50 2009 +0000
+++ b/share/mk/bsd.lib.mk       Fri Nov 27 11:44:36 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.lib.mk,v 1.298 2009/04/10 16:16:12 apb Exp $
+#      $NetBSD: bsd.lib.mk,v 1.299 2009/11/27 11:44:36 tsutsui Exp $
 #      @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94
 
 .include <bsd.init.mk>
@@ -72,9 +72,13 @@
 
 # Use purely kernel private headers in rump builds
 .if !defined(RUMPKERNEL)
+.if empty(CPPFLAGS:M-nostdinc)
 CPPFLAGS+=     ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}
+.endif
+.if empty(CXXFLAGS:M-nostdinc++)
 CXXFLAGS+=     ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++}
 .endif
+.endif
 
 .if !defined(SHLIB_MAJOR) && exists(${SHLIB_VERSION_FILE})             # {
 SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major
diff -r 647b1f3f6705 -r 3c7f36ed5451 share/mk/bsd.prog.mk
--- a/share/mk/bsd.prog.mk      Fri Nov 27 11:23:50 2009 +0000
+++ b/share/mk/bsd.prog.mk      Fri Nov 27 11:44:36 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.prog.mk,v 1.242 2009/05/12 18:07:54 plunky Exp $
+#      $NetBSD: bsd.prog.mk,v 1.243 2009/11/27 11:44:36 tsutsui Exp $
 #      @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
 
 .ifndef HOSTPROG
@@ -53,8 +53,12 @@
 .endif
 
 ##### Default values
+.if empty(CPPFLAGS:M-nostdinc)
 CPPFLAGS+=     ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}
+.endif
+.if empty(CXXFLAGS:M-nostdinc++)
 CXXFLAGS+=     ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++}
+.endif
 CFLAGS+=       ${COPTS}
 OBJCFLAGS+=    ${OBJCOPTS}
 MKDEP_SUFFIXES?=       .o .ln



Home | Main Index | Thread Index | Old Index