diff options
author | bde <bde@FreeBSD.org> | 2002-08-19 01:00:37 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2002-08-19 01:00:37 +0000 |
commit | 5c4faa8fa4ed70bc9ead0da8d2732efb7f036e2c (patch) | |
tree | 966ad0e524096825362ab7480137be21e3da7b78 | |
parent | 9db847d9120bf38095daff9d7f4b1cc3d1d0016a (diff) | |
download | FreeBSD-src-5c4faa8fa4ed70bc9ead0da8d2732efb7f036e2c.zip FreeBSD-src-5c4faa8fa4ed70bc9ead0da8d2732efb7f036e2c.tar.gz |
Added rules to generate .c files from .m files. Run mkdep on these .c
files. This fixes at least "make" (without -j) after "make clean".
-rw-r--r-- | sys/conf/kern.post.mk | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 63384df..0c5aeb4 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -42,6 +42,10 @@ ${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/} .endif .for mfile in ${MFILES} +# XXX the low quality .m.o rules gnerated by config are normally used +# instead of the .m.c rules here. +${mfile:T:S/.m$/.c/}: ${mfile} + ${AWK} -f $S/tools/makeobjops.awk ${mfile} -c ${mfile:T:S/.m$/.h/}: ${mfile} ${AWK} -f $S/tools/makeobjops.awk ${mfile} -h .endfor @@ -90,14 +94,17 @@ kernel-depend: if [ -f .depend ]; then mv .depend .olddep; fi ${MAKE} _kernel-depend +# XXX this belongs elsewhere (inside GEN_CFILES if possible). +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} \ - ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ - ${SYSTEM_SFILES} ${MFILES:T:S/.m$/.h/} + ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${GEN_M_CFILES} \ + ${SFILES} ${SYSTEM_SFILES} ${MFILES:T:S/.m$/.h/} if [ -f .olddep ]; then mv .olddep .depend; fi rm -f .newdep - ${MAKE} -V CFILES -V SYSTEM_CFILES -V GEN_CFILES | \ + ${MAKE} -V CFILES -V SYSTEM_CFILES -V GEN_CFILES -V GEN_M_CFILES | \ MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${CFLAGS} ${MAKE} -V SFILES -V SYSTEM_SFILES | \ MKDEP_CPP="${CC} -E" xargs mkdep -a -f .newdep ${ASM_CFLAGS} |