svn commit: r300804 - head/share/mk

Bryan Drewery bdrewery at FreeBSD.org
Thu May 26 23:20:32 UTC 2016


Author: bdrewery
Date: Thu May 26 23:20:30 2016
New Revision: 300804
URL: https://svnweb.freebsd.org/changeset/base/300804

Log:
  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

Modified:
  head/share/mk/bsd.crunchgen.mk

Modified: head/share/mk/bsd.crunchgen.mk
==============================================================================
--- head/share/mk/bsd.crunchgen.mk	Thu May 26 23:20:27 2016	(r300803)
+++ head/share/mk/bsd.crunchgen.mk	Thu May 26 23:20:30 2016	(r300804)
@@ -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.


More information about the svn-src-head mailing list