Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/config Put both .S and .s files in SFILES. Fixes b...



details:   https://anonhg.NetBSD.org/src/rev/e03fa4f071fa
branches:  trunk
changeset: 503084:e03fa4f071fa
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Wed Jan 31 00:15:40 2001 +0000

description:
Put both .S and .s files in SFILES.  Fixes bin/12051.  Patch from Richard
Earnshaw via Chris Gilbert.

The right solution here is to have every port use .S, but that might take a
while...

diffstat:

 usr.sbin/config/mkmakefile.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (50 lines):

diff -r 697949002276 -r e03fa4f071fa usr.sbin/config/mkmakefile.c
--- a/usr.sbin/config/mkmakefile.c      Wed Jan 31 00:14:29 2001 +0000
+++ b/usr.sbin/config/mkmakefile.c      Wed Jan 31 00:15:40 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkmakefile.c,v 1.47 2000/12/03 07:06:15 matt Exp $     */
+/*     $NetBSD: mkmakefile.c,v 1.48 2001/01/31 00:15:40 bjh21 Exp $    */
 
 /*
  * Copyright (c) 1992, 1993
@@ -62,7 +62,7 @@
 static const char *prefix_prologue(const char *);
 
 static int emitdefs(FILE *);
-static int emitfiles(FILE *, int);
+static int emitfiles(FILE *, int, int);
 
 static int emitobjs(FILE *);
 static int emitcfiles(FILE *);
@@ -307,18 +307,18 @@
 emitcfiles(FILE *fp)
 {
 
-       return (emitfiles(fp, 'c'));
+       return (emitfiles(fp, 'c', 0));
 }
 
 static int
 emitsfiles(FILE *fp)
 {
 
-       return (emitfiles(fp, 's'));
+       return (emitfiles(fp, 's', 1));
 }
 
 static int
-emitfiles(FILE *fp, int suffix)
+emitfiles(FILE *fp, int suffix, int upper_suffix)
 {
        struct files *fi;
        struct config *cf;
@@ -336,7 +336,8 @@
                if ((fpath = srcpath(fi)) == NULL)
                         return (1);
                len = strlen(fpath);
-               if (fpath[len - 1] != suffix)
+               if (! ((fpath[len - 1] == suffix) ||
+                   (upper_suffix && fpath[len - 1] == toupper(suffix))))
                        continue;
                if (*fpath != '/') {
                        len += 3;       /* "$S/" */



Home | Main Index | Thread Index | Old Index