From 070e3ec139d2f68a8d6b90fbd2570add55e4e5ca Mon Sep 17 00:00:00 2001 From: Nate Williams Date: Wed, 5 Apr 1995 04:10:58 +0000 Subject: [PATCH] Modify behavior of INCLUDES to never look in /usr/include unless we can't find the src/include directory. Reviewed by: "Rodney W. Grimes" Submitted by: Mike Pritchard --- sys/conf/Makefile.i386 | 10 ++++++++-- sys/conf/Makefile.powerpc | 10 ++++++++-- sys/i386/conf/Makefile.i386 | 10 ++++++++-- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index 4bcd03fa721..14f83083008 100644 --- a/sys/conf/Makefile.i386 +++ b/sys/conf/Makefile.i386 @@ -1,6 +1,6 @@ # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $Id: Makefile.i386,v 1.60 1995/03/28 08:02:37 bde Exp $ +# $Id: Makefile.i386,v 1.61 1995/04/03 01:13:50 nate Exp $ # # Makefile for FreeBSD # @@ -36,7 +36,13 @@ CWARNFLAGS?=-W -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit # COPTFLAGS?=-O # Not ready for -I- yet. #include "foo.h" where foo.h is in the srcdir fails. -INCLUDES= -nostdinc -I. -I$S -I$S/sys -I$S/../include -I/usr/include +INCLUDES= -nostdinc -I. -I$S -I$S/sys +# This hack is to allow kernel compiles to succeed on machines w/out srcdist +.if exists($S/../include) +INCLUDES+= -I$S/../include +.else +INCLUDES+= -I/usr/include +.endif COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ASFLAGS= CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index 4bcd03fa721..14f83083008 100644 --- a/sys/conf/Makefile.powerpc +++ b/sys/conf/Makefile.powerpc @@ -1,6 +1,6 @@ # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $Id: Makefile.i386,v 1.60 1995/03/28 08:02:37 bde Exp $ +# $Id: Makefile.i386,v 1.61 1995/04/03 01:13:50 nate Exp $ # # Makefile for FreeBSD # @@ -36,7 +36,13 @@ CWARNFLAGS?=-W -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit # COPTFLAGS?=-O # Not ready for -I- yet. #include "foo.h" where foo.h is in the srcdir fails. -INCLUDES= -nostdinc -I. -I$S -I$S/sys -I$S/../include -I/usr/include +INCLUDES= -nostdinc -I. -I$S -I$S/sys +# This hack is to allow kernel compiles to succeed on machines w/out srcdist +.if exists($S/../include) +INCLUDES+= -I$S/../include +.else +INCLUDES+= -I/usr/include +.endif COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ASFLAGS= CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} diff --git a/sys/i386/conf/Makefile.i386 b/sys/i386/conf/Makefile.i386 index 4bcd03fa721..14f83083008 100644 --- a/sys/i386/conf/Makefile.i386 +++ b/sys/i386/conf/Makefile.i386 @@ -1,6 +1,6 @@ # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $Id: Makefile.i386,v 1.60 1995/03/28 08:02:37 bde Exp $ +# $Id: Makefile.i386,v 1.61 1995/04/03 01:13:50 nate Exp $ # # Makefile for FreeBSD # @@ -36,7 +36,13 @@ CWARNFLAGS?=-W -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit # COPTFLAGS?=-O # Not ready for -I- yet. #include "foo.h" where foo.h is in the srcdir fails. -INCLUDES= -nostdinc -I. -I$S -I$S/sys -I$S/../include -I/usr/include +INCLUDES= -nostdinc -I. -I$S -I$S/sys +# This hack is to allow kernel compiles to succeed on machines w/out srcdist +.if exists($S/../include) +INCLUDES+= -I$S/../include +.else +INCLUDES+= -I/usr/include +.endif COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ASFLAGS= CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}