Moved the setting of all profiling-related variables except the key one

(PROFLEVEL) to kern.pre.mk so that it is easier to manage.  Bumped config
version to match.

Moved the check for cputype being configured to a less bogus place in
mkmakefile.c.
This commit is contained in:
Bruce Evans 2002-07-13 19:36:14 +00:00
parent 6e97e157e8
commit 8365569883
10 changed files with 20 additions and 19 deletions

View File

@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
%VERSREQ= 500010
%VERSREQ= 500011
.if !defined(S)
.if exists(./@/.)

View File

@ -18,7 +18,7 @@
#
# Which version of config(8) is required.
%VERSREQ= 500010
%VERSREQ= 500011
STD8X16FONT?= iso

View File

@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
%VERSREQ= 500010
%VERSREQ= 500011
STD8X16FONT?= iso

View File

@ -19,7 +19,7 @@
GCC3= you bet
# Which version of config(8) is required.
%VERSREQ= 500010
%VERSREQ= 500011
STD8X16FONT?= iso

View File

@ -19,7 +19,7 @@
#
# Which version of config(8) is required.
%VERSREQ= 500010
%VERSREQ= 500011
.if !defined(S)
.if exists(./@/.)

View File

@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
%VERSREQ= 500010
%VERSREQ= 500011
# Temporary stuff while we're still embryonic
NO_MODULES?= yes

View File

@ -21,7 +21,7 @@ CWARNFLAGS= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-ansi
# Which version of config(8) is required.
%VERSREQ= 500010
%VERSREQ= 500011
STD8X16FONT?= iso

View File

@ -49,6 +49,11 @@ ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
# then it might break building of utilities.
CFLAGS+= ${FMT}
.if defined(PROFLEVEL) && ${PROFLEVEL} >= 1
IDENT= -DGPROF
PROF= -pg
.endif
DEFINED_PROF= ${PROF}
.if defined(PROF)
CFLAGS+= -falign-functions=16

View File

@ -8,4 +8,4 @@
*
* $FreeBSD$
*/
#define CONFIGVERS 500010
#define CONFIGVERS 500011

View File

@ -134,27 +134,23 @@ makefile(void)
}
if (ifp == 0)
err(1, "%s", line);
ofp = fopen(path("Makefile.new"), "w");
if (ofp == 0)
err(1, "%s", path("Makefile.new"));
fprintf(ofp, "KERN_IDENT=%s\n", raisestr(ident));
fprintf(ofp, "IDENT=");
if (profiling)
fprintf(ofp, " -DGPROF");
/* XXX this check seems to be misplaced. */
if (cputype == 0) {
printf("cpu type must be specified\n");
exit(1);
}
fprintf(ofp, "\n");
ofp = fopen(path("Makefile.new"), "w");
if (ofp == 0)
err(1, "%s", path("Makefile.new"));
fprintf(ofp, "KERN_IDENT=%s\n", raisestr(ident));
for (op = mkopt; op; op = op->op_next)
fprintf(ofp, "%s=%s\n", op->op_name, op->op_value);
if (debugging)
fprintf(ofp, "DEBUG=-g\n");
if (profiling) {
fprintf(ofp, "PROF=-pg\n");
if (profiling)
fprintf(ofp, "PROFLEVEL=%d\n", profiling);
}
if (*srcdir != '\0')
fprintf(ofp,"S=%s\n", srcdir);
while (fgets(line, BUFSIZ, ifp) != 0) {