summaryrefslogtreecommitdiffstats
path: root/usr.sbin/crunch
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>2006-11-24 03:56:25 +0000
committerjb <jb@FreeBSD.org>2006-11-24 03:56:25 +0000
commitd863ef25a608e0aa0ab758213d9aa6716e4605d1 (patch)
tree1c5b12a60cd62653547ceb3527c2713a2a6a214f /usr.sbin/crunch
parent807d0a4e4189484d98d6979762737c6519b54de1 (diff)
downloadFreeBSD-src-d863ef25a608e0aa0ab758213d9aa6716e4605d1.zip
FreeBSD-src-d863ef25a608e0aa0ab758213d9aa6716e4605d1.tar.gz
Fix another parallel make problem with the generated make file.
Define the xxx_OBJPATHS earlier and then use it in the xxx_make target because each obj is actually made through that. This allows the crunch to work with -j32 on sun4v. The makefile generated is still poor, though. It really shouldn't use the general 'make all' to do the submakes in the app directories being crunched because each of those objects is listed as a dependency in the generated crunch makefile. Doing that really requires a unique rule to generate them.
Diffstat (limited to 'usr.sbin/crunch')
-rw-r--r--usr.sbin/crunch/crunchgen/crunchgen.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/usr.sbin/crunch/crunchgen/crunchgen.c b/usr.sbin/crunch/crunchgen/crunchgen.c
index ea20caa..fc75a6a 100644
--- a/usr.sbin/crunch/crunchgen/crunchgen.c
+++ b/usr.sbin/crunch/crunchgen/crunchgen.c
@@ -1017,6 +1017,16 @@ void prog_makefile_rules(FILE *outmk, prog_t *p)
p->ident);
fprintf(outmk, "\n");
+ fprintf(outmk, "%s_OBJPATHS=", p->ident);
+ if (p->objpaths)
+ output_strlst(outmk, p->objpaths);
+ else {
+ for (lst = p->objs; lst != NULL; lst = lst->next) {
+ fprintf(outmk, " $(%s_OBJDIR)/%s", p->ident, lst->str);
+ }
+ fprintf(outmk, "\n");
+ }
+
if (p->srcdir && p->objs) {
fprintf(outmk, "%s_SRCDIR=%s\n", p->ident, p->srcdir);
fprintf(outmk, "%s_REALSRCDIR=%s\n", p->ident, p->realsrcdir);
@@ -1027,6 +1037,7 @@ void prog_makefile_rules(FILE *outmk, prog_t *p)
fprintf(outmk, "%s_OPTS+=", p->ident);
output_strlst(outmk, p->buildopts);
}
+ fprintf(outmk, "$(%s_OBJPATHS): %s_make\n\n", p->ident, p->ident);
fprintf(outmk, "%s_make:\n", p->ident);
fprintf(outmk, "\t(cd $(%s_SRCDIR) && ", p->ident);
if (makeobj)
@@ -1048,15 +1059,6 @@ void prog_makefile_rules(FILE *outmk, prog_t *p)
p->name);
}
- fprintf(outmk, "%s_OBJPATHS=", p->ident);
- if (p->objpaths)
- output_strlst(outmk, p->objpaths);
- else {
- for (lst = p->objs; lst != NULL; lst = lst->next) {
- fprintf(outmk, " $(%s_OBJDIR)/%s", p->ident, lst->str);
- }
- fprintf(outmk, "\n");
- }
if (p->libs) {
fprintf(outmk, "%s_LIBS=", p->ident);
output_strlst(outmk, p->libs);
OpenPOWER on IntegriCloud