summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/mkmakefile.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/config/mkmakefile.c')
-rw-r--r--usr.sbin/config/mkmakefile.c10
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)
OpenPOWER on IntegriCloud