From 684c119ad41d4181f2b1f9ff03ebea942726fb97 Mon Sep 17 00:00:00 2001 From: Dale Rahn Date: Mon, 5 Dec 2005 04:32:22 +0000 Subject: 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@ --- usr.sbin/config/mkmakefile.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'usr.sbin/config/mkmakefile.c') 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/" */ -- cgit v1.2.3