summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>1999-04-07 09:28:03 +0000
committergrog <grog@FreeBSD.org>1999-04-07 09:28:03 +0000
commit23a589f45ba719ddb3d051d5c71098c19b10c4df (patch)
tree89b714bfc94b5697e0e0889c16dbdba2b16e229b /usr.sbin
parent68437b1a0e8b58742a74cd819278c2cd5f520bb3 (diff)
downloadFreeBSD-src-23a589f45ba719ddb3d051d5c71098c19b10c4df.zip
FreeBSD-src-23a589f45ba719ddb3d051d5c71098c19b10c4df.tar.gz
1. Modify config to issue different code for debugging.
2. Config complains if you use -g: Debugging is enabled by default, there is no ned to specify the -g option 3. Config warns you if you don't use -s: Building kernel with full debugging symbols. Do "config -s BSD" for historic partial symbolic support. To install the debugging kernel, do make install.debug (BSD was the name of the config file I used; I print out the same name). 4. Modify Makefile.i386, Makefile.alpha, Makefile.pc98 and config to work if a kernel name other than 'kernel' is specified. This is not absolutely necessary, but useful, and it was relatively easy. I now have a kernel called /crapshit :-) 5. Modify Makefile.i386, Makefile.alpha, Makefile.pc98 "clean" target to remove both the debug and normal kernel. 6. Modify all to install the stripped kernel by default and the debug kernel if you enter "make install.debug". 7. Update version number of Makefiles and config.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/config/main.c20
-rw-r--r--usr.sbin/config/mkmakefile.c25
2 files changed, 39 insertions, 6 deletions
diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c
index 0c05358..1e5ae73 100644
--- a/usr.sbin/config/main.c
+++ b/usr.sbin/config/main.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$Id: main.c,v 1.25 1998/06/09 14:02:03 dfr Exp $";
+ "$Id: main.c,v 1.26 1998/12/10 02:35:55 archie Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -86,10 +86,13 @@ main(argc, argv)
int ch;
char *p;
- while ((ch = getopt(argc, argv, "gprn")) != -1)
+ debugging = 1; /* on by default */
+ while ((ch = getopt(argc, argv, "gprns")) != -1)
switch (ch) {
case 'g':
- debugging++;
+ fprintf(stderr,
+ "Debugging is enabled by default, there is "
+ "no need to specify the -g option\n" );
break;
case 'p':
profiling++;
@@ -102,6 +105,9 @@ main(argc, argv)
case 'r':
no_config_clobber = FALSE;
break;
+ case 's':
+ debugging = 0;
+ break;
case '?':
default:
usage();
@@ -112,6 +118,14 @@ main(argc, argv)
if (argc != 1)
usage();
+ if (debugging)
+ printf("Building kernel with full debugging symbols. Do\n"
+ "\"config -s %s\" "
+ "for historic partial symbolic support.\n"
+ "To install the debugging kernel, do "
+ "make install.debug\n",
+ argv [0] );
+
if (freopen(PREFIX = *argv, "r", stdin) == NULL)
err(2, "%s", PREFIX);
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index ea4c405..5c38d23 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -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.33 1998/09/03 21:03:43 nsouch Exp $";
+ "$Id: mkmakefile.c,v 1.34 1998/09/15 21:07:54 gibbs Exp $";
#endif /* not lint */
/*
@@ -790,7 +790,10 @@ do_load(f)
fputs("all:", f);
for (fl = conf_list; fl; fl = fl->f_next)
if (fl->f_type == SYSTEMSPEC)
- fprintf(f, " %s", fl->f_needs);
+ if (debugging)
+ fprintf(f, " %s.debug", fl->f_needs);
+ else
+ fprintf(f, " %s", fl->f_needs);
putc('\n', f);
}
@@ -824,7 +827,23 @@ do_systemspec(f, fl, first)
int first;
{
- fprintf(f, "%s: ${SYSTEM_DEP} swap%s.o", fl->f_needs, fl->f_fn);
+ if (debugging) {
+ fprintf(f,
+ "KERNEL=\t\t%s\n"
+ "FULLKERNEL=\t%s.debug\n"
+ "INSTALL=\tinstall.debug\n\n",
+ fl->f_needs,
+ fl->f_needs );
+ fprintf(f, "%s.debug: ${SYSTEM_DEP} swap%s.o", fl->f_needs, fl->f_fn);
+ } else {
+ fprintf(f,
+ "KERNEL=\t\t%s\n"
+ "FULLKERNEL=\t%s\n\n"
+ "INSTALL=\tinstall\n\n",
+ fl->f_needs,
+ fl->f_needs );
+ fprintf(f, "%s: ${SYSTEM_DEP} swap%s.o", fl->f_needs, fl->f_fn);
+ }
if (first)
fprintf(f, " vers.o");
fprintf(f, "\n\t${SYSTEM_LD_HEAD}\n");
OpenPOWER on IntegriCloud