diff options
author | thompsa <thompsa@FreeBSD.org> | 2008-11-22 21:12:47 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2008-11-22 21:12:47 +0000 |
commit | 5318a382021b6858d3c7b227374bb63f1cee475b (patch) | |
tree | ce5f36b115a6a6a932e4502c39f7ebd888e783c3 /usr.sbin/config/mkmakefile.c | |
parent | 97bb9372d961b30e30ca508bac0761e50c53a8e0 (diff) | |
download | FreeBSD-src-5318a382021b6858d3c7b227374bb63f1cee475b.zip FreeBSD-src-5318a382021b6858d3c7b227374bb63f1cee475b.tar.gz |
Allow multiple makeoption lines to be used with the += operator, this permits
the following syntax in the kernel config.
makeoptions MODULES_OVERRIDE=foo
makeoptions MODULES_OVERRIDE+=bar
makeoptions MODULES_OVERRIDE+=baz
Bump config minor version to 600007.
Diffstat (limited to 'usr.sbin/config/mkmakefile.c')
-rw-r--r-- | usr.sbin/config/mkmakefile.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index b6f1f18..a89db8e 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -110,7 +110,7 @@ makefile(void) { FILE *ifp, *ofp; char line[BUFSIZ]; - struct opt *op; + struct opt *op, *t; int versreq; read_files(); @@ -127,8 +127,12 @@ makefile(void) if (ofp == 0) err(1, "%s", path("Makefile.new")); fprintf(ofp, "KERN_IDENT=%s\n", ident); - SLIST_FOREACH(op, &mkopt, op_next) - fprintf(ofp, "%s=%s\n", op->op_name, op->op_value); + SLIST_FOREACH_SAFE(op, &mkopt, op_next, t) { + fprintf(ofp, "%s=%s", op->op_name, op->op_value); + while ((op = SLIST_NEXT(op, op_append)) != NULL) + fprintf(ofp, " %s", op->op_value); + fprintf(ofp, "\n"); + } if (debugging) fprintf(ofp, "DEBUG=-g\n"); if (profiling) |