Revert r301079.

This breaks cross-building with WITH_META_MODE since it will rebuild
'build-tools' during the 'everything' phase.

A more proper fix is coming to bmake to implicitly require .META unless
.NOMETA (and other restrictions) are in place.
This commit is contained in:
Bryan Drewery 2016-06-03 19:25:36 +00:00
parent 6e9a3c415e
commit 5852ae2d99
10 changed files with 104 additions and 112 deletions

View File

@ -92,7 +92,7 @@ OBJS_DEPEND_GUESS.${_S:R}.o= ${_S}
# Lexical analyzers
.for _LSRC in ${SRCS:M*.l:N*/*}
.for _LC in ${_LSRC:R}.c
${_LC}: ${_LSRC} ${OP_META}
${_LC}: ${_LSRC}
${LEX} ${LFLAGS} -o${.TARGET} ${.ALLSRC}
OBJS_DEPEND_GUESS.${_LC:R}.o= ${_LC}
SRCS:= ${SRCS:S/${_LSRC}/${_LC}/}
@ -107,7 +107,6 @@ SRCS:= ${SRCS:S/${_YSRC}/${_YC}/}
CLEANFILES+= ${_YC}
.if !empty(YFLAGS:M-d) && !empty(SRCS:My.tab.h)
.ORDER: ${_YC} y.tab.h
${_YC}: ${OP_META}
${_YC} y.tab.h: ${_YSRC}
${YACC} ${YFLAGS} ${.ALLSRC}
cp y.tab.c ${_YC}
@ -115,14 +114,13 @@ CLEANFILES+= y.tab.c y.tab.h
.elif !empty(YFLAGS:M-d)
.for _YH in ${_YC:R}.h
.ORDER: ${_YC} ${_YH}
${_YC}: ${OP_META}
${_YC} ${_YH}: ${_YSRC}
${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC}
SRCS+= ${_YH}
CLEANFILES+= ${_YH}
.endfor
.else
${_YC}: ${_YSRC} ${OP_META}
${_YC}: ${_YSRC}
${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC}
.endif
OBJS_DEPEND_GUESS.${_YC:R}.o= ${_YC}
@ -136,20 +134,20 @@ CFLAGS+= -I${.OBJDIR}
.for _DSRC in ${SRCS:M*.d:N*/*}
.for _D in ${_DSRC:R}
SRCS+= ${_D}.h
${_D}.h: ${_DSRC} ${OP_META}
${_D}.h: ${_DSRC}
${DTRACE} ${DTRACEFLAGS} -h -s ${.ALLSRC}
SRCS:= ${SRCS:S/^${_DSRC}$//}
OBJS+= ${_D}.o
CLEANFILES+= ${_D}.h ${_D}.o
${_D}.o: ${_DSRC} ${OBJS:S/^${_D}.o$//} ${OP_META}
${_D}.o: ${_DSRC} ${OBJS:S/^${_D}.o$//}
@rm -f ${.TARGET}
${DTRACE} ${DTRACEFLAGS} -G -o ${.TARGET} -s ${.ALLSRC:N*.h}
.if defined(LIB)
CLEANFILES+= ${_D}.So ${_D}.po
${_D}.So: ${_DSRC} ${SOBJS:S/^${_D}.So$//} ${OP_META}
${_D}.So: ${_DSRC} ${SOBJS:S/^${_D}.So$//}
@rm -f ${.TARGET}
${DTRACE} ${DTRACEFLAGS} -G -o ${.TARGET} -s ${.ALLSRC:N*.h}
${_D}.po: ${_DSRC} ${POBJS:S/^${_D}.po$//} ${OP_META}
${_D}.po: ${_DSRC} ${POBJS:S/^${_D}.po$//}
@rm -f ${.TARGET}
${DTRACE} ${DTRACEFLAGS} -G -o ${.TARGET} -s ${.ALLSRC:N*.h}
.endif
@ -245,7 +243,7 @@ DPSRCS+= ${SRCS}
# A .depend file will only be generated if there are commands in
# beforedepend/_EXTRADEPEND/afterdepend. The target is kept
# to allow 'make depend' to generate files.
${DEPENDFILE}: ${DPSRCS} ${OP_META}
${DEPENDFILE}: ${DPSRCS}
.if !empty(.MAKE.MODE:Mmeta) || exists(${.OBJDIR}/${DEPENDFILE})
rm -f ${DEPENDFILE}
.endif

View File

@ -86,18 +86,18 @@ DVIPS2ASCII?= dvips2ascii
.SUFFIXES: ${ICOMPRESS_EXT} .info .texi .texinfo .dvi .ps .latin1 .html
.texi.info .texinfo.info: ${OP_META}
.texi.info .texinfo.info:
${MAKEINFO} ${MAKEINFOFLAGS} -I ${.CURDIR} -I ${SRCDIR} ${.IMPSRC} \
-o ${.TARGET}
.texi.dvi .texinfo.dvi: ${OP_META}
.texi.dvi .texinfo.dvi:
TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \
${TEX} ${.IMPSRC} </dev/null
# Run again to resolve cross references.
TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \
${TEX} ${.IMPSRC} </dev/null
.texinfo.latin1 .texi.latin1: ${OP_META}
.texinfo.latin1 .texi.latin1:
perl -npe 's/(^\s*\\input\s+texinfo\s+)/$$1\n@tex\n\\global\\hsize=120mm\n@end tex\n\n/' ${.IMPSRC} >> ${.IMPSRC:T:R}-la.texi
TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \
${TEX} ${.IMPSRC:T:R}-la.texi </dev/null
@ -108,10 +108,10 @@ DVIPS2ASCII?= dvips2ascii
${DVIPS2ASCII} > ${.TARGET}.new
mv -f ${.TARGET}.new ${.TARGET}
.dvi.ps: ${OP_META}
.dvi.ps:
${DVIPS} -o ${.TARGET} ${.IMPSRC}
.info.html: ${OP_META}
.info.html:
${INFO2HTML} ${.IMPSRC}
${INSTALL_LINK} ${.TARGET:R}.info.Top.html ${.TARGET}
@ -133,7 +133,7 @@ all: ${IFILES}
.endif
.for x in ${IFILENS}
${x:S/$/${ICOMPRESS_EXT}/}: ${x} ${OP_META}
${x:S/$/${ICOMPRESS_EXT}/}: ${x}
${ICOMPRESS_CMD} ${.ALLSRC} > ${.TARGET}
.endfor
@ -158,7 +158,7 @@ ${x:S/$/-install/}:
.if defined(SRCS)
CLEANFILES+= ${INFO}.texi
${INFO}.texi: ${SRCS} ${OP_META}
${INFO}.texi: ${SRCS}
cat ${.ALLSRC} > ${.TARGET}
.endif

View File

@ -91,55 +91,55 @@ PICFLAG=-fpic
PO_FLAG=-pg
.c.o: ${OP_META}
.c.o:
${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
.c.po: ${OP_META}
.c.po:
${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
.c.So: ${OP_META}
.c.So:
${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
.cc.o .C.o .cpp.o .cxx.o: ${OP_META}
.cc.o .C.o .cpp.o .cxx.o:
${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
.cc.po .C.po .cpp.po .cxx.po: ${OP_META}
.cc.po .C.po .cpp.po .cxx.po:
${CXX} ${PO_FLAG} ${STATIC_CXXFLAGS} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
.cc.So .C.So .cpp.So .cxx.So: ${OP_META}
.cc.So .C.So .cpp.So .cxx.So:
${CXX} ${PICFLAG} -DPIC ${SHARED_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
.f.po: ${OP_META}
.f.po:
${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
${CTFCONVERT_CMD}
.f.So: ${OP_META}
.f.So:
${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
${CTFCONVERT_CMD}
.s.po .s.So: ${OP_META}
.s.po .s.So:
${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC}
${CTFCONVERT_CMD}
.asm.po: ${OP_META}
.asm.po:
${CC:N${CCACHE_BIN}} -x assembler-with-cpp -DPROF ${PO_CFLAGS} \
${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
.asm.So: ${OP_META}
.asm.So:
${CC:N${CCACHE_BIN}} -x assembler-with-cpp ${PICFLAG} -DPIC \
${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
.S.po: ${OP_META}
.S.po:
${CC:N${CCACHE_BIN}} -DPROF ${PO_CFLAGS} ${ACFLAGS} -c ${.IMPSRC} \
-o ${.TARGET}
${CTFCONVERT_CMD}
.S.So: ${OP_META}
.S.So:
${CC:N${CCACHE_BIN}} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} \
-c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
@ -183,7 +183,7 @@ CLEANFILES+= ${OBJS} ${STATICOBJS}
.if defined(LIB) && !empty(LIB)
_LIBS= lib${LIB_PRIVATE}${LIB}.a
lib${LIB_PRIVATE}${LIB}.a: ${OBJS} ${STATICOBJS} ${OP_META}
lib${LIB_PRIVATE}${LIB}.a: ${OBJS} ${STATICOBJS}
@${ECHO} building static ${LIB} library
@rm -f ${.TARGET}
${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' NMFLAGS='${NMFLAGS}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
@ -198,7 +198,7 @@ POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o=.po}
DEPENDOBJS+= ${POBJS}
CLEANFILES+= ${POBJS}
lib${LIB_PRIVATE}${LIB}_p.a: ${POBJS} ${OP_META}
lib${LIB_PRIVATE}${LIB}_p.a: ${POBJS}
@${ECHO} building profiled ${LIB} library
@rm -f ${.TARGET}
${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' NMFLAGS='${NMFLAGS}' lorder ${POBJS} | tsort -q` ${ARADD}
@ -230,7 +230,7 @@ ${SHLIB_NAME_FULL}: beforelinking
.if defined(SHLIB_LINK)
.if defined(SHLIB_LDSCRIPT) && !empty(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT})
${SHLIB_LINK:R}.ld: ${.CURDIR}/${SHLIB_LDSCRIPT} ${OP_META}
${SHLIB_LINK:R}.ld: ${.CURDIR}/${SHLIB_LDSCRIPT}
sed -e 's,@@SHLIB@@,${_SHLIBDIR}/${SHLIB_NAME},g' \
-e 's,@@LIBDIR@@,${_LIBDIR},g' \
${.ALLSRC} > ${.TARGET}
@ -241,7 +241,7 @@ CLEANFILES+= ${SHLIB_LINK:R}.ld
CLEANFILES+= ${SHLIB_LINK}
.endif
${SHLIB_NAME_FULL}: ${SOBJS} ${OP_META}
${SHLIB_NAME_FULL}: ${SOBJS}
@${ECHO} building shared library ${SHLIB_NAME}
@rm -f ${SHLIB_NAME} ${SHLIB_LINK}
.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld)
@ -256,11 +256,11 @@ ${SHLIB_NAME_FULL}: ${SOBJS} ${OP_META}
.if ${MK_DEBUG_FILES} != "no"
CLEANFILES+= ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug
${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug ${OP_META}
${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug
${OBJCOPY} --strip-debug --add-gnu-debuglink=${SHLIB_NAME}.debug \
${SHLIB_NAME_FULL} ${.TARGET}
${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL} ${OP_META}
${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL}
${OBJCOPY} --only-keep-debug ${SHLIB_NAME_FULL} ${.TARGET}
.endif
.endif #defined(SHLIB_NAME)
@ -268,7 +268,7 @@ ${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL} ${OP_META}
.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no"
_LIBS+= lib${LIB_PRIVATE}${LIB}_pic.a
lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} ${OP_META}
lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS}
@${ECHO} building special pic ${LIB} library
@rm -f ${.TARGET}
${AR} ${ARFLAGS} ${.TARGET} ${SOBJS} ${ARADD}
@ -281,7 +281,7 @@ _LIBS+= ${LINTLIB}
LINTOBJS+= ${SRCS:M*.c:.c=.ln}
CLEANFILES+= ${LINTOBJS}
${LINTLIB}: ${LINTOBJS} ${OP_META}
${LINTLIB}: ${LINTOBJS}
@${ECHO} building lint library ${.TARGET}
@rm -f ${.TARGET}
${LINT} ${LINTLIBFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC}

View File

@ -99,7 +99,7 @@ ${__target}: ${__page}
.if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
.for __target in ${__page:T:S/$/${CATEXT}${FILTEXTENSION}/g}
all-man: ${__target}
${__target}: ${__page} ${OP_META}
${__target}: ${__page}
${MANFILTER} < ${.ALLSRC} | ${MANDOC_CMD} > ${.TARGET}
.endfor
.endif
@ -112,7 +112,7 @@ CLEANFILES+= ${MAN:T:S/$/${CATEXT}/g}
.for __page in ${MAN}
.for __target in ${__page:T:S/$/${CATEXT}/g}
all-man: ${__target}
${__target}: ${__page} ${OP_META}
${__target}: ${__page}
${MANDOC_CMD} ${.ALLSRC} > ${.TARGET}
.endfor
.endfor
@ -148,7 +148,7 @@ CLEANFILES+= ${MAN:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g}
.for __page in ${MAN}
.for __target in ${__page:T:S/$/${MCOMPRESS_EXT}/}
all-man: ${__target}
${__target}: ${__page} ${OP_META}
${__target}: ${__page}
.if defined(MANFILTER)
${MANFILTER} < ${.ALLSRC} | ${MCOMPRESS_CMD} > ${.TARGET}
.else
@ -158,7 +158,7 @@ ${__target}: ${__page} ${OP_META}
.if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
.for __target in ${__page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/}
all-man: ${__target}
${__target}: ${__page} ${OP_META}
${__target}: ${__page}
.if defined(MANFILTER)
${MANFILTER} < ${.ALLSRC} | ${MANDOC_CMD} | ${MCOMPRESS_CMD} > ${.TARGET}
.else

View File

@ -42,7 +42,7 @@ NLSSRCFILES_${file}?= ${NLSSRCFILES}
.endif
.if defined(NLSSRCFILES_${file})
NLSSRCDIR_${file}?= ${NLSSRCDIR}
${file}.msg: ${NLSSRCFILES_${file}:S/^/${NLSSRCDIR_${file}}\//} ${OP_META}
${file}.msg: ${NLSSRCFILES_${file}:S/^/${NLSSRCDIR_${file}}\//}
@rm -f ${.TARGET}
cat ${.ALLSRC} > ${.TARGET}
CLEANFILES+= ${file}.msg

View File

@ -90,7 +90,7 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
beforelinking: ${OBJS}
${PROG_FULL}: beforelinking
.endif
${PROG_FULL}: ${OBJS} ${OP_META}
${PROG_FULL}: ${OBJS}
.if defined(PROG_CXX)
${CXX:N${CCACHE_BIN}} ${CXXFLAGS:N-M*} ${LDFLAGS} -o ${.TARGET} \
${OBJS} ${LDADD}
@ -122,7 +122,7 @@ OBJS+= ${PROG}.o
beforelinking: ${OBJS}
${PROG_FULL}: beforelinking
.endif
${PROG_FULL}: ${OBJS} ${OP_META}
${PROG_FULL}: ${OBJS}
.if defined(PROG_CXX)
${CXX:N${CCACHE_BIN}} ${CXXFLAGS:N-M*} ${LDFLAGS} -o ${.TARGET} \
${OBJS} ${LDADD}
@ -138,11 +138,11 @@ ${PROG_FULL}: ${OBJS} ${OP_META}
.endif # !defined(SRCS)
.if ${MK_DEBUG_FILES} != "no"
${PROG}: ${PROG_FULL} ${PROGNAME}.debug ${OP_META}
${PROG}: ${PROG_FULL} ${PROGNAME}.debug
${OBJCOPY} --strip-debug --add-gnu-debuglink=${PROGNAME}.debug \
${PROG_FULL} ${.TARGET}
${PROGNAME}.debug: ${PROG_FULL} ${OP_META}
${PROGNAME}.debug: ${PROG_FULL}
${OBJCOPY} --only-keep-debug ${PROG_FULL} ${.TARGET}
.endif

View File

@ -61,9 +61,6 @@ META_MODE+= nofilemon
META_MODE?= normal
.export META_MODE
.MAKE.MODE?= ${META_MODE}
.if ${.MAKE.MODE:Mmeta*} != ""
OP_META= .META
.endif
.if ${MK_AUTO_OBJ} == "yes"
# This needs to be done early - before .PATH is computed
@ -292,99 +289,99 @@ YFLAGS ?= -d
# non-Posix rule set
.sh: ${OP_META}
.sh:
cp -f ${.IMPSRC} ${.TARGET}
chmod a+x ${.TARGET}
.c.ln: ${OP_META}
.c.ln:
${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} || \
touch ${.TARGET}
.cc.ln .C.ln .cpp.ln .cxx.ln: ${OP_META}
.cc.ln .C.ln .cpp.ln .cxx.ln:
${LINT} ${LINTOBJFLAGS} ${CXXFLAGS:M-[DIU]*} ${.IMPSRC} || \
touch ${.TARGET}
.c: ${OP_META}
.c:
${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
${CTFCONVERT_CMD}
.c.o: ${OP_META}
.c.o:
${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
.cc .cpp .cxx .C: ${OP_META}
.cc .cpp .cxx .C:
${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
.cc.o .cpp.o .cxx.o .C.o: ${OP_META}
.cc.o .cpp.o .cxx.o .C.o:
${CXX} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
.m.o: ${OP_META}
.m.o:
${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
.p.o: ${OP_META}
.p.o:
${PC} ${PFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
.e .r .F .f: ${OP_META}
.e .r .F .f:
${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} \
-o ${.TARGET}
.e.o .r.o .F.o .f.o: ${OP_META}
.e.o .r.o .F.o .f.o:
${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} -c ${.IMPSRC} -o ${.TARGET}
.S.o: ${OP_META}
.S.o:
${CC:N${CCACHE_BIN}} ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
.asm.o: ${OP_META}
.asm.o:
${CC:N${CCACHE_BIN}} -x assembler-with-cpp ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} \
-o ${.TARGET}
${CTFCONVERT_CMD}
.s.o: ${OP_META}
.s.o:
${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC}
${CTFCONVERT_CMD}
# XXX not -j safe
.y.o: ${OP_META}
.y.o:
${YACC} ${YFLAGS} ${.IMPSRC}
${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET}
rm -f y.tab.c
${CTFCONVERT_CMD}
.l.o: ${OP_META}
.l.o:
${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c
${CC} ${CFLAGS} -c ${.PREFIX}.tmp.c -o ${.TARGET}
rm -f ${.PREFIX}.tmp.c
${CTFCONVERT_CMD}
# XXX not -j safe
.y.c: ${OP_META}
.y.c:
${YACC} ${YFLAGS} ${.IMPSRC}
mv y.tab.c ${.TARGET}
.l.c: ${OP_META}
.l.c:
${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.TARGET}
.s.out .c.out .o.out: ${OP_META}
.s.out .c.out .o.out:
${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
${CTFCONVERT_CMD}
.f.out .F.out .r.out .e.out: ${OP_META}
.f.out .F.out .r.out .e.out:
${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} \
${LDLIBS} -o ${.TARGET}
rm -f ${.PREFIX}.o
${CTFCONVERT_CMD}
# XXX not -j safe
.y.out: ${OP_META}
.y.out:
${YACC} ${YFLAGS} ${.IMPSRC}
${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET}
rm -f y.tab.c
${CTFCONVERT_CMD}
.l.out: ${OP_META}
.l.out:
${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c
${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET}
rm -f ${.PREFIX}.tmp.c

View File

@ -108,10 +108,10 @@ modules-all modules-depend: modules-obj
FULLKERNEL= ${KERNEL_KO}
.else
FULLKERNEL= ${KERNEL_KO}.full
${KERNEL_KO}: ${FULLKERNEL} ${KERNEL_KO}.debug ${OP_META}
${KERNEL_KO}: ${FULLKERNEL} ${KERNEL_KO}.debug
${OBJCOPY} --strip-debug --add-gnu-debuglink=${KERNEL_KO}.debug \
${FULLKERNEL} ${.TARGET}
${KERNEL_KO}.debug: ${FULLKERNEL} ${OP_META}
${KERNEL_KO}.debug: ${FULLKERNEL}
${OBJCOPY} --only-keep-debug ${FULLKERNEL} ${.TARGET}
install.debug reinstall.debug: gdbinit
cd ${.CURDIR}; ${MAKE} ${.TARGET:R}
@ -127,7 +127,7 @@ gdbinit:
.endif
.endif
${FULLKERNEL}: ${SYSTEM_DEP} vers.o ${OP_META}
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
@rm -f ${.TARGET}
@echo linking ${.TARGET}
${SYSTEM_LD}
@ -150,9 +150,9 @@ LNFILES= ${CFILES:T:S/.c$/.ln/}
.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} ${OP_META}
${mfile:T:S/.m$/.c/}: ${mfile}
${AWK} -f $S/tools/makeobjops.awk ${mfile} -c
${mfile:T:S/.m$/.h/}: ${mfile} ${OP_META}
${mfile:T:S/.m$/.h/}: ${mfile}
${AWK} -f $S/tools/makeobjops.awk ${mfile} -h
.endfor
@ -172,18 +172,18 @@ lint: ${LNFILES}
# dynamic references. We could probably do a '-Bforcedynamic' mode like
# in the a.out ld. For now, this works.
HACK_EXTRA_FLAGS?= -shared
hack.So: Makefile ${OP_META}
hack.So: Makefile
:> hack.c
${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.So
rm -f hack.c
assym.s: $S/kern/genassym.sh genassym.o ${OP_META}
assym.s: $S/kern/genassym.sh genassym.o
NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET}
genassym.o: $S/$M/$M/genassym.c ${OP_META}
genassym.o: $S/$M/$M/genassym.c
${CC} -c ${CFLAGS:N-fno-common} $S/$M/$M/genassym.c
${SYSTEM_OBJS} genassym.o vers.o: opt_global.h ${OP_META}
${SYSTEM_OBJS} genassym.o vers.o: opt_global.h
# Skip reading .depend when not needed to speed up tree-walks
# and simple lookups.
@ -260,7 +260,7 @@ ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}:N*.h}
.NOPATH: .depend ${DEPENDFILES_OBJS}
.depend: .PRECIOUS ${SRCS} ${OP_META}
.depend: .PRECIOUS ${SRCS}
_ILINKS= machine
.if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64"
@ -339,26 +339,26 @@ kernel-reinstall:
${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.debug ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/
.endif
config.o env.o hints.o vers.o vnode_if.o: ${OP_META}
config.o env.o hints.o vers.o vnode_if.o:
${NORMAL_C}
${NORMAL_CTFCONVERT}
config.ln env.ln hints.ln vers.ln vnode_if.ln: ${OP_META}
config.ln env.ln hints.ln vers.ln vnode_if.ln:
${NORMAL_LINT}
vers.c: $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP} ${OP_META}
vers.c: $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP}
MAKE=${MAKE} sh $S/conf/newvers.sh ${KERN_IDENT}
vnode_if.c: $S/tools/vnode_if.awk $S/kern/vnode_if.src ${OP_META}
vnode_if.c: $S/tools/vnode_if.awk $S/kern/vnode_if.src
${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -c
vnode_if.h vnode_if_newproto.h vnode_if_typedef.h: $S/tools/vnode_if.awk \
$S/kern/vnode_if.src ${OP_META}
vnode_if.h: vnode_if_newproto.h vnode_if_typedef.h ${OP_META}
$S/kern/vnode_if.src
vnode_if.h: vnode_if_newproto.h vnode_if_typedef.h
${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -h
vnode_if_newproto.h: ${OP_META}
vnode_if_newproto.h:
${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -p
vnode_if_typedef.h: ${OP_META}
vnode_if_typedef.h:
${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -q
.if ${MFS_IMAGE:Uno} != "no"
@ -367,7 +367,7 @@ vnode_if_typedef.h: ${OP_META}
# via linking. Make sure the contents are in the mfs section and rename the
# start/end/size variables to __start_mfs, __stop_mfs, and mfs_size,
# respectively.
embedfs_${MFS_IMAGE:T:R}.o: ${MFS_IMAGE} ${OP_META}
embedfs_${MFS_IMAGE:T:R}.o: ${MFS_IMAGE}
${OBJCOPY} --input-target binary \
--output-target ${EMBEDFS_FORMAT.${MACHINE_ARCH}} \
--binary-architecture ${EMBEDFS_ARCH.${MACHINE_ARCH}} \

View File

@ -22,7 +22,6 @@ _srcconf_included_:
# The kernel build always occurs in the object directory which is .CURDIR.
.if ${.MAKE.MODE:Unormal:Mmeta}
.MAKE.MODE+= curdirOk=yes
OP_META= .META
.endif
# Can be overridden by makeoptions or /etc/make.conf

View File

@ -159,7 +159,7 @@ CTFFLAGS+= -g
.endif
.if defined(FIRMWS)
${KMOD:S/$/.c/}: ${SYSDIR}/tools/fw_stub.awk ${OP_META}
${KMOD:S/$/.c/}: ${SYSDIR}/tools/fw_stub.awk
${AWK} -f ${SYSDIR}/tools/fw_stub.awk ${FIRMWS} -m${KMOD} -c${KMOD:S/$/.c/g} \
${FIRMWARE_LICENSE:C/.+/-l/}${FIRMWARE_LICENSE}
@ -167,7 +167,7 @@ SRCS+= ${KMOD:S/$/.c/}
CLEANFILES+= ${KMOD:S/$/.c/}
.for _firmw in ${FIRMWS}
${_firmw:C/\:.*$/.fwo/:T}: ${_firmw:C/\:.*$//} ${OP_META}
${_firmw:C/\:.*$/.fwo/:T}: ${_firmw:C/\:.*$//}
@${ECHO} ${_firmw:C/\:.*$//} ${.ALLSRC:M*${_firmw:C/\:.*$//}}
@if [ -e ${_firmw:C/\:.*$//} ]; then \
${LD} -b binary --no-warn-mismatch ${_LDFLAGS} \
@ -198,15 +198,15 @@ PROG= ${KMOD}.ko
FULLPROG= ${PROG}
.else
FULLPROG= ${PROG}.full
${PROG}: ${FULLPROG} ${PROG}.debug ${OP_META}
${PROG}: ${FULLPROG} ${PROG}.debug
${OBJCOPY} --strip-debug --add-gnu-debuglink=${PROG}.debug \
${FULLPROG} ${.TARGET}
${PROG}.debug: ${FULLPROG} ${OP_META}
${PROG}.debug: ${FULLPROG}
${OBJCOPY} --only-keep-debug ${FULLPROG} ${.TARGET}
.endif
.if ${__KLD_SHARED} == yes
${FULLPROG}: ${KMOD}.kld ${OP_META}
${FULLPROG}: ${KMOD}.kld
.if ${MACHINE_CPUARCH} != "aarch64"
${LD} -Bshareable ${_LDFLAGS} -o ${.TARGET} ${KMOD}.kld
.else
@ -229,9 +229,9 @@ CLEANFILES+= export_syms
.endif
.if ${__KLD_SHARED} == yes
${KMOD}.kld: ${OBJS} ${OP_META}
${KMOD}.kld: ${OBJS}
.else
${FULLPROG}: ${OBJS} ${OP_META}
${FULLPROG}: ${OBJS}
.endif
${LD} ${_LDFLAGS} -r -d -o ${.TARGET} ${OBJS}
.if ${MK_CTF} != "no"
@ -397,16 +397,16 @@ _MATCHES=${_MFILES:${_MATCH}}
CLEANFILES+= ${_i}
.endif
.endfor # _i
.m.c: ${SYSDIR}/tools/makeobjops.awk ${OP_META}
.m.c: ${SYSDIR}/tools/makeobjops.awk
${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -c
.m.h: ${SYSDIR}/tools/makeobjops.awk ${OP_META}
.m.h: ${SYSDIR}/tools/makeobjops.awk
${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -h
.for _i in mii pccard
.if !empty(SRCS:M${_i}devs.h)
CLEANFILES+= ${_i}devs.h
${_i}devs.h: ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs ${OP_META}
${_i}devs.h: ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs
${AWK} -f ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs
.endif
.endfor # _i
@ -415,9 +415,8 @@ ${_i}devs.h: ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs ${OP_
CLEANFILES+= bhnd_nvram_map.h
bhnd_nvram_map.h: ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.awk \
${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \
${SYSDIR}/dev/bhnd/nvram/nvram_map \
${OP_META}
bhnd_nvram_map.h: ${OP_META}
${SYSDIR}/dev/bhnd/nvram/nvram_map
bhnd_nvram_map.h:
sh ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \
${SYSDIR}/dev/bhnd/nvram/nvram_map -h
.endif
@ -426,28 +425,27 @@ bhnd_nvram_map.h: ${OP_META}
CLEANFILES+= bhnd_nvram_map_data.h
bhnd_nvram_map_data.h: ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.awk \
${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \
${SYSDIR}/dev/bhnd/nvram/nvram_map \
${OP_META}
bhnd_nvram_map_data.h: ${OP_META}
${SYSDIR}/dev/bhnd/nvram/nvram_map
bhnd_nvram_map_data.h:
sh ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \
${SYSDIR}/dev/bhnd/nvram/nvram_map -d
.endif
.if !empty(SRCS:Musbdevs.h)
CLEANFILES+= usbdevs.h
usbdevs.h: ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs ${OP_META}
usbdevs.h: ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs
${AWK} -f ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs -h
.endif
.if !empty(SRCS:Musbdevs_data.h)
CLEANFILES+= usbdevs_data.h
usbdevs_data.h: ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs ${OP_META}
usbdevs_data.h: ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs
${AWK} -f ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs -d
.endif
.if !empty(SRCS:Macpi_quirks.h)
CLEANFILES+= acpi_quirks.h
acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYSDIR}/dev/acpica/acpi_quirks ${OP_META}
acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYSDIR}/dev/acpica/acpi_quirks
${AWK} -f ${SYSDIR}/tools/acpi_quirks2h.awk ${SYSDIR}/dev/acpica/acpi_quirks
.endif
@ -457,10 +455,10 @@ assym.s: genassym.o
.if defined(KERNBUILDDIR)
genassym.o: opt_global.h
.endif
assym.s: ${SYSDIR}/kern/genassym.sh ${OP_META}
assym.s: ${SYSDIR}/kern/genassym.sh
sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET}
genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c
genassym.o: ${SRCS:Mopt_*.h} ${OP_META}
genassym.o: ${SRCS:Mopt_*.h}
${CC} -c ${CFLAGS:N-fno-common} \
${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c
.endif