From 0ff3ad4e5e1ce008c705fc16283f36cbca38a2e2 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sun, 2 Oct 1994 21:50:51 +0000 Subject: [PATCH] In case CWARNFLAGS and COPTFLAGS are already defined (from /etc/make.conf for instance), don't nuke them. --- sys/conf/Makefile.i386 | 6 +++++- sys/conf/Makefile.powerpc | 6 +++++- sys/i386/conf/Makefile.i386 | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index 75337fa60c2..70eacf4809c 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.40 1994/10/01 02:55:56 davidg Exp $ +# $Id: Makefile.i386,v 1.41 1994/10/01 21:43:24 rgrimes Exp $ # # Makefile for FreeBSD # @@ -42,7 +42,9 @@ S= ../.. .endif I386= ${S}/i386 +.if !defined(CWARNFLAGS) CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls +.endif # # The following flag is next up for working on: # -Wnested-externs @@ -50,7 +52,9 @@ CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls # When working on removing warnings from code, the `-Werror' flag should be # of material assistance. # +.if !defined(COPTFLAGS) COPTFLAGS=-O +.endif INCLUDES= -I. -I$S -I$S/sys COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ASFLAGS= diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index 75337fa60c2..70eacf4809c 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.40 1994/10/01 02:55:56 davidg Exp $ +# $Id: Makefile.i386,v 1.41 1994/10/01 21:43:24 rgrimes Exp $ # # Makefile for FreeBSD # @@ -42,7 +42,9 @@ S= ../.. .endif I386= ${S}/i386 +.if !defined(CWARNFLAGS) CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls +.endif # # The following flag is next up for working on: # -Wnested-externs @@ -50,7 +52,9 @@ CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls # When working on removing warnings from code, the `-Werror' flag should be # of material assistance. # +.if !defined(COPTFLAGS) COPTFLAGS=-O +.endif INCLUDES= -I. -I$S -I$S/sys COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ASFLAGS= diff --git a/sys/i386/conf/Makefile.i386 b/sys/i386/conf/Makefile.i386 index 75337fa60c2..70eacf4809c 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.40 1994/10/01 02:55:56 davidg Exp $ +# $Id: Makefile.i386,v 1.41 1994/10/01 21:43:24 rgrimes Exp $ # # Makefile for FreeBSD # @@ -42,7 +42,9 @@ S= ../.. .endif I386= ${S}/i386 +.if !defined(CWARNFLAGS) CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls +.endif # # The following flag is next up for working on: # -Wnested-externs @@ -50,7 +52,9 @@ CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls # When working on removing warnings from code, the `-Werror' flag should be # of material assistance. # +.if !defined(COPTFLAGS) COPTFLAGS=-O +.endif INCLUDES= -I. -I$S -I$S/sys COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ASFLAGS=