summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/mkmakefile.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2002-07-13 19:36:14 +0000
committerbde <bde@FreeBSD.org>2002-07-13 19:36:14 +0000
commitd738702902195501104503bce0a5b7e76170523c (patch)
tree190dab1e55362079eccb9f8e5bccd9369f6dbd35 /usr.sbin/config/mkmakefile.c
parent9c6596bcd6435686141c1a7b6111b116fa90a57c (diff)
downloadFreeBSD-src-d738702902195501104503bce0a5b7e76170523c.zip
FreeBSD-src-d738702902195501104503bce0a5b7e76170523c.tar.gz
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.
Diffstat (limited to 'usr.sbin/config/mkmakefile.c')
-rw-r--r--usr.sbin/config/mkmakefile.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index c24a121..6d38186 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) {
OpenPOWER on IntegriCloud