From 37558b017100957ec23fcfc8bf5b4cb60be32dc6 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sun, 9 May 1999 18:57:02 +0000 Subject: [PATCH] Move a couple of bits of (now) static content from config(8) (ie: %LOAD) directly into the Makefile. Remove references to swapkernel.c, it's not generated by config(8) now. (The previous config commits had generated it, but they had an unused 'char *' in them). --- sys/conf/Makefile.i386 | 21 +++++++++++++-------- sys/conf/Makefile.powerpc | 21 +++++++++++++-------- sys/i386/conf/Makefile.i386 | 21 +++++++++++++-------- 3 files changed, 39 insertions(+), 24 deletions(-) diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index a59814948901..129536345867 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.149 1999/05/08 20:04:39 peter Exp $ +# $Id: Makefile.i386,v 1.150 1999/05/09 16:45:59 phk Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 400015 +%VERSREQ= 400016 KERNFORMAT?= elf @@ -85,7 +85,6 @@ SYSTEM_DEP= Makefile symbols.exclude symbols.sort ${SYSTEM_OBJS} .if ${CFLAGS:M-g} == "" SYMORDER_EXCLUDE=-x symbols.exclude .endif -SYSTEM_LD_HEAD= @echo loading ${.TARGET}; rm -f ${.TARGET} .if ${KERNFORMAT} == aout || ${KERNFORMAT} == aoutkld SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o config.o @@ -105,6 +104,7 @@ 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 @@ -121,10 +121,16 @@ FULLKERNEL= ${KERNEL} %MFILES -%LOAD - %CLEAN +all: ${KERNEL} + +${FULLKERNEL}: ${SYSTEM_DEP} vers.o + @rm -f ${.TARGET} + @echo linking ${.TARGET} + ${SYSTEM_LD} + ${SYSTEM_LD_TAIL} + .if !exists(.depend) ${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} .endif @@ -171,7 +177,6 @@ setdef1.o: setdef1.c setdefs.h ${NORMAL_C} setdef0.c setdef1.c setdefs.h: ${OBJS} - @echo generating linker set emulation glue for ELF @gensetdefs ${OBJS} # this rule stops ./assym.s in .depend from causing problems @@ -202,9 +207,9 @@ cleandepend: rm -f .depend links: - egrep '#if' ${CFILES:Nswapkernel.c} | sed -f $S/conf/defines | \ + egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink - echo ${CFILES:Nswapkernel.c} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ + echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ sort -u | comm -23 - dontlink | \ sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks sh makelinks && rm -f dontlink diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index a59814948901..129536345867 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.149 1999/05/08 20:04:39 peter Exp $ +# $Id: Makefile.i386,v 1.150 1999/05/09 16:45:59 phk Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 400015 +%VERSREQ= 400016 KERNFORMAT?= elf @@ -85,7 +85,6 @@ SYSTEM_DEP= Makefile symbols.exclude symbols.sort ${SYSTEM_OBJS} .if ${CFLAGS:M-g} == "" SYMORDER_EXCLUDE=-x symbols.exclude .endif -SYSTEM_LD_HEAD= @echo loading ${.TARGET}; rm -f ${.TARGET} .if ${KERNFORMAT} == aout || ${KERNFORMAT} == aoutkld SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o config.o @@ -105,6 +104,7 @@ 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 @@ -121,10 +121,16 @@ FULLKERNEL= ${KERNEL} %MFILES -%LOAD - %CLEAN +all: ${KERNEL} + +${FULLKERNEL}: ${SYSTEM_DEP} vers.o + @rm -f ${.TARGET} + @echo linking ${.TARGET} + ${SYSTEM_LD} + ${SYSTEM_LD_TAIL} + .if !exists(.depend) ${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} .endif @@ -171,7 +177,6 @@ setdef1.o: setdef1.c setdefs.h ${NORMAL_C} setdef0.c setdef1.c setdefs.h: ${OBJS} - @echo generating linker set emulation glue for ELF @gensetdefs ${OBJS} # this rule stops ./assym.s in .depend from causing problems @@ -202,9 +207,9 @@ cleandepend: rm -f .depend links: - egrep '#if' ${CFILES:Nswapkernel.c} | sed -f $S/conf/defines | \ + egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink - echo ${CFILES:Nswapkernel.c} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ + echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ sort -u | comm -23 - dontlink | \ sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks sh makelinks && rm -f dontlink diff --git a/sys/i386/conf/Makefile.i386 b/sys/i386/conf/Makefile.i386 index a59814948901..129536345867 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.149 1999/05/08 20:04:39 peter Exp $ +# $Id: Makefile.i386,v 1.150 1999/05/09 16:45:59 phk Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 400015 +%VERSREQ= 400016 KERNFORMAT?= elf @@ -85,7 +85,6 @@ SYSTEM_DEP= Makefile symbols.exclude symbols.sort ${SYSTEM_OBJS} .if ${CFLAGS:M-g} == "" SYMORDER_EXCLUDE=-x symbols.exclude .endif -SYSTEM_LD_HEAD= @echo loading ${.TARGET}; rm -f ${.TARGET} .if ${KERNFORMAT} == aout || ${KERNFORMAT} == aoutkld SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o config.o @@ -105,6 +104,7 @@ 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 @@ -121,10 +121,16 @@ FULLKERNEL= ${KERNEL} %MFILES -%LOAD - %CLEAN +all: ${KERNEL} + +${FULLKERNEL}: ${SYSTEM_DEP} vers.o + @rm -f ${.TARGET} + @echo linking ${.TARGET} + ${SYSTEM_LD} + ${SYSTEM_LD_TAIL} + .if !exists(.depend) ${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} .endif @@ -171,7 +177,6 @@ setdef1.o: setdef1.c setdefs.h ${NORMAL_C} setdef0.c setdef1.c setdefs.h: ${OBJS} - @echo generating linker set emulation glue for ELF @gensetdefs ${OBJS} # this rule stops ./assym.s in .depend from causing problems @@ -202,9 +207,9 @@ cleandepend: rm -f .depend links: - egrep '#if' ${CFILES:Nswapkernel.c} | sed -f $S/conf/defines | \ + egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink - echo ${CFILES:Nswapkernel.c} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ + echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ sort -u | comm -23 - dontlink | \ sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks sh makelinks && rm -f dontlink