svn commit: r305254 - in head: share/mk usr.sbin/crunch/crunchgen

Bryan Drewery bdrewery at FreeBSD.org
Thu Sep 1 23:21:09 UTC 2016


Author: bdrewery
Date: Thu Sep  1 23:21:08 2016
New Revision: 305254
URL: https://svnweb.freebsd.org/changeset/base/305254

Log:
  META_MODE/DIRDEPS_BUILD: Fix various issues with crunch builds.
  
  - DIRDEPS_BUILD: Fix crunchgen builds losing their library dependencies
    on a nop-rebuild.
  - META_MODE: Fix not rebuilding various crunch.mk targets if their .meta
    files warrant a rebuild.  They were lacking .meta files previously.
    This adds .NOMETA to the crunch objects being used since they are
    already built.  Bmake was forcing a rebuild on them since their
    .meta files were not in the expected place; there is no reason to
    rebuild them.
  
  MFC after:	2 weeks
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.crunchgen.mk
  head/usr.sbin/crunch/crunchgen/crunchgen.c

Modified: head/share/mk/bsd.crunchgen.mk
==============================================================================
--- head/share/mk/bsd.crunchgen.mk	Thu Sep  1 23:20:54 2016	(r305253)
+++ head/share/mk/bsd.crunchgen.mk	Thu Sep  1 23:21:08 2016	(r305254)
@@ -123,11 +123,13 @@ ${OUTPUTS}: ${CONF}
 
 # These 2 targets cannot use .MAKE since they depend on the generated
 # ${OUTMK} above.
-${PROG}: ${OUTPUTS} objs .META
+${PROG}: ${OUTPUTS} objs .NOMETA .PHONY
 	${CRUNCHENV} \
 	    CC="${CC} ${CFLAGS} ${LDFLAGS}" \
 	    CXX="${CXX} ${CXXFLAGS} ${LDFLAGS}" \
-	    ${MAKE} .MAKE.MODE=normal -f ${OUTMK} exe
+	    ${MAKE} .MAKE.MODE="${.MAKE.MODE} curdirOk=yes" \
+	    .MAKE.META.IGNORE_PATHS="${.MAKE.META.IGNORE_PATHS}" \
+	    -f ${OUTMK} exe
 
 objs: ${OUTMK} .META
 	${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} \
@@ -167,3 +169,4 @@ clean:
 	fi
 
 META_XTRAS+=	${find ${CRUNCHOBJS}${SRCTOP} -name '*.meta' 2>/dev/null || true:L:sh}
+META_XTRAS+=	${PROG}.meta

Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c
==============================================================================
--- head/usr.sbin/crunch/crunchgen/crunchgen.c	Thu Sep  1 23:20:54 2016	(r305253)
+++ head/usr.sbin/crunch/crunchgen/crunchgen.c	Thu Sep  1 23:21:08 2016	(r305254)
@@ -1064,6 +1064,7 @@ prog_makefile_rules(FILE *outmk, prog_t 
 		}
 		fprintf(outmk, "\n");
 	}
+	fprintf(outmk, "$(%s_OBJPATHS): .NOMETA\n", p->ident);
 
 	if (p->srcdir && p->objs) {
 		fprintf(outmk, "%s_SRCDIR=%s\n", p->ident, p->srcdir);


More information about the svn-src-head mailing list