aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2002-07-13 19:36:14 +0000
committerBruce Evans <bde@FreeBSD.org>2002-07-13 19:36:14 +0000
commit8365569883eef45d469b504c677e286a1e8fdefe (patch)
tree190dab1e55362079eccb9f8e5bccd9369f6dbd35
parent6e97e157e8c9a146ce8ed6ed52a5c3445eaf5d9f (diff)
downloadsrc-8365569883eef45d469b504c677e286a1e8fdefe.tar.gz
src-8365569883eef45d469b504c677e286a1e8fdefe.zip
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.
Notes
Notes: svn path=/head/; revision=99923
-rw-r--r--sys/conf/Makefile.alpha2
-rw-r--r--sys/conf/Makefile.amd642
-rw-r--r--sys/conf/Makefile.i3862
-rw-r--r--sys/conf/Makefile.ia642
-rw-r--r--sys/conf/Makefile.pc982
-rw-r--r--sys/conf/Makefile.powerpc2
-rw-r--r--sys/conf/Makefile.sparc642
-rw-r--r--sys/conf/kern.pre.mk5
-rw-r--r--usr.sbin/config/configvers.h2
-rw-r--r--usr.sbin/config/mkmakefile.c18
10 files changed, 20 insertions, 19 deletions
diff --git a/sys/conf/Makefile.alpha b/sys/conf/Makefile.alpha
index 4ccb87618a2f..df48d84770fb 100644
--- a/sys/conf/Makefile.alpha
+++ b/sys/conf/Makefile.alpha
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500010
+%VERSREQ= 500011
.if !defined(S)
.if exists(./@/.)
diff --git a/sys/conf/Makefile.amd64 b/sys/conf/Makefile.amd64
index 33c871e67bb0..77bbc37ca45b 100644
--- a/sys/conf/Makefile.amd64
+++ b/sys/conf/Makefile.amd64
@@ -18,7 +18,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500010
+%VERSREQ= 500011
STD8X16FONT?= iso
diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386
index 51d2afb08e5a..62e871c3c478 100644
--- a/sys/conf/Makefile.i386
+++ b/sys/conf/Makefile.i386
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500010
+%VERSREQ= 500011
STD8X16FONT?= iso
diff --git a/sys/conf/Makefile.ia64 b/sys/conf/Makefile.ia64
index 083b95d84d45..a127e654f625 100644
--- a/sys/conf/Makefile.ia64
+++ b/sys/conf/Makefile.ia64
@@ -19,7 +19,7 @@
GCC3= you bet
# Which version of config(8) is required.
-%VERSREQ= 500010
+%VERSREQ= 500011
STD8X16FONT?= iso
diff --git a/sys/conf/Makefile.pc98 b/sys/conf/Makefile.pc98
index 9330d8d920b7..0e5d57ac0aee 100644
--- a/sys/conf/Makefile.pc98
+++ b/sys/conf/Makefile.pc98
@@ -19,7 +19,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500010
+%VERSREQ= 500011
.if !defined(S)
.if exists(./@/.)
diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc
index f0cbad2f8afe..1a253e0ab052 100644
--- a/sys/conf/Makefile.powerpc
+++ b/sys/conf/Makefile.powerpc
@@ -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
diff --git a/sys/conf/Makefile.sparc64 b/sys/conf/Makefile.sparc64
index 3af0203fc20a..2980fd7bc85e 100644
--- a/sys/conf/Makefile.sparc64
+++ b/sys/conf/Makefile.sparc64
@@ -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
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 946ef2def003..3e213c725cec 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -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
diff --git a/usr.sbin/config/configvers.h b/usr.sbin/config/configvers.h
index fcc72653879a..580ea8392072 100644
--- a/usr.sbin/config/configvers.h
+++ b/usr.sbin/config/configvers.h
@@ -8,4 +8,4 @@
*
* $FreeBSD$
*/
-#define CONFIGVERS 500010
+#define CONFIGVERS 500011
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index c24a12108ccb..6d3818630425 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -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) {