summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/mkmakefile.c
diff options
context:
space:
mode:
authornsouch <nsouch@FreeBSD.org>1998-09-03 21:03:43 +0000
committernsouch <nsouch@FreeBSD.org>1998-09-03 21:03:43 +0000
commit67419707bb113e648564665cf96af2ecfa99fab8 (patch)
tree4800a87fc708f7f22684c02ef39cfcaa1329d8d2 /usr.sbin/config/mkmakefile.c
parent18263a16482fe59a0e50eb751b95c2f8fa815041 (diff)
downloadFreeBSD-src-67419707bb113e648564665cf96af2ecfa99fab8.zip
FreeBSD-src-67419707bb113e648564665cf96af2ecfa99fab8.tar.gz
Reviewed by: Doug Rabson
Submitted by: nsouch 'local' token added to support new bus architecture .c files generated by .m files.
Diffstat (limited to 'usr.sbin/config/mkmakefile.c')
-rw-r--r--usr.sbin/config/mkmakefile.c46
1 files changed, 43 insertions, 3 deletions
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index 081b469..18ad12d 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)mkmakefile.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$Id: mkmakefile.c,v 1.31 1998/06/24 06:16:32 jkh Exp $";
+ "$Id: mkmakefile.c,v 1.32 1998/07/12 08:10:33 bde Exp $";
#endif /* not lint */
/*
@@ -79,6 +79,7 @@ void do_clean __P((FILE *));
void do_load __P((FILE *));
void do_rules __P((FILE *));
void do_sfiles __P((FILE *));
+void do_mfiles __P((FILE *));
void do_cfiles __P((FILE *));
void do_objs __P((FILE *));
void do_before_depend __P((FILE *));
@@ -198,6 +199,8 @@ makefile()
do_before_depend(ofp);
else if (eq(line, "%OBJS\n"))
do_objs(ofp);
+ else if (eq(line, "%MFILES\n"))
+ do_mfiles(ofp);
else if (eq(line, "%CFILES\n"))
do_cfiles(ofp);
else if (eq(line, "%SFILES\n"))
@@ -396,6 +399,14 @@ nextparam:
goto nextparam;
}
nreqs++;
+ if (eq(wd, "local")) {
+ filetype = LOCAL;
+ goto nextparam;
+ }
+ if (eq(wd, "no-depend")) {
+ filetype = NODEPEND;
+ goto nextparam;
+ }
if (eq(wd, "device-driver")) {
filetype = DRIVER;
goto nextparam;
@@ -587,7 +598,7 @@ do_cfiles(fp)
fputs("CFILES=", fp);
lpos = 8;
for (tp = ftab; tp; tp = tp->f_next)
- if (tp->f_type != INVISIBLE) {
+ if (tp->f_type != INVISIBLE && tp->f_type != NODEPEND) {
len = strlen(tp->f_fn);
if (tp->f_fn[len - 1] != 'c')
continue;
@@ -595,7 +606,11 @@ do_cfiles(fp)
lpos = 8;
fputs("\\\n\t", fp);
}
- fprintf(fp, "$S/%s ", tp->f_fn);
+ if (tp->f_type != LOCAL)
+ fprintf(fp, "$S/%s ", tp->f_fn);
+ else
+ fprintf(fp, "%s ", tp->f_fn);
+
lpos += len + 1;
}
for (fl = conf_list; fl; fl = fl->f_next)
@@ -617,6 +632,31 @@ do_cfiles(fp)
}
void
+do_mfiles(fp)
+ FILE *fp;
+{
+ register struct file_list *tp;
+ register int lpos, len;
+
+ fputs("MFILES=", fp);
+ lpos = 8;
+ for (tp = ftab; tp; tp = tp->f_next)
+ if (tp->f_type != INVISIBLE) {
+ len = strlen(tp->f_fn);
+ if (tp->f_fn[len - 1] != 'm' || tp->f_fn[len - 2] != '.')
+ continue;
+ if ((len = 3 + len) + lpos > 72) {
+ lpos = 8;
+ fputs("\\\n\t", fp);
+ }
+ fprintf(fp, "$S/%s ", tp->f_fn);
+ lpos += len + 1;
+ }
+ if (lpos != 8)
+ putc('\n', fp);
+}
+
+void
do_sfiles(fp)
FILE *fp;
{
OpenPOWER on IntegriCloud