Avoid redundant 'make objs' tree-walk when building the main prog.

The main prog has a dependency on the submake targets to ensure they are
built.  From bsd.crunchgen.mk though we already have our own dependency
on 'make objs' so there is no need for another one.  Crunchgen(1) is
doing the right thing here so it is not modified.

This also prevents the CC fix tainting the submake environment with
META_MODE and causing rebuilds.  The CC passed is is only intended for
the main prog itself.

Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2016-05-26 23:20:30 +00:00
parent ec02e5e3ba
commit 8ab3985652

View File

@ -110,6 +110,9 @@ ${OUTPUTS:[1]}: .META
${OUTPUTS}: ${CONF}
MAKE=${MAKE} ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} \
${CRUNCHGEN} -fq -m ${OUTMK} -c ${OUTC} ${CONF}
# Avoid redundantly calling 'make objs' which we've done by our
# own dependencies.
sed -i '' -e "s/^\(${PROG}:.*\) \$$(SUBMAKE_TARGETS)/\1/" ${OUTMK}
# These 2 targets cannot use .MAKE since they depend on the generated
# ${OUTMK} above.