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.
This commit is contained in:
parent
16c87dea9e
commit
80f498e559
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user