Module Name: src Committed By: uebayasi Date: Fri Sep 4 01:24:01 UTC 2015
Modified Files: src/usr.bin/config: files.c mkmakefile.c Log Message: Share more code by making *.o handling less special. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.bin/config/files.c cvs rdiff -u -r1.63 -r1.64 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.29 src/usr.bin/config/files.c:1.30 --- src/usr.bin/config/files.c:1.29 Thu Sep 3 14:23:52 2015 +++ src/usr.bin/config/files.c Fri Sep 4 01:24:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.29 2015/09/03 14:23:52 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.30 2015/09/04 01:24:01 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: files.c,v 1.29 2015/09/03 14:23:52 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.30 2015/09/04 01:24:01 uebayasi Exp $"); #include <sys/param.h> #include <errno.h> @@ -195,6 +195,7 @@ addfile(const char *path, struct condexp break; case 'o': TAILQ_INSERT_TAIL(&allofiles, fi, fi_snext); + TAILQ_INSERT_TAIL(&allfiles, fi, fi_next); break; default: cfgxerror(fi->fi_srcfile, fi->fi_srcline, Index: src/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.63 src/usr.bin/config/mkmakefile.c:1.64 --- src/usr.bin/config/mkmakefile.c:1.63 Thu Sep 3 13:32:07 2015 +++ src/usr.bin/config/mkmakefile.c Fri Sep 4 01:24:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.63 2015/09/03 13:32:07 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.64 2015/09/04 01:24:01 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: mkmakefile.c,v 1.63 2015/09/03 13:32:07 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.64 2015/09/04 01:24:01 uebayasi Exp $"); #include <sys/param.h> #include <ctype.h> @@ -334,20 +334,8 @@ emitfilerel(FILE *fp, struct files *fi) static void emitobjs(FILE *fp) { - struct files *fi; - int found = 0; - TAILQ_FOREACH(fi, &allofiles, fi_snext) { - if ((fi->fi_flags & FI_SEL) == 0) - continue; - if (found++ == 0) - fputs("OFILES= \\\n", fp); - putc('\t', fp); - emitfile(fp, fi); - fputs(" \\\n", fp); - } - if (found == 0) - fprintf(fp, "#%%OBJS\n"); + emitfiles(fp, &allofiles, 'o'); } static void