1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

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".
This commit is contained in:
Bruce Evans 2002-08-19 01:00:37 +00:00
parent 83ca56da18
commit 49b2349b41
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=102082

View File

@ -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}