summaryrefslogtreecommitdiffstats
path: root/usr.sbin/crunch/crunchgen
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-04-23 04:28:35 +0000
committerru <ru@FreeBSD.org>2003-04-23 04:28:35 +0000
commit6bcbb62f6a7008e4c95216c621ad278c730b4caf (patch)
tree154bb824b18d37d969720ba80bf52da9a61d0e57 /usr.sbin/crunch/crunchgen
parentb8272feca3d1c50d46e8a57e2364e08d00e6d5e6 (diff)
downloadFreeBSD-src-6bcbb62f6a7008e4c95216c621ad278c730b4caf.zip
FreeBSD-src-6bcbb62f6a7008e4c95216c621ad278c730b4caf.tar.gz
The second chdir(1) that I trimmed is needed too
if the program has an object directory. Explained by: Tim Kientzle <kientzle@acm.org>
Diffstat (limited to 'usr.sbin/crunch/crunchgen')
-rw-r--r--usr.sbin/crunch/crunchgen/crunchgen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/crunch/crunchgen/crunchgen.c b/usr.sbin/crunch/crunchgen/crunchgen.c
index 1026973..078b14f 100644
--- a/usr.sbin/crunch/crunchgen/crunchgen.c
+++ b/usr.sbin/crunch/crunchgen/crunchgen.c
@@ -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");
OpenPOWER on IntegriCloud