Source-Changes-HG archive

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

[src/trunk]: src/sys/conf Add the rest of the infrastructure needed to suppor...



details:   https://anonhg.NetBSD.org/src/rev/26545990edcc
branches:  trunk
changeset: 518951:26545990edcc
user:      atatat <atatat%NetBSD.org@localhost>
date:      Sat Dec 08 15:01:41 2001 +0000

description:
Add the rest of the infrastructure needed to support the rest of the
ports.  This includes cleaning out DBG, cleaning up the `clean'
target, and tweaking the warnings flags (cesfic, amigappc, and the arm
ports are a little less warning resistant).

Oh, and let's `install' the kernel into ${DESTDIR} if someone says
`make install'.  We have to think about cross-compilers here.

diffstat:

 sys/conf/Makefile.kern.inc |  35 ++++++++++++++++++++++++++---------
 1 files changed, 26 insertions(+), 9 deletions(-)

diffs (74 lines):

diff -r 21fdc83b6a95 -r 26545990edcc sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc        Sat Dec 08 12:06:12 2001 +0000
+++ b/sys/conf/Makefile.kern.inc        Sat Dec 08 15:01:41 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.kern.inc,v 1.6 2001/11/28 03:58:25 atatat Exp $
+#      $NetBSD: Makefile.kern.inc,v 1.7 2001/12/08 15:01:41 atatat Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. There are
@@ -44,11 +44,22 @@
 CPPFLAGS+=     ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT
 DEFCOPTS?=     -O2
 COPTS?=                ${DEFCOPTS}
-CWARNFLAGS+=   -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes \
-               -Wpointer-arith -Wno-main
+DBG=           # might contain unwanted -Ofoo
+DEFWARNINGS?=  yes
+.if (${DEFWARNINGS} == "yes")
+CWARNFLAGS+=   -Werror -Wall -Wno-main
+WEAK_POINTERS?=        no
+.if !(${WEAK_POINTERS} == "yes")
+CWARNFLAGS+=   -Wpointer-arith
+.endif
+LOOSE_PROTOTYPES?= no
+.if !(${LOOSE_PROTOTYPES} == "yes")
+CWARNFLAGS+=   -Wmissing-prototypes -Wstrict-prototypes
+.endif
 # XXX Delete -Wuninitialized for now, since the compiler doesn't
 # XXX always get it right.  --thorpej
 CWARNFLAGS+=   -Wno-uninitialized
+.endif
 CFLAGS+=       ${DEBUG} ${COPTS} ${CWARNFLAGS}
 AFLAGS+=       -D_LOCORE
 
@@ -151,6 +162,7 @@
 .if ${DEBUG} == "-g"
 SYSTEM_LD_TAIL+=${SYSTEM_LD_TAIL_DEBUG}
 LINKFLAGS+=    ${LINKFLAGS_DEBUG}
+EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.gdb@}
 .else
 LINKFLAGS+=    ${LINKFLAGS_NORMAL}
 .endif
@@ -193,9 +205,14 @@
 .if !target(__CLEANKERNEL)
 __CLEANKERNEL: .USE
        @echo "${.TARGET}ing the kernel objects"
-       rm -f eddep *netbsd netbsd.gdb tags *.[io] [a-z]*.s \
+       rm -f ${KERNELS} eddep tags *.[io] [a-z]*.s vers.c \
            [Ee]rrs linterrs makelinks assym.h.tmp assym.h \
-           ${EXTRA_CLEAN}
+           ${EXTRA_KERNELS} ${EXTRA_CLEAN}
+.endif
+
+.if !target(kernelnames)
+kernelnames:
+       @echo "${KERNELS} ${EXTRA_KERNELS}"
 .endif
 
 .if !target(__CLEANDEPEND)
@@ -248,10 +265,10 @@
 install: install-kernel-${MACHINE_NAME}
 .if !target(install-kernel-${MACHINE_NAME}})
 install-kernel-${MACHINE_NAME}:
-       rm -f /onetbsd
-       ln /netbsd /onetbsd
-       cp netbsd /nnetbsd
-       mv /nnetbsd /netbsd
+       rm -f ${DESTDIR}/onetbsd
+       ln ${DESTDIR}/netbsd ${DESTDIR}/onetbsd
+       cp netbsd ${DESTDIR}/nnetbsd
+       mv ${DESTDIR}/nnetbsd ${DESTDIR}/netbsd
 .endif
 .endif
 



Home | Main Index | Thread Index | Old Index