summaryrefslogtreecommitdiffstats
path: root/usr.sbin
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
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')
-rw-r--r--usr.sbin/config/config.h2
-rw-r--r--usr.sbin/config/configvers.h4
-rw-r--r--usr.sbin/config/mkioconf.c18
-rw-r--r--usr.sbin/config/mkmakefile.c46
4 files changed, 64 insertions, 6 deletions
diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h
index d60ad1a..823d541 100644
--- a/usr.sbin/config/config.h
+++ b/usr.sbin/config/config.h
@@ -91,6 +91,8 @@ struct file_list {
#define SWAPSPEC 6
#define COMPDEVICE 7
#define COMPSPEC 8
+#define NODEPEND 9
+#define LOCAL 10
#define DEVDONE 0x80000000
#define TYPEMASK 0x7fffffff
diff --git a/usr.sbin/config/configvers.h b/usr.sbin/config/configvers.h
index b958f9e..c89aa82 100644
--- a/usr.sbin/config/configvers.h
+++ b/usr.sbin/config/configvers.h
@@ -6,6 +6,6 @@
* The numbering scheme is inspired by the sys/conf/newvers.sh RELDATE
* and <osreldate.h> system.
*
- * $Id: configvers.h,v 1.3 1998/06/17 15:16:53 bde Exp $
+ * $Id: configvers.h,v 1.4 1998/07/12 09:52:45 bde Exp $
*/
-#define CONFIGVERS 300005
+#define CONFIGVERS 300006
diff --git a/usr.sbin/config/mkioconf.c b/usr.sbin/config/mkioconf.c
index e27253b..1faa36f 100644
--- a/usr.sbin/config/mkioconf.c
+++ b/usr.sbin/config/mkioconf.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)mkioconf.c 8.2 (Berkeley) 1/21/94";
#endif
static const char rcsid[] =
- "$Id: mkioconf.c,v 1.37 1998/06/17 15:16:53 bde Exp $";
+ "$Id: mkioconf.c,v 1.38 1998/07/21 21:47:51 dfr Exp $";
#endif /* not lint */
#include <err.h>
@@ -618,6 +618,7 @@ i386_ioconf()
int dev_id;
FILE *fp, *fp1;
static char *old_d_name;
+ int count;
fp = fopen(path("ioconf.c.new"), "w");
if (fp == 0)
@@ -695,6 +696,21 @@ i386_ioconf()
if (seen_scbus)
scbus_devtab(fp, fp1, &dev_id);
+ fprintf(fp, "\n");
+ fprintf(fp, "/*\n");
+ fprintf(fp, " * New bus architecture devices.\n");
+ fprintf(fp, " */\n");
+ fprintf(fp, "\n");
+ fprintf(fp, "#include <sys/bus_private.h>\n");
+ fprintf(fp, "\n");
+ count = 0;
+ fprintf(fp, "struct config_device devtab[] = {\n");
+ fprintf(fp, "/* name, unit, resource count, resources */\n");
+ fprintf(fp, "{ 0, 0, 0, 0 }\n");
+ fprintf(fp, "};\n");
+ fprintf(fp, "\n");
+ fprintf(fp, "int devtab_count = %d;\n", count);
+
/* XXX David did this differently!!! */
/* pseudo_ioconf(fp); */
(void) fclose(fp);
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