Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/config Simplify.



details:   https://anonhg.NetBSD.org/src/rev/086176d1ac77
branches:  trunk
changeset: 810370:086176d1ac77
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Fri Aug 28 09:16:29 2015 +0000

description:
Simplify.

diffstat:

 usr.bin/config/mkmakefile.c |  19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)

diffs (83 lines):

diff -r 617212abedc9 -r 086176d1ac77 usr.bin/config/mkmakefile.c
--- a/usr.bin/config/mkmakefile.c       Fri Aug 28 09:06:45 2015 +0000
+++ b/usr.bin/config/mkmakefile.c       Fri Aug 28 09:16:29 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkmakefile.c,v 1.40 2015/08/28 09:04:02 uebayasi Exp $ */
+/*     $NetBSD: mkmakefile.c,v 1.41 2015/08/28 09:16:29 uebayasi Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mkmakefile.c,v 1.40 2015/08/28 09:04:02 uebayasi Exp $");
+__RCSID("$NetBSD: mkmakefile.c,v 1.41 2015/08/28 09:16:29 uebayasi Exp $");
 
 #include <sys/param.h>
 #include <ctype.h>
@@ -305,18 +305,17 @@
                fprintf(fp, "\t%s.o \\\n", fi->fi_base);
        }
        TAILQ_FOREACH(oi, &allobjects, oi_next) {
-               const char *prologue, *prefix, *sep;
+               const char *prefix, *sep;
 
                if ((oi->oi_flags & OI_SEL) == 0)
                        continue;
-               prologue = "$S/";
                if (oi->oi_prefix != NULL) {
                        prefix = oi->oi_prefix;
                        sep = "/";
                } else {
                        prefix = sep = "";
                }
-               fprintf(fp, "\t%s%s%s%s \\\n", prologue, prefix, sep,
+               fprintf(fp, "\t%s%s%s%s \\\n", "$S/", prefix, sep,
                    oi->oi_path);
        }
        putc('\n', fp);
@@ -455,20 +454,19 @@
 
        fprintf(fp, "%cFILES= \\\n", toupper(suffix));
        TAILQ_FOREACH(fi, &allfiles, fi_next) {
-               const char *prologue, *prefix, *sep;
+               const char *prefix, *sep;
 
                if ((fi->fi_flags & FI_SEL) == 0)
                        continue;
                if (fi->fi_suffix != suffix && fi->fi_suffix != upper_suffix)
                        continue;
-               prologue = "$S/";
                if (fi->fi_prefix != NULL) {
                        prefix = fi->fi_prefix;
                        sep = "/";
                } else {
                        prefix = sep = "";
                }
-               fprintf(fp, "\t%s%s%s%s \\\n", prologue, prefix, sep,
+               fprintf(fp, "\t%s%s%s%s \\\n", "$S/", prefix, sep,
                    fi->fi_path);
        }
        /*
@@ -495,18 +493,17 @@
        struct files *fi;
 
        TAILQ_FOREACH(fi, &allfiles, fi_next) {
-               const char *prologue, *prefix, *sep;
+               const char *prefix, *sep;
 
                if ((fi->fi_flags & FI_SEL) == 0)
                        continue;
-               prologue = "$S/";
                if (fi->fi_prefix != NULL) {
                        prefix = fi->fi_prefix;
                        sep = "/";
                } else {
                        prefix = sep = "";
                }
-               fprintf(fp, "%s.o: %s%s%s%s\n", fi->fi_base, prologue, prefix,
+               fprintf(fp, "%s.o: %s%s%s%s\n", fi->fi_base, "$S/", prefix,
                    sep, fi->fi_path);
                fprintf(fp, "\t${NORMAL_%c}\n\n", toupper(fi->fi_suffix));
        }



Home | Main Index | Thread Index | Old Index