SCCS-vsn: usr.sbin/config/main.c 1.8
SCCS-vsn: usr.sbin/config/Makefile 1.8
SCCS-vsn: usr.sbin/config/mkheaders.c 1.13
SCCS-vsn: usr.sbin/config/mkmakefile.c 1.22
#
CFILES= y.tab.c main.c lex.yy.c mkioconf.c mkmakefile.c mkubglue.c mkheaders.c
#
CFILES= y.tab.c main.c lex.yy.c mkioconf.c mkmakefile.c mkubglue.c mkheaders.c
-OFILES= y.tab.o main.o lex.yy.o mkioconf.o mkmakefile.o mkubglue.o mkheaders.o
+OBJS= y.tab.o main.o lex.yy.o mkioconf.o mkmakefile.o mkubglue.o mkheaders.o
-config: ${OFILES}
- ${CC} ${OFILES} -o config ${LDFLAGS}
+config: ${OBJS}
+ ${CC} ${OBJS} -o config ${LDFLAGS}
lex.yy.c: config.l
lex config.l
lex.yy.c: config.l
lex config.l
-/* main.c 1.7 82/10/25 */
+/* main.c 1.8 82/12/09 */
#include <stdio.h>
#include <ctype.h>
#include <stdio.h>
#include <ctype.h>
+ if (argc > 1 && eq("-p", argv[1])) {
+ profiling++;
+ argc--, argv++;
+ }
- fprintf(stderr, "usage: config sysname\n");
+ fprintf(stderr, "usage: config [ -p ] sysname\n");
exit(1);
}
PREFIX = argv[1];
exit(1);
}
PREFIX = argv[1];
-/* mkheaders.c 1.12 82/10/25 */
+/* mkheaders.c 1.13 82/12/09 */
/*
* Make all the .h files for the optional entries
/*
* Make all the .h files for the optional entries
for (count = 0,dp = dtab; dp != 0; dp = dp->d_next)
if (dp->d_unit != -1 && eq(dp->d_name, dev)) {
if (dp->d_type == PSEUDO_DEVICE) {
for (count = 0,dp = dtab; dp != 0; dp = dp->d_next)
if (dp->d_unit != -1 && eq(dp->d_name, dev)) {
if (dp->d_type == PSEUDO_DEVICE) {
- count = dp->d_slave != UNKNOWN ? dp->d_slave : 1;
+ count =
+ dp->d_slave != UNKNOWN ? dp->d_slave : 1;
inc = count;
}
cp = get_word(inf);
inc = count;
}
cp = get_word(inf);
- if (cp == 0 || cp == (char *)EOF)
break;
fl = (struct file_list *) malloc(sizeof *fl);
fl->f_fn = inw;
break;
fl = (struct file_list *) malloc(sizeof *fl);
fl->f_fn = inw;
-/* mkmakefile.c 1.21 82/10/25 */
+/* mkmakefile.c 1.22 82/12/09 */
/*
* Build the makefile for the system, from
/*
* Build the makefile for the system, from
fprintf(stderr,
"Unknown %% construct in generic makefile: %s",
line);
fprintf(stderr,
"Unknown %% construct in generic makefile: %s",
line);
- (void) fclose(ifp);
- (void) fclose(ofp);
+ (void) fclose(ifp);
+ (void) fclose(ofp);
openit:
fp = fopen(fname, "r");
if (fp == 0) {
openit:
fp = fopen(fname, "r");
if (fp == 0) {
- perror("../conf/files");
if (eq(wd, "standard"))
goto checkdev;
if (!eq(wd, "optional")) {
if (eq(wd, "standard"))
goto checkdev;
if (!eq(wd, "optional")) {
- printf("%s: %s must be optional or standard",
+ printf("%s: %s must be optional or standard\n",
if (wd == 0)
goto doneopt;
devorprof = wd;
if (wd == 0)
goto doneopt;
devorprof = wd;
- if (eq(wd, "device-driver") || eq(wd, "profiling-routine"))
+ if (eq(wd, "device-driver") || eq(wd, "profiling-routine")) {
+ next_word(fp, wd);
nreqs++;
if (needs == 0)
needs = ns(wd);
nreqs++;
if (needs == 0)
needs = ns(wd);
+ if (eq(devorprof, "profiling-routine") && profiling == 0)
+ goto next;
tp = new_fent();
tp->f_fn = this;
if (eq(devorprof, "device-driver"))
tp = new_fent();
tp->f_fn = this;
if (eq(devorprof, "device-driver"))
fprintf(f, "\t${CC} -I. -c -S %s ../%sc\n", COPTS, np);
fprintf(f, "\tex - %ss < ${CRT0.EX}\n", tp);
fprintf(f,
fprintf(f, "\t${CC} -I. -c -S %s ../%sc\n", COPTS, np);
fprintf(f, "\tex - %ss < ${CRT0.EX}\n", tp);
fprintf(f,
- "\t/lib/cpp %ss | sed -f ../conf/asm.sed | ${AS} -o %so\n",
+ "\t/lib/cpp %ss | sed -f ../vax/asm.sed | ${AS} -o %so\n",
tp, tp);
fprintf(f, "\trm -f %ss\n\n", tp);
break;
tp, tp);
fprintf(f, "\trm -f %ss\n\n", tp);
break;
"config: don't know how to profile kernel on sun\n");
break;
}
"config: don't know how to profile kernel on sun\n");
break;
}
default:
printf("Don't know rules for %s", np);
default:
printf("Don't know rules for %s", np);