From 77ee1d3e549db8de8532ff4d95ede446ceb212b0 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Sat, 6 May 2006 11:31:47 +0000 Subject: lint can't do assembly files, put them directly in OBJS. okay theo --- usr.sbin/config/mkmakefile.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'usr.sbin/config/mkmakefile.c') 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; -- cgit v1.2.3