summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/alpha/conf/Makefile.alpha46
-rw-r--r--sys/conf/Makefile.alpha46
-rw-r--r--sys/conf/Makefile.i38656
-rw-r--r--sys/conf/Makefile.pc9856
-rw-r--r--sys/conf/Makefile.powerpc56
-rw-r--r--sys/i386/conf/Makefile.i38656
-rw-r--r--sys/pc98/conf/Makefile.pc9856
-rw-r--r--usr.sbin/config/main.c20
-rw-r--r--usr.sbin/config/mkmakefile.c25
9 files changed, 320 insertions, 97 deletions
diff --git a/sys/alpha/conf/Makefile.alpha b/sys/alpha/conf/Makefile.alpha
index e2ccd567c7cd..0253ae344292 100644
--- a/sys/alpha/conf/Makefile.alpha
+++ b/sys/alpha/conf/Makefile.alpha
@@ -1,7 +1,7 @@
# Makefile.alpha -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.alpha 7.1 5/10/91
-# $Id: Makefile.alpha,v 1.17 1999/02/02 18:34:23 dfr Exp $
+# $Id: Makefile.alpha,v 1.18 1999/02/14 13:56:15 des Exp $
#
# Makefile for FreeBSD
#
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 300009
+%VERSREQ= 300010
BINFORMAT?= elf
@@ -103,9 +103,9 @@ ${SYSTEM_OBJS}: ${BEFORE_DEPEND:M*.h}
.endif
clean:
- rm -f *.o *.s eddep errs genassym gensetdefs kernel linterrs \
- makelinks param.c setdefs.h symbols.exclude symbols.sort tags \
- vers.c vnode_if.c vnode_if.h ${CLEAN}
+ rm -f *.o *.s eddep errs genassym gensetdefs ${KERNEL} ${FULLKERNEL} \
+ linterrs makelinks param.c setdefs.h symbols.exclude \
+ symbols.sort tags vers.c vnode_if.c vnode_if.h ${CLEAN}
#lint: /tmp param.c
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} \
@@ -245,23 +245,43 @@ links:
tags:
@echo "see $S/kern/Makefile for tags"
-install:
- @if [ ! -f kernel ] ; then \
+.if defined(DEBUG)
+install: ${KERNEL}
+.if exists(${DESTDIR}/${KERNEL})
+ -chflags noschg ${DESTDIR}/${KERNEL}
+ mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
+.endif
+ PATH=$${PATH}:/sbin:/usr/sbin; \
+ if [ `sysctl -n kern.bootfile` = ${DESTDIR}/${KERNEL} ] ; then \
+ sysctl -w kern.bootfile=${DESTDIR}/${KERNEL}.old ; \
+ if [ -f /var/db/kvm_kernel.db ] ; then \
+ mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db ; \
+ fi \
+ fi
+ install -c -m 555 -o root -g wheel -fschg ${KERNEL} ${DESTDIR}/
+
+${KERNEL}: ${KERNEL}.debug
+ objcopy --strip-debug ${KERNEL}.debug ${KERNEL}
+
+.endif
+
+${INSTALL}:
+ @if [ ! -f ${FULLKERNEL} ] ; then \
echo "You must first build your kernel before trying to install." ; \
exit 1 ; \
fi
-.if exists(${DESTDIR}/kernel)
- -chflags noschg ${DESTDIR}/kernel
- mv ${DESTDIR}/kernel ${DESTDIR}/kernel.old
+.if exists(${DESTDIR}/${KERNEL})
+ -chflags noschg ${DESTDIR}/${KERNEL}
+ mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
.endif
PATH=$${PATH}:/sbin:/usr/sbin; \
- if [ `sysctl -n kern.bootfile` = ${DESTDIR}/kernel ] ; then \
- sysctl -w kern.bootfile=${DESTDIR}/kernel.old ; \
+ if [ `sysctl -n kern.bootfile` = ${DESTDIR}/${KERNEL} ] ; then \
+ sysctl -w kern.bootfile=${DESTDIR}/${KERNEL}.old ; \
if [ -f /var/db/kvm_kernel.db ] ; then \
mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db ; \
fi \
fi
- install -c -m 555 -o root -g wheel -fschg kernel ${DESTDIR}/
+ install -c -m 555 -o root -g wheel -fschg ${FULLKERNEL} ${DESTDIR}/${KERNEL}
ioconf.o: ioconf.c $S/sys/param.h $S/sys/buf.h
${CC} -c ${CFLAGS} ioconf.c
diff --git a/sys/conf/Makefile.alpha b/sys/conf/Makefile.alpha
index e2ccd567c7cd..0253ae344292 100644
--- a/sys/conf/Makefile.alpha
+++ b/sys/conf/Makefile.alpha
@@ -1,7 +1,7 @@
# Makefile.alpha -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.alpha 7.1 5/10/91
-# $Id: Makefile.alpha,v 1.17 1999/02/02 18:34:23 dfr Exp $
+# $Id: Makefile.alpha,v 1.18 1999/02/14 13:56:15 des Exp $
#
# Makefile for FreeBSD
#
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 300009
+%VERSREQ= 300010
BINFORMAT?= elf
@@ -103,9 +103,9 @@ ${SYSTEM_OBJS}: ${BEFORE_DEPEND:M*.h}
.endif
clean:
- rm -f *.o *.s eddep errs genassym gensetdefs kernel linterrs \
- makelinks param.c setdefs.h symbols.exclude symbols.sort tags \
- vers.c vnode_if.c vnode_if.h ${CLEAN}
+ rm -f *.o *.s eddep errs genassym gensetdefs ${KERNEL} ${FULLKERNEL} \
+ linterrs makelinks param.c setdefs.h symbols.exclude \
+ symbols.sort tags vers.c vnode_if.c vnode_if.h ${CLEAN}
#lint: /tmp param.c
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} \
@@ -245,23 +245,43 @@ links:
tags:
@echo "see $S/kern/Makefile for tags"
-install:
- @if [ ! -f kernel ] ; then \
+.if defined(DEBUG)
+install: ${KERNEL}
+.if exists(${DESTDIR}/${KERNEL})
+ -chflags noschg ${DESTDIR}/${KERNEL}
+ mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
+.endif
+ PATH=$${PATH}:/sbin:/usr/sbin; \
+ if [ `sysctl -n kern.bootfile` = ${DESTDIR}/${KERNEL} ] ; then \
+ sysctl -w kern.bootfile=${DESTDIR}/${KERNEL}.old ; \
+ if [ -f /var/db/kvm_kernel.db ] ; then \
+ mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db ; \
+ fi \
+ fi
+ install -c -m 555 -o root -g wheel -fschg ${KERNEL} ${DESTDIR}/
+
+${KERNEL}: ${KERNEL}.debug
+ objcopy --strip-debug ${KERNEL}.debug ${KERNEL}
+
+.endif
+
+${INSTALL}:
+ @if [ ! -f ${FULLKERNEL} ] ; then \
echo "You must first build your kernel before trying to install." ; \
exit 1 ; \
fi
-.if exists(${DESTDIR}/kernel)
- -chflags noschg ${DESTDIR}/kernel
- mv ${DESTDIR}/kernel ${DESTDIR}/kernel.old
+.if exists(${DESTDIR}/${KERNEL})
+ -chflags noschg ${DESTDIR}/${KERNEL}
+ mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
.endif
PATH=$${PATH}:/sbin:/usr/sbin; \
- if [ `sysctl -n kern.bootfile` = ${DESTDIR}/kernel ] ; then \
- sysctl -w kern.bootfile=${DESTDIR}/kernel.old ; \
+ if [ `sysctl -n kern.bootfile` = ${DESTDIR}/${KERNEL} ] ; then \
+ sysctl -w kern.bootfile=${DESTDIR}/${KERNEL}.old ; \
if [ -f /var/db/kvm_kernel.db ] ; then \
mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db ; \
fi \
fi
- install -c -m 555 -o root -g wheel -fschg kernel ${DESTDIR}/
+ install -c -m 555 -o root -g wheel -fschg ${FULLKERNEL} ${DESTDIR}/${KERNEL}
ioconf.o: ioconf.c $S/sys/param.h $S/sys/buf.h
${CC} -c ${CFLAGS} ioconf.c
diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386
index 36b97907a87c..6e1b831a7f4a 100644
--- a/sys/conf/Makefile.i386
+++ b/sys/conf/Makefile.i386
@@ -1,7 +1,7 @@
# Makefile.i386 -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
-# $Id: Makefile.i386,v 1.140 1999/03/01 09:54:51 dt Exp $
+# $Id: Makefile.i386,v 1.141 1999/03/11 18:28:41 dg Exp $
#
# Makefile for FreeBSD
#
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 300009
+%VERSREQ= 300010
KERNFORMAT?= elf
@@ -123,8 +123,8 @@ ${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h}
clean:
rm -f *.o *.so *.So *.ko *.s eddep errs genassym gensetdefs \
- kernel linterrs makelinks param.c setdef[01].c setdefs.h \
- symbols.exclude symbols.sort tags \
+ ${KERNEL} ${FULLKERNEL} linterrs makelinks param.c \
+ setdef[01].c setdefs.h symbols.exclude symbols.sort tags \
vers.c vnode_if.c vnode_if.h ${CLEAN}
#lint: /tmp param.c
@@ -204,13 +204,43 @@ links:
tags:
@echo "see $S/kern/Makefile for tags"
-install:
- @if [ ! -f kernel ] ; then \
+.if defined(DEBUG)
+install: ${KERNEL}
+.if ${KERNFORMAT} == "elf" && !defined(FORCE)
+ @if [ -f /${KERNEL} -a "`file /${KERNEL} 2>/dev/null | grep ELF`" = "" ]; then \
+ echo "WARNING: You are about to install an ELF kernel for the first time!" ; \
+ echo "Please be sure you have upgraded your bootblocks and/or /boot/loader so" ; \
+ echo "that you can boot it. Old bootblocks WILL NOT WORK! Please read:" ; \
+ echo "http://www.freebsd.org/~peter/elfday.html for information." ; \
+ echo "If you are satisfied you can boot an ELF kernel, type: make -DFORCE install" ; \
+ exit 1 ; \
+ fi
+.endif
+.if exists(${DESTDIR}/${KERNEL})
+ -chflags noschg ${DESTDIR}/${KERNEL}
+ mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
+.endif
+ PATH=$${PATH}:/sbin:/usr/sbin; \
+ if [ `sysctl -n kern.bootfile` = ${DESTDIR}/${KERNEL} ] ; then \
+ sysctl -w kern.bootfile=${DESTDIR}/${KERNEL}.old ; \
+ if [ -f /var/db/kvm_kernel.db ] ; then \
+ mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db ; \
+ fi \
+ fi
+ install -c -m 555 -o root -g wheel -fschg ${KERNEL} ${DESTDIR}/
+
+${KERNEL}: ${KERNEL}.debug
+ objcopy --strip-debug ${KERNEL}.debug ${KERNEL}
+
+.endif
+
+${INSTALL}:
+ @if [ ! -f ${FULLKERNEL} ] ; then \
echo "You must first build your kernel before trying to install." ; \
exit 1 ; \
fi
.if ${KERNFORMAT} == "elf" && !defined(FORCE)
- @if [ -f /kernel -a "`file /kernel 2>/dev/null | grep ELF`" = "" ]; then \
+ @if [ -f /${KERNEL} -a "`file /${KERNEL} 2>/dev/null | grep ELF`" = "" ]; then \
echo "WARNING: You are about to install an ELF kernel for the first time!" ; \
echo "Please be sure you have upgraded your bootblocks and/or /boot/loader so" ; \
echo "that you can boot it. Old bootblocks WILL NOT WORK! Please read:" ; \
@@ -219,18 +249,18 @@ install:
exit 1 ; \
fi
.endif
-.if exists(${DESTDIR}/kernel)
- -chflags noschg ${DESTDIR}/kernel
- mv ${DESTDIR}/kernel ${DESTDIR}/kernel.old
+.if exists(${DESTDIR}/${KERNEL})
+ -chflags noschg ${DESTDIR}/${KERNEL}
+ mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
.endif
PATH=$${PATH}:/sbin:/usr/sbin; \
- if [ `sysctl -n kern.bootfile` = ${DESTDIR}/kernel ] ; then \
- sysctl -w kern.bootfile=${DESTDIR}/kernel.old ; \
+ if [ `sysctl -n kern.bootfile` = ${DESTDIR}/${KERNEL} ] ; then \
+ sysctl -w kern.bootfile=${DESTDIR}/${KERNEL}.old ; \
if [ -f /var/db/kvm_kernel.db ] ; then \
mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db ; \
fi \
fi
- install -c -m 555 -o root -g wheel -fschg kernel ${DESTDIR}/
+ install -c -m 555 -o root -g wheel -fschg ${FULLKERNEL} ${DESTDIR}/${KERNEL}
config.o:
${NORMAL_C}
diff --git a/sys/conf/Makefile.pc98 b/sys/conf/Makefile.pc98
index d427328eca53..a90547d673b6 100644
--- a/sys/conf/Makefile.pc98
+++ b/sys/conf/Makefile.pc98
@@ -3,7 +3,7 @@
# Makefile.i386 -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
-# $Id: Makefile.pc98,v 1.56 1999/03/02 14:01:33 kato Exp $
+# $Id: Makefile.pc98,v 1.57 1999/03/13 13:18:00 kato Exp $
#
# Makefile for FreeBSD
#
@@ -19,7 +19,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 300009
+%VERSREQ= 300010
KERNFORMAT?= elf
@@ -126,8 +126,8 @@ ${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h}
clean:
rm -f *.o *.so *.So *.ko *.s eddep errs genassym gensetdefs \
- kernel linterrs makelinks param.c setdef[01].c setdefs.h \
- symbols.exclude symbols.sort tags \
+ ${KERNEL} ${FULLKERNEL} linterrs makelinks param.c \
+ setdef[01].c setdefs.h symbols.exclude symbols.sort tags \
vers.c vnode_if.c vnode_if.h ${CLEAN}
#lint: /tmp param.c
@@ -208,13 +208,43 @@ links:
tags:
@echo "see $S/kern/Makefile for tags"
-install:
- @if [ ! -f kernel ] ; then \
+.if defined(DEBUG)
+install: ${KERNEL}
+.if ${KERNFORMAT} == "elf" && !defined(FORCE)
+ @if [ -f /${KERNEL} -a "`file /${KERNEL} 2>/dev/null | grep ELF`" = "" ]; then \
+ echo "WARNING: You are about to install an ELF kernel for the first time!" ; \
+ echo "Please be sure you have upgraded your bootblocks and/or /boot/loader so" ; \
+ echo "that you can boot it. Old bootblocks WILL NOT WORK! Please read:" ; \
+ echo "http://www.freebsd.org/~peter/elfday.html for information." ; \
+ echo "If you are satisfied you can boot an ELF kernel, type: make -DFORCE install" ; \
+ exit 1 ; \
+ fi
+.endif
+.if exists(${DESTDIR}/${KERNEL})
+ -chflags noschg ${DESTDIR}/${KERNEL}
+ mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
+.endif
+ PATH=$${PATH}:/sbin:/usr/sbin; \
+ if [ `sysctl -n kern.bootfile` = ${DESTDIR}/${KERNEL} ] ; then \
+ sysctl -w kern.bootfile=${DESTDIR}/${KERNEL}.old ; \
+ if [ -f /var/db/kvm_kernel.db ] ; then \
+ mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db ; \
+ fi \
+ fi
+ install -c -m 555 -o root -g wheel -fschg ${KERNEL} ${DESTDIR}/
+
+${KERNEL}: ${KERNEL}.debug
+ objcopy --strip-debug ${KERNEL}.debug ${KERNEL}
+
+.endif
+
+${INSTALL}:
+ @if [ ! -f ${FULLKERNEL} ] ; then \
echo "You must first build your kernel before trying to install." ; \
exit 1 ; \
fi
.if ${KERNFORMAT} == "elf" && !defined(FORCE)
- @if [ -f /kernel -a "`file /kernel 2>/dev/null | grep ELF`" = "" ]; then \
+ @if [ -f /${KERNEL} -a "`file /${KERNEL} 2>/dev/null | grep ELF`" = "" ]; then \
echo "WARNING: You are about to install an ELF kernel for the first time!" ; \
echo "Please be sure you have upgraded your bootblocks and/or /boot/loader so" ; \
echo "that you can boot it. Old bootblocks WILL NOT WORK! Please read:" ; \
@@ -223,18 +253,18 @@ install:
exit 1 ; \
fi
.endif
-.if exists(${DESTDIR}/kernel)
- -chflags noschg ${DESTDIR}/kernel
- mv ${DESTDIR}/kernel ${DESTDIR}/kernel.old
+.if exists(${DESTDIR}/${KERNEL})
+ -chflags noschg ${DESTDIR}/${KERNEL}
+ mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
.endif
PATH=$${PATH}:/sbin:/usr/sbin; \
- if [ `sysctl -n kern.bootfile` = ${DESTDIR}/kernel ] ; then \
- sysctl -w kern.bootfile=${DESTDIR}/kernel.old ; \
+ if [ `sysctl -n kern.bootfile` = ${DESTDIR}/${KERNEL} ] ; then \
+ sysctl -w kern.bootfile=${DESTDIR}/${KERNEL}.old ; \
if [ -f /var/db/kvm_kernel.db ] ; then \
mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db ; \
fi \
fi
- install -c -m 555 -o root -g wheel -fschg kernel ${DESTDIR}/
+ install -c -m 555 -o root -g wheel -fschg ${FULLKERNEL} ${DESTDIR}/${KERNEL}
config.o:
${NORMAL_C}
diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc
index 36b97907a87c..6e1b831a7f4a 100644
--- a/sys/conf/Makefile.powerpc
+++ b/sys/conf/Makefile.powerpc
@@ -1,7 +1,7 @@
# Makefile.i386 -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
-# $Id: Makefile.i386,v 1.140 1999/03/01 09:54:51 dt Exp $
+# $Id: Makefile.i386,v 1.141 1999/03/11 18:28:41 dg Exp $
#
# Makefile for FreeBSD
#
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 300009
+%VERSREQ= 300010
KERNFORMAT?= elf
@@ -123,8 +123,8 @@ ${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h}
clean:
rm -f *.o *.so *.So *.ko *.s eddep errs genassym gensetdefs \
- kernel linterrs makelinks param.c setdef[01].c setdefs.h \
- symbols.exclude symbols.sort tags \
+ ${KERNEL} ${FULLKERNEL} linterrs makelinks param.c \
+ setdef[01].c setdefs.h symbols.exclude symbols.sort tags \
vers.c vnode_if.c vnode_if.h ${CLEAN}
#lint: /tmp param.c
@@ -204,13 +204,43 @@ links:
tags:
@echo "see $S/kern/Makefile for tags"
-install:
- @if [ ! -f kernel ] ; then \
+.if defined(DEBUG)
+install: ${KERNEL}
+.if ${KERNFORMAT} == "elf" && !defined(FORCE)
+ @if [ -f /${KERNEL} -a "`file /${KERNEL} 2>/dev/null | grep ELF`" = "" ]; then \
+ echo "WARNING: You are about to install an ELF kernel for the first time!" ; \
+ echo "Please be sure you have upgraded your bootblocks and/or /boot/loader so" ; \
+ echo "that you can boot it. Old bootblocks WILL NOT WORK! Please read:" ; \
+ echo "http://www.freebsd.org/~peter/elfday.html for information." ; \
+ echo "If you are satisfied you can boot an ELF kernel, type: make -DFORCE install" ; \
+ exit 1 ; \
+ fi
+.endif
+.if exists(${DESTDIR}/${KERNEL})
+ -chflags noschg ${DESTDIR}/${KERNEL}
+ mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
+.endif
+ PATH=$${PATH}:/sbin:/usr/sbin; \
+ if [ `sysctl -n kern.bootfile` = ${DESTDIR}/${KERNEL} ] ; then \
+ sysctl -w kern.bootfile=${DESTDIR}/${KERNEL}.old ; \
+ if [ -f /var/db/kvm_kernel.db ] ; then \
+ mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db ; \
+ fi \
+ fi
+ install -c -m 555 -o root -g wheel -fschg ${KERNEL} ${DESTDIR}/
+
+${KERNEL}: ${KERNEL}.debug
+ objcopy --strip-debug ${KERNEL}.debug ${KERNEL}
+
+.endif
+
+${INSTALL}:
+ @if [ ! -f ${FULLKERNEL} ] ; then \
echo "You must first build your kernel before trying to install." ; \
exit 1 ; \
fi
.if ${KERNFORMAT} == "elf" && !defined(FORCE)
- @if [ -f /kernel -a "`file /kernel 2>/dev/null | grep ELF`" = "" ]; then \
+ @if [ -f /${KERNEL} -a "`file /${KERNEL} 2>/dev/null | grep ELF`" = "" ]; then \
echo "WARNING: You are about to install an ELF kernel for the first time!" ; \
echo "Please be sure you have upgraded your bootblocks and/or /boot/loader so" ; \
echo "that you can boot it. Old bootblocks WILL NOT WORK! Please read:" ; \
@@ -219,18 +249,18 @@ install:
exit 1 ; \
fi
.endif
-.if exists(${DESTDIR}/kernel)
- -chflags noschg ${DESTDIR}/kernel
- mv ${DESTDIR}/kernel ${DESTDIR}/kernel.old
+.if exists(${DESTDIR}/${KERNEL})
+ -chflags noschg ${DESTDIR}/${KERNEL}
+ mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
.endif
PATH=$${PATH}:/sbin:/usr/sbin; \
- if [ `sysctl -n kern.bootfile` = ${DESTDIR}/kernel ] ; then \
- sysctl -w kern.bootfile=${DESTDIR}/kernel.old ; \
+ if [ `sysctl -n kern.bootfile` = ${DESTDIR}/${KERNEL} ] ; then \
+ sysctl -w kern.bootfile=${DESTDIR}/${KERNEL}.old ; \
if [ -f /var/db/kvm_kernel.db ] ; then \
mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db ; \
fi \
fi
- install -c -m 555 -o root -g wheel -fschg kernel ${DESTDIR}/
+ install -c -m 555 -o root -g wheel -fschg ${FULLKERNEL} ${DESTDIR}/${KERNEL}
config.o:
${NORMAL_C}
diff --git a/sys/i386/conf/Makefile.i386 b/sys/i386/conf/Makefile.i386
index 36b97907a87c..6e1b831a7f4a 100644
--- a/sys/i386/conf/Makefile.i386
+++ b/sys/i386/conf/Makefile.i386
@@ -1,7 +1,7 @@
# Makefile.i386 -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
-# $Id: Makefile.i386,v 1.140 1999/03/01 09:54:51 dt Exp $
+# $Id: Makefile.i386,v 1.141 1999/03/11 18:28:41 dg Exp $
#
# Makefile for FreeBSD
#
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 300009
+%VERSREQ= 300010
KERNFORMAT?= elf
@@ -123,8 +123,8 @@ ${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h}
clean:
rm -f *.o *.so *.So *.ko *.s eddep errs genassym gensetdefs \
- kernel linterrs makelinks param.c setdef[01].c setdefs.h \
- symbols.exclude symbols.sort tags \
+ ${KERNEL} ${FULLKERNEL} linterrs makelinks param.c \
+ setdef[01].c setdefs.h symbols.exclude symbols.sort tags \
vers.c vnode_if.c vnode_if.h ${CLEAN}
#lint: /tmp param.c
@@ -204,13 +204,43 @@ links:
tags:
@echo "see $S/kern/Makefile for tags"
-install:
- @if [ ! -f kernel ] ; then \
+.if defined(DEBUG)
+install: ${KERNEL}
+.if ${KERNFORMAT} == "elf" && !defined(FORCE)
+ @if [ -f /${KERNEL} -a "`file /${KERNEL} 2>/dev/null | grep ELF`" = "" ]; then \
+ echo "WARNING: You are about to install an ELF kernel for the first time!" ; \
+ echo "Please be sure you have upgraded your bootblocks and/or /boot/loader so" ; \
+ echo "that you can boot it. Old bootblocks WILL NOT WORK! Please read:" ; \
+ echo "http://www.freebsd.org/~peter/elfday.html for information." ; \
+ echo "If you are satisfied you can boot an ELF kernel, type: make -DFORCE install" ; \
+ exit 1 ; \
+ fi
+.endif
+.if exists(${DESTDIR}/${KERNEL})
+ -chflags noschg ${DESTDIR}/${KERNEL}
+ mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
+.endif
+ PATH=$${PATH}:/sbin:/usr/sbin; \
+ if [ `sysctl -n kern.bootfile` = ${DESTDIR}/${KERNEL} ] ; then \
+ sysctl -w kern.bootfile=${DESTDIR}/${KERNEL}.old ; \
+ if [ -f /var/db/kvm_kernel.db ] ; then \
+ mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db ; \
+ fi \
+ fi
+ install -c -m 555 -o root -g wheel -fschg ${KERNEL} ${DESTDIR}/
+
+${KERNEL}: ${KERNEL}.debug
+ objcopy --strip-debug ${KERNEL}.debug ${KERNEL}
+
+.endif
+
+${INSTALL}:
+ @if [ ! -f ${FULLKERNEL} ] ; then \
echo "You must first build your kernel before trying to install." ; \
exit 1 ; \
fi
.if ${KERNFORMAT} == "elf" && !defined(FORCE)
- @if [ -f /kernel -a "`file /kernel 2>/dev/null | grep ELF`" = "" ]; then \
+ @if [ -f /${KERNEL} -a "`file /${KERNEL} 2>/dev/null | grep ELF`" = "" ]; then \
echo "WARNING: You are about to install an ELF kernel for the first time!" ; \
echo "Please be sure you have upgraded your bootblocks and/or /boot/loader so" ; \
echo "that you can boot it. Old bootblocks WILL NOT WORK! Please read:" ; \
@@ -219,18 +249,18 @@ install:
exit 1 ; \
fi
.endif
-.if exists(${DESTDIR}/kernel)
- -chflags noschg ${DESTDIR}/kernel
- mv ${DESTDIR}/kernel ${DESTDIR}/kernel.old
+.if exists(${DESTDIR}/${KERNEL})
+ -chflags noschg ${DESTDIR}/${KERNEL}
+ mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
.endif
PATH=$${PATH}:/sbin:/usr/sbin; \
- if [ `sysctl -n kern.bootfile` = ${DESTDIR}/kernel ] ; then \
- sysctl -w kern.bootfile=${DESTDIR}/kernel.old ; \
+ if [ `sysctl -n kern.bootfile` = ${DESTDIR}/${KERNEL} ] ; then \
+ sysctl -w kern.bootfile=${DESTDIR}/${KERNEL}.old ; \
if [ -f /var/db/kvm_kernel.db ] ; then \
mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db ; \
fi \
fi
- install -c -m 555 -o root -g wheel -fschg kernel ${DESTDIR}/
+ install -c -m 555 -o root -g wheel -fschg ${FULLKERNEL} ${DESTDIR}/${KERNEL}
config.o:
${NORMAL_C}
diff --git a/sys/pc98/conf/Makefile.pc98 b/sys/pc98/conf/Makefile.pc98
index d427328eca53..a90547d673b6 100644
--- a/sys/pc98/conf/Makefile.pc98
+++ b/sys/pc98/conf/Makefile.pc98
@@ -3,7 +3,7 @@
# Makefile.i386 -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
-# $Id: Makefile.pc98,v 1.56 1999/03/02 14:01:33 kato Exp $
+# $Id: Makefile.pc98,v 1.57 1999/03/13 13:18:00 kato Exp $
#
# Makefile for FreeBSD
#
@@ -19,7 +19,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 300009
+%VERSREQ= 300010
KERNFORMAT?= elf
@@ -126,8 +126,8 @@ ${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h}
clean:
rm -f *.o *.so *.So *.ko *.s eddep errs genassym gensetdefs \
- kernel linterrs makelinks param.c setdef[01].c setdefs.h \
- symbols.exclude symbols.sort tags \
+ ${KERNEL} ${FULLKERNEL} linterrs makelinks param.c \
+ setdef[01].c setdefs.h symbols.exclude symbols.sort tags \
vers.c vnode_if.c vnode_if.h ${CLEAN}
#lint: /tmp param.c
@@ -208,13 +208,43 @@ links:
tags:
@echo "see $S/kern/Makefile for tags"
-install:
- @if [ ! -f kernel ] ; then \
+.if defined(DEBUG)
+install: ${KERNEL}
+.if ${KERNFORMAT} == "elf" && !defined(FORCE)
+ @if [ -f /${KERNEL} -a "`file /${KERNEL} 2>/dev/null | grep ELF`" = "" ]; then \
+ echo "WARNING: You are about to install an ELF kernel for the first time!" ; \
+ echo "Please be sure you have upgraded your bootblocks and/or /boot/loader so" ; \
+ echo "that you can boot it. Old bootblocks WILL NOT WORK! Please read:" ; \
+ echo "http://www.freebsd.org/~peter/elfday.html for information." ; \
+ echo "If you are satisfied you can boot an ELF kernel, type: make -DFORCE install" ; \
+ exit 1 ; \
+ fi
+.endif
+.if exists(${DESTDIR}/${KERNEL})
+ -chflags noschg ${DESTDIR}/${KERNEL}
+ mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
+.endif
+ PATH=$${PATH}:/sbin:/usr/sbin; \
+ if [ `sysctl -n kern.bootfile` = ${DESTDIR}/${KERNEL} ] ; then \
+ sysctl -w kern.bootfile=${DESTDIR}/${KERNEL}.old ; \
+ if [ -f /var/db/kvm_kernel.db ] ; then \
+ mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db ; \
+ fi \
+ fi
+ install -c -m 555 -o root -g wheel -fschg ${KERNEL} ${DESTDIR}/
+
+${KERNEL}: ${KERNEL}.debug
+ objcopy --strip-debug ${KERNEL}.debug ${KERNEL}
+
+.endif
+
+${INSTALL}:
+ @if [ ! -f ${FULLKERNEL} ] ; then \
echo "You must first build your kernel before trying to install." ; \
exit 1 ; \
fi
.if ${KERNFORMAT} == "elf" && !defined(FORCE)
- @if [ -f /kernel -a "`file /kernel 2>/dev/null | grep ELF`" = "" ]; then \
+ @if [ -f /${KERNEL} -a "`file /${KERNEL} 2>/dev/null | grep ELF`" = "" ]; then \
echo "WARNING: You are about to install an ELF kernel for the first time!" ; \
echo "Please be sure you have upgraded your bootblocks and/or /boot/loader so" ; \
echo "that you can boot it. Old bootblocks WILL NOT WORK! Please read:" ; \
@@ -223,18 +253,18 @@ install:
exit 1 ; \
fi
.endif
-.if exists(${DESTDIR}/kernel)
- -chflags noschg ${DESTDIR}/kernel
- mv ${DESTDIR}/kernel ${DESTDIR}/kernel.old
+.if exists(${DESTDIR}/${KERNEL})
+ -chflags noschg ${DESTDIR}/${KERNEL}
+ mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
.endif
PATH=$${PATH}:/sbin:/usr/sbin; \
- if [ `sysctl -n kern.bootfile` = ${DESTDIR}/kernel ] ; then \
- sysctl -w kern.bootfile=${DESTDIR}/kernel.old ; \
+ if [ `sysctl -n kern.bootfile` = ${DESTDIR}/${KERNEL} ] ; then \
+ sysctl -w kern.bootfile=${DESTDIR}/${KERNEL}.old ; \
if [ -f /var/db/kvm_kernel.db ] ; then \
mv -f /var/db/kvm_kernel.db /var/db/kvm_kernel.old.db ; \
fi \
fi
- install -c -m 555 -o root -g wheel -fschg kernel ${DESTDIR}/
+ install -c -m 555 -o root -g wheel -fschg ${FULLKERNEL} ${DESTDIR}/${KERNEL}
config.o:
${NORMAL_C}
diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c
index 0c0535882f41..1e5ae7383bdb 100644
--- a/usr.sbin/config/main.c
+++ b/usr.sbin/config/main.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$Id: main.c,v 1.25 1998/06/09 14:02:03 dfr Exp $";
+ "$Id: main.c,v 1.26 1998/12/10 02:35:55 archie Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -86,10 +86,13 @@ main(argc, argv)
int ch;
char *p;
- while ((ch = getopt(argc, argv, "gprn")) != -1)
+ debugging = 1; /* on by default */
+ while ((ch = getopt(argc, argv, "gprns")) != -1)
switch (ch) {
case 'g':
- debugging++;
+ fprintf(stderr,
+ "Debugging is enabled by default, there is "
+ "no need to specify the -g option\n" );
break;
case 'p':
profiling++;
@@ -102,6 +105,9 @@ main(argc, argv)
case 'r':
no_config_clobber = FALSE;
break;
+ case 's':
+ debugging = 0;
+ break;
case '?':
default:
usage();
@@ -112,6 +118,14 @@ main(argc, argv)
if (argc != 1)
usage();
+ if (debugging)
+ printf("Building kernel with full debugging symbols. Do\n"
+ "\"config -s %s\" "
+ "for historic partial symbolic support.\n"
+ "To install the debugging kernel, do "
+ "make install.debug\n",
+ argv [0] );
+
if (freopen(PREFIX = *argv, "r", stdin) == NULL)
err(2, "%s", PREFIX);
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index ea4c405dc3d4..5c38d232dc24 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)mkmakefile.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$Id: mkmakefile.c,v 1.33 1998/09/03 21:03:43 nsouch Exp $";
+ "$Id: mkmakefile.c,v 1.34 1998/09/15 21:07:54 gibbs Exp $";
#endif /* not lint */
/*
@@ -790,7 +790,10 @@ do_load(f)
fputs("all:", f);
for (fl = conf_list; fl; fl = fl->f_next)
if (fl->f_type == SYSTEMSPEC)
- fprintf(f, " %s", fl->f_needs);
+ if (debugging)
+ fprintf(f, " %s.debug", fl->f_needs);
+ else
+ fprintf(f, " %s", fl->f_needs);
putc('\n', f);
}
@@ -824,7 +827,23 @@ do_systemspec(f, fl, first)
int first;
{
- fprintf(f, "%s: ${SYSTEM_DEP} swap%s.o", fl->f_needs, fl->f_fn);
+ if (debugging) {
+ fprintf(f,
+ "KERNEL=\t\t%s\n"
+ "FULLKERNEL=\t%s.debug\n"
+ "INSTALL=\tinstall.debug\n\n",
+ fl->f_needs,
+ fl->f_needs );
+ fprintf(f, "%s.debug: ${SYSTEM_DEP} swap%s.o", fl->f_needs, fl->f_fn);
+ } else {
+ fprintf(f,
+ "KERNEL=\t\t%s\n"
+ "FULLKERNEL=\t%s\n\n"
+ "INSTALL=\tinstall\n\n",
+ fl->f_needs,
+ fl->f_needs );
+ fprintf(f, "%s: ${SYSTEM_DEP} swap%s.o", fl->f_needs, fl->f_fn);
+ }
if (first)
fprintf(f, " vers.o");
fprintf(f, "\n\t${SYSTEM_LD_HEAD}\n");