summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-02-01 17:19:54 +0000
committerBruce Evans <bde@FreeBSD.org>1998-02-01 17:19:54 +0000
commit021886ff876f5bf1ef951d8c87f94b17d0ed1bdc (patch)
treeea70286acb099d6cf81c043dd3288d202d3455a3
parentf63999476c134b84094bd6670789377b42dd6c97 (diff)
Notes
-rw-r--r--share/mk/bsd.kmod.mk15
-rw-r--r--sys/conf/kmod.mk15
2 files changed, 24 insertions, 6 deletions
diff --git a/share/mk/bsd.kmod.mk b/share/mk/bsd.kmod.mk
index 9cf946e3b10f..d48e9c40d339 100644
--- a/share/mk/bsd.kmod.mk
+++ b/share/mk/bsd.kmod.mk
@@ -1,5 +1,5 @@
# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
-# $Id: bsd.kmod.mk,v 1.41 1997/11/09 15:03:13 wosch Exp $
+# $Id: bsd.kmod.mk,v 1.42 1998/01/26 20:36:38 bde Exp $
#
# The include file <bsd.kmod.mk> handles installing Loadable Kernel Modules.
#
@@ -92,10 +92,19 @@ MODUNLOAD?= /sbin/modunload
CFLAGS+= ${COPTS} -DKERNEL -DACTUALLY_LKM_NOT_KERNEL ${CWARNFLAGS}
-# Add -I paths for system headers. Individual LKM makefiles don't need any
-# -I paths for this. Most of them need .PATH statement(s) for non-headers.
+# Don't use any standard or source-relative include directories.
+# Since -nostdinc will annull any previous -I paths, we repeat all
+# such paths after -nostdinc. It doesn't seem to be possible to
+# add to the front of `make' variable.
+_ICFLAGS:= ${CFLAGS:M-I*}
+CFLAGS+= -nostdinc -I- ${_ICFLAGS}
+
+# Add -I paths for system headers. Individual LKM makefiles don't
+# need any -I paths for this. Similar defaults for .PATH can't be
+# set because there are no standard paths for non-headers.
CFLAGS+= -I${.OBJDIR} -I${.OBJDIR}/@
+# XXX this is now dubious.
.if defined(DESTDIR)
CFLAGS+= -I${DESTDIR}/usr/include
.endif
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index 9cf946e3b10f..d48e9c40d339 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -1,5 +1,5 @@
# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
-# $Id: bsd.kmod.mk,v 1.41 1997/11/09 15:03:13 wosch Exp $
+# $Id: bsd.kmod.mk,v 1.42 1998/01/26 20:36:38 bde Exp $
#
# The include file <bsd.kmod.mk> handles installing Loadable Kernel Modules.
#
@@ -92,10 +92,19 @@ MODUNLOAD?= /sbin/modunload
CFLAGS+= ${COPTS} -DKERNEL -DACTUALLY_LKM_NOT_KERNEL ${CWARNFLAGS}
-# Add -I paths for system headers. Individual LKM makefiles don't need any
-# -I paths for this. Most of them need .PATH statement(s) for non-headers.
+# Don't use any standard or source-relative include directories.
+# Since -nostdinc will annull any previous -I paths, we repeat all
+# such paths after -nostdinc. It doesn't seem to be possible to
+# add to the front of `make' variable.
+_ICFLAGS:= ${CFLAGS:M-I*}
+CFLAGS+= -nostdinc -I- ${_ICFLAGS}
+
+# Add -I paths for system headers. Individual LKM makefiles don't
+# need any -I paths for this. Similar defaults for .PATH can't be
+# set because there are no standard paths for non-headers.
CFLAGS+= -I${.OBJDIR} -I${.OBJDIR}/@
+# XXX this is now dubious.
.if defined(DESTDIR)
CFLAGS+= -I${DESTDIR}/usr/include
.endif