diff options
author | obrien <obrien@FreeBSD.org> | 2003-01-19 02:59:34 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2003-01-19 02:59:34 +0000 |
commit | 665cbf9fac61158be10859f4301dbac1e617b213 (patch) | |
tree | b0446bd5f9f5eb9c4b093adbcc94a2eefbc625d3 /sys/conf | |
parent | 443c2037afd951d6231c7d9048d8fc1d8ec5e134 (diff) | |
download | FreeBSD-src-665cbf9fac61158be10859f4301dbac1e617b213.zip FreeBSD-src-665cbf9fac61158be10859f4301dbac1e617b213.tar.gz |
Remove miidevs.h and generate it from miidevs at compile time.
The devlist2h.awk tool to do this has been repocopied to sys/tools/.
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/kern.post.mk | 21 | ||||
-rw-r--r-- | sys/conf/kmod.mk | 11 |
2 files changed, 26 insertions, 6 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index f39b9c2..06cd62b 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -50,10 +50,19 @@ ${mfile:T:S/.m$/.h/}: ${mfile} ${AWK} -f $S/tools/makeobjops.awk ${mfile} -h .endfor +miidevs.h: $S/tools/devlist2h.awk $S/dev/mii/miidevs + ${AWK} -f $S/tools/devlist2h.awk $S/dev/mii/miidevs + +.if !exists(.depend) +acphy.o amphy.o bmtphy.o brgphy.o dcphy.o e1000phy.o exphy.o if_bge.o if_tx.o \ +inphy.o lxtphy.o nsgphy.o nsphy.o pnaphy.o pnphy.o qsphy.o rlphy.o tdkphy.o \ +tlphy.o xmphy.o: miidevs.h +.endif + kernel-clean: rm -f *.o *.so *.So *.ko *.s eddep errs \ ${FULLKERNEL} ${KERNEL_KO} linterrs makelinks tags \ - vers.c vnode_if.c vnode_if.h \ + miidevs.h vers.c vnode_if.c vnode_if.h \ ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ ${CLEAN} @@ -98,7 +107,7 @@ GEN_M_CFILES= ${MFILES:T:S/.m$/.c/} # The argument list can be very long, so use make -V and xargs to # pass it to mkdep. -_kernel-depend: assym.s vnode_if.h ${BEFORE_DEPEND} \ +_kernel-depend: assym.s vnode_if.h miidevs.h ${BEFORE_DEPEND} \ ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${GEN_M_CFILES} \ ${SFILES} ${SYSTEM_SFILES} ${MFILES:T:S/.m$/.h/} if [ -f .olddep ]; then mv .olddep .depend; fi @@ -160,17 +169,17 @@ kernel-install: .endif mkdir -p ${DESTDIR}${KODIR} .if defined(DEBUG) && defined(INSTALL_DEBUG) - ${INSTALL} -m 555 -o root -g wheel ${FULLKERNEL} ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o root -g wheel ${FULLKERNEL} ${DESTDIR}${KODIR} .else - ${INSTALL} -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR} .endif kernel-reinstall: @-chflags -R noschg ${DESTDIR}${KODIR} .if defined(DEBUG) && defined(INSTALL_DEBUG) - ${INSTALL} -m 555 -o root -g wheel ${FULLKERNEL} ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o root -g wheel ${FULLKERNEL} ${DESTDIR}${KODIR} .else - ${INSTALL} -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR} .endif .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 0d8a1aa..bc04d11 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -286,6 +286,17 @@ vnode_if.${_ext}: @/tools/vnode_if.awk @/kern/vnode_if.src .endif .endfor +.if ${SRCS:Mmiidevs.h} != "" +CLEANFILES+= miidevs.h +.if !exists(@) +miidevs.h: @ +.endif +.if exists(@) +miidevs.h: @/tools/devlist2h.awk @/dev/mii/miidevs +.endif + ${AWK} -f @/tools/devlist2h.awk @/dev/mii/miidevs +.endif + regress: lint: ${SRCS} |