The second chdir(1) that I trimmed is needed too

if the program has an object directory.

Explained by:	Tim Kientzle <kientzle@acm.org>
This commit is contained in:
Ruslan Ermilov 2003-04-23 04:28:35 +00:00
parent 8b3182e212
commit 2343a53401
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113886

View File

@ -691,8 +691,9 @@ void fillin_program_objs(prog_t *p, char *path)
fprintf(f, ".endif\n");
fprintf(f, "loop:\n\t@echo 'OBJS= '${%s}\n", objvar);
fprintf(f, "crunchgen_objs:\n\t@make -f %s $(BUILDOPTS) $(%s_OPTS)",
tempfname, p->ident);
fprintf(f, "crunchgen_objs:\n"
"\t@cd %s && make -f %s $(BUILDOPTS) $(%s_OPTS)",
p->srcdir, tempfname, p->ident);
for (s = p->buildopts; s != NULL; s = s->next)
fprintf(f, " %s", s->str);
fprintf(f, " loop\n");