summaryrefslogtreecommitdiffstats
path: root/usr.sbin/crunch
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2009-01-13 06:52:51 +0000
committerobrien <obrien@FreeBSD.org>2009-01-13 06:52:51 +0000
commit3f0231d9a9ffeacd17638d2313517c00d7be64b9 (patch)
tree249419167ea95ffb9d6c406fe0e3baa6690532fc /usr.sbin/crunch
parent2819cd77d0091deea04843641ae0949c6c3bd196 (diff)
downloadFreeBSD-src-3f0231d9a9ffeacd17638d2313517c00d7be64b9.zip
FreeBSD-src-3f0231d9a9ffeacd17638d2313517c00d7be64b9.tar.gz
Set .POSIX mode, along with disable parallel mode. Crunchgen parses the
output from make(1) and its picky what it should look like. Also use make's conditional assignment operator rather than test and set.
Diffstat (limited to 'usr.sbin/crunch')
-rw-r--r--usr.sbin/crunch/crunchgen/crunchgen.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/crunch/crunchgen/crunchgen.c b/usr.sbin/crunch/crunchgen/crunchgen.c
index 71f6d5b..5915e13 100644
--- a/usr.sbin/crunch/crunchgen/crunchgen.c
+++ b/usr.sbin/crunch/crunchgen/crunchgen.c
@@ -709,12 +709,13 @@ void fillin_program_objs(prog_t *p, char *path)
if (outhdrname[0] != '\0')
fprintf(f, ".include \"%s\"\n", outhdrname);
fprintf(f, ".include \"%s\"\n", path);
+ fprintf(f, ".NOTPARALLEL:\n.NO_PARALLEL:\n.POSIX:\n");
if (buildopts) {
fprintf(f, "BUILDOPTS+=");
output_strlst(f, buildopts);
}
- fprintf(f, ".if defined(PROG) && !defined(%s)\n", objvar);
- fprintf(f, "%s=${PROG}.o\n", objvar);
+ fprintf(f, ".if defined(PROG)\n");
+ fprintf(f, "%s?=${PROG}.o\n", objvar);
fprintf(f, ".endif\n");
fprintf(f, "loop:\n\t@echo 'OBJS= '${%s}\n", objvar);
@@ -727,7 +728,7 @@ void fillin_program_objs(prog_t *p, char *path)
fclose(f);
- snprintf(line, MAXLINELEN, "cd %s && make -f %s crunchgen_objs",
+ snprintf(line, MAXLINELEN, "cd %s && make -f %s -Q crunchgen_objs",
p->srcdir, tempfname);
if ((f = popen(line, "r")) == NULL) {
warn("submake pipe");
OpenPOWER on IntegriCloud