1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

1. Modify config to issue different code for debugging.

2.  Config complains if you use -g:

    Debugging is enabled by default, there is no ned to specify the -g option

3.  Config warns you if you don't use -s:

    Building kernel with full debugging symbols.  Do
    "config -s BSD" for historic partial symbolic support.
    To install the debugging kernel, do make install.debug

    (BSD was the name of the config file I used; I print out the same
    name).

4.  Modify Makefile.i386, Makefile.alpha, Makefile.pc98 and config to
    work if a kernel name other than 'kernel' is specified.  This is
    not absolutely necessary, but useful, and it was relatively easy.
    I now have a kernel called /crapshit :-)

5.  Modify Makefile.i386, Makefile.alpha, Makefile.pc98 "clean" target
    to remove both the debug and normal kernel.

6.  Modify all to install the stripped kernel by default and the debug
    kernel if you enter "make install.debug".

7.  Update version number of Makefiles and config.
This commit is contained in:
Greg Lehey 1999-04-07 09:28:03 +00:00
parent aae211bc7e
commit 2005b07aa8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=45424
9 changed files with 341 additions and 118 deletions

View File

@ -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 \
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 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 [ `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 ${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
.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 ${FULLKERNEL} ${DESTDIR}/${KERNEL}
ioconf.o: ioconf.c $S/sys/param.h $S/sys/buf.h
${CC} -c ${CFLAGS} ioconf.c

View File

@ -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 \
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 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 [ `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 ${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
.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 ${FULLKERNEL} ${DESTDIR}/${KERNEL}
ioconf.o: ioconf.c $S/sys/param.h $S/sys/buf.h
${CC} -c ${CFLAGS} ioconf.c

View File

@ -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,10 @@ links:
tags:
@echo "see $S/kern/Makefile for tags"
install:
@if [ ! -f kernel ] ; then \
echo "You must first build your kernel before trying to install." ; \
exit 1 ; \
fi
.if defined(DEBUG)
install: ${KERNEL}
.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 +216,51 @@ 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 ${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 \
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 ${FULLKERNEL} ${DESTDIR}/${KERNEL}
config.o:
${NORMAL_C}

View File

@ -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,10 @@ links:
tags:
@echo "see $S/kern/Makefile for tags"
install:
@if [ ! -f kernel ] ; then \
echo "You must first build your kernel before trying to install." ; \
exit 1 ; \
fi
.if defined(DEBUG)
install: ${KERNEL}
.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 +220,51 @@ 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 ${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 \
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 ${FULLKERNEL} ${DESTDIR}/${KERNEL}
config.o:
${NORMAL_C}

View File

@ -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,10 @@ links:
tags:
@echo "see $S/kern/Makefile for tags"
install:
@if [ ! -f kernel ] ; then \
echo "You must first build your kernel before trying to install." ; \
exit 1 ; \
fi
.if defined(DEBUG)
install: ${KERNEL}
.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 +216,51 @@ 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 ${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 \
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 ${FULLKERNEL} ${DESTDIR}/${KERNEL}
config.o:
${NORMAL_C}

View File

@ -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,10 @@ links:
tags:
@echo "see $S/kern/Makefile for tags"
install:
@if [ ! -f kernel ] ; then \
echo "You must first build your kernel before trying to install." ; \
exit 1 ; \
fi
.if defined(DEBUG)
install: ${KERNEL}
.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 +216,51 @@ 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 ${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 \
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 ${FULLKERNEL} ${DESTDIR}/${KERNEL}
config.o:
${NORMAL_C}

View File

@ -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,10 @@ links:
tags:
@echo "see $S/kern/Makefile for tags"
install:
@if [ ! -f kernel ] ; then \
echo "You must first build your kernel before trying to install." ; \
exit 1 ; \
fi
.if defined(DEBUG)
install: ${KERNEL}
.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 +220,51 @@ 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 ${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 \
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 ${FULLKERNEL} ${DESTDIR}/${KERNEL}
config.o:
${NORMAL_C}

View File

@ -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);

View File

@ -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");