Changeset View
Standalone View
bin/sh/Makefile
Show All 33 Lines | |||||
.PATH: ${.CURDIR}/bltin \ | .PATH: ${.CURDIR}/bltin \ | ||||
${.CURDIR:H}/kill \ | ${.CURDIR:H}/kill \ | ||||
${.CURDIR:H}/test \ | ${.CURDIR:H}/test \ | ||||
${SRCTOP}/usr.bin/printf | ${SRCTOP}/usr.bin/printf | ||||
CLEANFILES+= mknodes mksyntax | CLEANFILES+= mknodes mksyntax | ||||
CLEANFILES+= ${GENSRCS} ${GENHDRS} | CLEANFILES+= ${GENSRCS} ${GENHDRS} | ||||
build-tools: mknodes mksyntax | |||||
.ORDER: builtins.c builtins.h | .ORDER: builtins.c builtins.h | ||||
builtins.h: .NOMETA | builtins.h: .NOMETA | ||||
builtins.c builtins.h: mkbuiltins builtins.def | builtins.c builtins.h: mkbuiltins builtins.def | ||||
sh ${.CURDIR}/mkbuiltins ${.CURDIR} | sh ${.CURDIR}/mkbuiltins ${.CURDIR} | ||||
DEPENDOBJS+= mknodes mksyntax | DEPENDOBJS+= mknodes mksyntax | ||||
mknodes mksyntax: ${BUILD_TOOLS_META} | mknodes: mknodes.c | ||||
${BUILD_TOOLS_CC} ${.IMPSRC} -o ${.TARGET} | |||||
bdrewery: This regresses ccache and .depend file usage fixes. | |||||
Done Inline ActionsIn what way does ccache regress? I don't use it so not sure what the expected behaviour is. arichardson: In what way does ccache regress? I don't use it so not sure what the expected behaviour is.
I… | |||||
Not Done Inline Actionsgit log --author=bdrewery on all Makefiles here will give some insight. It hasn't been easy to get all of the different build modes working together and keeping features like dependencies and caching working on top of that. Some of the problems go back decades. A. For all of these except make -C bin/sh assume cross-build
Especially #6 but also #1-3 all need to work with existing and missing .depend.foo.o files, as well as with missing generated headers, updated source files. And the install phases for each of these need to not be rebuilding anything. This is especially problematic for WITH_META_MODE. bdrewery: `git log --author=bdrewery` on all Makefiles here will give some insight. It hasn't been easy… | |||||
mksyntax: mksyntax.c | |||||
${BUILD_TOOLS_CC} ${.IMPSRC} -o ${.TARGET} | |||||
.ORDER: nodes.c nodes.h | .ORDER: nodes.c nodes.h | ||||
nodes.h: .NOMETA | nodes.h: .NOMETA | ||||
nodes.c nodes.h: mknodes nodetypes nodes.c.pat | nodes.c nodes.h: mknodes nodetypes nodes.c.pat | ||||
${BTOOLSPATH:U.}/mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat | ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat | ||||
Not Done Inline ActionsAt least use a variable. In our internal build we have: `.if defined(HOST_OBJTOP) ` But leaving the deafult as ${BTOOLSPATH:U.}/mknodes leaves open the option of building mknodes etc and staging them to say ${STAGE_HOST_OBJTOP}/bin and setting BTOOLSPATH to that. This matters more when the target dir is built many. times and you want to only build the. host tools once... sjg: At least use a variable. In our internal build we have:
`.if defined(HOST_OBJTOP)
MKNODES=… | |||||
Not Done Inline ActionsYes we really need the BTOOLSPATH pattern to remain or be in the default PATH as the first entry. bdrewery: Yes we really need the BTOOLSPATH pattern to remain or be in the default PATH as the first… | |||||
Done Inline ActionsWill drop those changes and keep BTOOLSPATH. arichardson: Will drop those changes and keep BTOOLSPATH. | |||||
.ORDER: syntax.c syntax.h | .ORDER: syntax.c syntax.h | ||||
syntax.h: .NOMETA | syntax.h: .NOMETA | ||||
syntax.c syntax.h: mksyntax | syntax.c syntax.h: mksyntax | ||||
${BTOOLSPATH:U.}/mksyntax | ./mksyntax | ||||
token.h: mktokens | token.h: mktokens | ||||
sh ${.CURDIR}/mktokens | sh ${.CURDIR}/mktokens | ||||
HAS_TESTS= | HAS_TESTS= | ||||
SUBDIR.${MK_TESTS}+= tests | SUBDIR.${MK_TESTS}+= tests | ||||
beforeinstallconfig: | beforeinstallconfig: | ||||
rm -f ${DESTDIR}/.profile | rm -f ${DESTDIR}/.profile | ||||
afterinstallconfig: | afterinstallconfig: | ||||
${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile | ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile | ||||
.include <bsd.prog.mk> | .include <bsd.prog.mk> |
This regresses ccache and .depend file usage fixes.