summaryrefslogtreecommitdiff
path: root/usr.sbin/config/mkmakefile.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-11-13 08:21:57 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-11-13 08:21:57 +0000
commit48eccfca3321f7c88e1a2107e3170d2194904baa (patch)
tree17a96bd2b69fb2909e92878bac4405df70db3be8 /usr.sbin/config/mkmakefile.c
parent1844aacc1c369617474ad3fd76dc9a310d05db20 (diff)
from mycroft;
Allow options and makeoptions to take an empty string as a value. Add `object' and `library' keywords to pull in precompiled .o and .a files. Syntax is like the `file' keyword; e.g.: object arch/i386/i386/mumble.o [mumble] [needs-flag] Largely from Michael Richardson in PR 3833, with some changes by me.
Diffstat (limited to 'usr.sbin/config/mkmakefile.c')
-rw-r--r--usr.sbin/config/mkmakefile.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index a5b34ee6c18..d681fbbeb0f 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkmakefile.c,v 1.6 1997/07/06 03:54:06 downsj Exp $ */
+/* $OpenBSD: mkmakefile.c,v 1.7 1997/11/13 08:21:55 deraadt Exp $ */
/* $NetBSD: mkmakefile.c,v 1.34 1997/02/02 21:12:36 thorpej Exp $ */
/*
@@ -220,6 +220,7 @@ emitobjs(fp)
register FILE *fp;
{
register struct files *fi;
+ register struct objects *oi;
register int lpos, len, sp;
if (fputs("OBJS=", fp) < 0)
@@ -241,6 +242,21 @@ emitobjs(fp)
lpos += len + 1;
sp = ' ';
}
+ for (oi = allobjects; oi != NULL; oi = oi->oi_next) {
+ if ((oi->oi_flags & OI_SEL) == 0)
+ continue;
+ len = strlen(oi->oi_path) + 3;
+ if (lpos + len > 72) {
+ if (fputs(" \\\n", fp) < 0)
+ return (1);
+ sp = '\t';
+ lpos = 7;
+ }
+ if (fprintf(fp, "%c$S/%s", sp, oi->oi_path) < 0)
+ return (1);
+ lpos += len + 1;
+ sp = ' ';
+ }
if (putc('\n', fp) < 0)
return (1);
return (0);