Module Name: src Committed By: uebayasi Date: Fri Sep 4 05:13:32 UTC 2015
Modified Files: src/usr.bin/config: files.c mkmakefile.c Log Message: Now Makefile.kern.inc handles swap<kernel>.c compiling/linking nicely, config(1) can become less hackish. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.bin/config/files.c cvs rdiff -u -r1.64 -r1.65 src/usr.bin/config/mkmakefile.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.30 src/usr.bin/config/files.c:1.31 --- src/usr.bin/config/files.c:1.30 Fri Sep 4 01:24:01 2015 +++ src/usr.bin/config/files.c Fri Sep 4 05:13:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.30 2015/09/04 01:24:01 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.31 2015/09/04 05:13:32 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: files.c,v 1.30 2015/09/04 01:24:01 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.31 2015/09/04 05:13:32 uebayasi Exp $"); #include <sys/param.h> #include <errno.h> @@ -274,20 +274,17 @@ fixfiles(void) struct files *fi, *ofi; struct nvlist *flathead, **flatp; int err, sel; + struct config *cf; + char swapname[100]; addfile("devsw.c", NULL, 0, NULL); addfile("ioconf.c", NULL, 0, NULL); - if (Sflag) { - struct config *cf; - char swapname[100]; - - TAILQ_FOREACH(cf, &allcf, cf_next) { - (void)snprintf(swapname, sizeof(swapname), "swap%s.c", - cf->cf_name); - addfile(intern(swapname), NULL, 0, NULL); - } - } + TAILQ_FOREACH(cf, &allcf, cf_next) { + (void)snprintf(swapname, sizeof(swapname), "swap%s.c", + cf->cf_name); + addfile(intern(swapname), NULL, 0, NULL); + } err = 0; TAILQ_FOREACH(fi, &allfiles, fi_next) { Index: src/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.64 src/usr.bin/config/mkmakefile.c:1.65 --- src/usr.bin/config/mkmakefile.c:1.64 Fri Sep 4 01:24:01 2015 +++ src/usr.bin/config/mkmakefile.c Fri Sep 4 05:13:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.64 2015/09/04 01:24:01 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.65 2015/09/04 05:13:32 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: mkmakefile.c,v 1.64 2015/09/04 01:24:01 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.65 2015/09/04 05:13:32 uebayasi Exp $"); #include <sys/param.h> #include <ctype.h> @@ -466,8 +466,6 @@ static void emitfiles(FILE *fp, struct filelist *filelist, int suffix) { struct files *fi; - struct config *cf; - char swapname[100]; int found = 0; TAILQ_FOREACH(fi, filelist, fi_snext) { @@ -479,23 +477,6 @@ emitfiles(FILE *fp, struct filelist *fil emitfilerel(fp, fi); fputs(" \\\n", fp); } - - /* - * The allfiles list does not include the configuration-specific - * C source files. These files should be eliminated someday, but - * for now, we have to add them to ${CFILES} (and only ${CFILES}). - */ - if (!Sflag) { - if (suffix == 'c') { - TAILQ_FOREACH(cf, &allcf, cf_next) { - found++; - (void)snprintf(swapname, sizeof(swapname), "swap%s.c", - cf->cf_name); - fprintf(fp, "\t%s \\\n", swapname); - } - } - } - if (found == 0) fprintf(fp, "#%%%cFILES\n", toupper(suffix)); }