summaryrefslogtreecommitdiff
path: root/usr.sbin/config/mkmakefile.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2006-05-06 11:31:47 +0000
committerMarc Espie <espie@cvs.openbsd.org>2006-05-06 11:31:47 +0000
commit77ee1d3e549db8de8532ff4d95ede446ceb212b0 (patch)
treea2d06bf64d262510e79cfa51ba646646b0d2c6ae /usr.sbin/config/mkmakefile.c
parenta558bc47f825a99c1617d0247cde90b47ac28195 (diff)
lint can't do assembly files, put them directly in OBJS.
okay theo
Diffstat (limited to 'usr.sbin/config/mkmakefile.c')
-rw-r--r--usr.sbin/config/mkmakefile.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index 54252515064..7d12f1113e5 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkmakefile.c,v 1.19 2006/04/27 18:09:52 espie Exp $ */
+/* $OpenBSD: mkmakefile.c,v 1.20 2006/05/06 11:31:46 espie Exp $ */
/* $NetBSD: mkmakefile.c,v 1.34 1997/02/02 21:12:36 thorpej Exp $ */
/*
@@ -220,6 +220,7 @@ emitobjs(FILE *fp)
struct files *fi;
struct objects *oi;
int lpos, len, sp;
+ const char *fpath;
if (fputs("LINTS=", fp) < 0)
return (1);
@@ -228,6 +229,11 @@ emitobjs(FILE *fp)
for (fi = allfiles; fi != NULL; fi = fi->fi_next) {
if ((fi->fi_flags & FI_SEL) == 0)
continue;
+ if ((fpath = srcpath(fi)) == NULL)
+ return (1);
+ len = strlen(fpath);
+ if (fpath[len - 1] == 's' || fpath[len - 1] == 'S')
+ continue;
len = strlen(fi->fi_base) + 3;
if (lpos + len > 72) {
if (fputs(" \\\n", fp) < 0)
@@ -243,6 +249,26 @@ emitobjs(FILE *fp)
if (fputs("\n\nOBJS=\t${LINTS:.ln=.o}", fp) < 0)
return (1);
lpos = 7 + strlen("${LINTS:.ln=.o}");
+ for (fi = allfiles; fi != NULL; fi = fi->fi_next) {
+ if ((fi->fi_flags & FI_SEL) == 0)
+ continue;
+ if ((fpath = srcpath(fi)) == NULL)
+ return (1);
+ len = strlen(fpath);
+ if (fpath[len - 1] != 's' && fpath[len - 1] != 'S')
+ continue;
+ len = strlen(fi->fi_base) + 3;
+ if (lpos + len > 72) {
+ if (fputs(" \\\n", fp) < 0)
+ return (1);
+ sp = '\t';
+ lpos = 7;
+ }
+ if (fprintf(fp, "%c%s.o", sp, fi->fi_base) < 0)
+ return (1);
+ lpos += len + 1;
+ sp = ' ';
+ }
for (oi = allobjects; oi != NULL; oi = oi->oi_next) {
if ((oi->oi_flags & OI_SEL) == 0)
continue;