Reviewed by: Doug Rabson
Submitted by: nsouch 'local' token added to support new bus architecture .c files generated by .m files.
This commit is contained in:
parent
4e190a62f8
commit
8d8b289af3
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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 @@ read_files()
|
||||
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)
|
||||
@ -616,6 +631,31 @@ do_cfiles(fp)
|
||||
putc('\n', 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;
|
||||
|
Loading…
Reference in New Issue
Block a user