summaryrefslogtreecommitdiffstats
path: root/sys/i386/conf/Makefile.i386
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-05-09 22:42:17 +0000
committerpeter <peter@FreeBSD.org>1999-05-09 22:42:17 +0000
commit185b976c2d842ba5d53c69a0c022dc316b7fd810 (patch)
tree617a1777d8088ac6b6b1c13aa9aff16cfe014920 /sys/i386/conf/Makefile.i386
parent61303417586997d8723fe900e36c86f243306adf (diff)
downloadFreeBSD-src-185b976c2d842ba5d53c69a0c022dc316b7fd810.zip
FreeBSD-src-185b976c2d842ba5d53c69a0c022dc316b7fd810.tar.gz
Move KERNEL?=kernel to top of the file where it's more obvious and add
a pointer to 'makeoptions' and /etc/make.conf. Catch a few stray "kernel" hardcoded references. Move the kernel.debug and related kernel build rules together.
Diffstat (limited to 'sys/i386/conf/Makefile.i386')
-rw-r--r--sys/i386/conf/Makefile.i38639
1 files changed, 18 insertions, 21 deletions
diff --git a/sys/i386/conf/Makefile.i386 b/sys/i386/conf/Makefile.i386
index 1295363..bce6d93 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.150 1999/05/09 16:45:59 phk Exp $
+# $Id: Makefile.i386,v 1.151 1999/05/09 18:57:02 peter Exp $
#
# Makefile for FreeBSD
#
@@ -19,8 +19,9 @@
# Which version of config(8) is required.
%VERSREQ= 400016
+# Can be overridden by makeoptions or /etc/make.conf
+KERNEL?= kernel
KERNFORMAT?= elf
-
STD8X16FONT?= iso
.if exists(./@/.)
@@ -104,13 +105,6 @@ SYSTEM_LD_TAIL= @size -elf ${.TARGET} ; chmod 755 ${.TARGET}
SYSTEM_DEP+= $S/i386/conf/kernel.script
.endif
-KERNEL?= kernel
-.if defined(DEBUG)
-FULLKERNEL= ${KERNEL}.debug
-.else
-FULLKERNEL= ${KERNEL}
-.endif
-
%BEFORE_DEPEND
%OBJS
@@ -125,6 +119,19 @@ FULLKERNEL= ${KERNEL}
all: ${KERNEL}
+.if !defined(DEBUG)
+FULLKERNEL= ${KERNEL}
+.else
+FULLKERNEL= ${KERNEL}.debug
+${KERNEL}: ${FULLKERNEL}
+.if ${KERNFORMAT} == "elf"
+ objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
+.else
+ cp ${FULLKERNEL} ${KERNEL}
+ strip -d ${KERNEL}
+.endif
+.endif
+
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
@rm -f ${.TARGET}
@echo linking ${.TARGET}
@@ -217,16 +224,6 @@ links:
tags:
@echo "see $S/kern/Makefile for tags"
-.if defined(DEBUG)
-${KERNEL}: ${FULLKERNEL}
-.if ${KERNFORMAT} == "elf"
- objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
-.else
- cp ${FULLKERNEL} ${KERNEL}
- strip -d kernel
-.endif
-.endif
-
install install.debug:
@if [ ! -f ${KERNEL}${.TARGET:S/install//} ] ; then \
echo "You must first build a kernel first." ; \
@@ -239,8 +236,8 @@ install install.debug:
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 ; \
+ 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 \
OpenPOWER on IntegriCloud