summaryrefslogtreecommitdiff
path: root/usr.sbin/config/mkmakefile.c
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2005-12-05 04:32:22 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2005-12-05 04:32:22 +0000
commit684c119ad41d4181f2b1f9ff03ebea942726fb97 (patch)
tree2670f230bb3295c3d1c2f0f4cf952bd01c6370c3 /usr.sbin/config/mkmakefile.c
parent25c52ff08295e49408e3c3b0bdd5420eed1811ff (diff)
Ignore case on the file extension, to allow both .s and .S to be included
in SFILES for mkdep. Would also pick up .C files (but we dont allow with those in the kernel) ok deraadt@
Diffstat (limited to 'usr.sbin/config/mkmakefile.c')
-rw-r--r--usr.sbin/config/mkmakefile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index dff4bac249b..405578139ba 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkmakefile.c,v 1.16 2004/01/04 18:30:05 deraadt Exp $ */
+/* $OpenBSD: mkmakefile.c,v 1.17 2005/12/05 04:32:21 drahn Exp $ */
/* $NetBSD: mkmakefile.c,v 1.34 1997/02/02 21:12:36 thorpej Exp $ */
/*
@@ -285,8 +285,9 @@ emitfiles(FILE *fp, int suffix)
int lpos, len, sp;
const char *fpath;
char swapname[100];
+ int uppersuffix = toupper(suffix);
- if (fprintf(fp, "%cFILES=", toupper(suffix)) < 0)
+ if (fprintf(fp, "%cFILES=", uppersuffix) < 0)
return (1);
sp = '\t';
lpos = 7;
@@ -296,7 +297,7 @@ emitfiles(FILE *fp, int suffix)
if ((fpath = srcpath(fi)) == NULL)
return (1);
len = strlen(fpath);
- if (fpath[len - 1] != suffix)
+ if (fpath[len - 1] != suffix && fpath[len - 1] != uppersuffix)
continue;
if (*fpath != '/')
len += 3; /* "$S/" */