aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/config/Makefile
diff options
context:
space:
mode:
authorWojciech A. Koszek <wkoszek@FreeBSD.org>2007-05-12 19:38:18 +0000
committerWojciech A. Koszek <wkoszek@FreeBSD.org>2007-05-12 19:38:18 +0000
commit744b947ef84848227ce1a826167ada052973c82a (patch)
tree7df0bae947c0e7aa57e02e7373440d236848d9d0 /usr.sbin/config/Makefile
parentfbe4fc2ec0af84e67e9b0ade975d2d2603962ee3 (diff)
downloadsrc-744b947ef84848227ce1a826167ada052973c82a.tar.gz
src-744b947ef84848227ce1a826167ada052973c82a.zip
Improve INCLUDE_CONFIG_FILE support.
This change will let us to have full configuration of a running kernel available in sysctl: sysctl -b kern.conftxt The same configuration is also contained within the kernel image. It can be obtained with: config -x <kernelfile> Current functionality lets you to quickly recover kernel configuration, by simply redirecting output from commands presented above and starting kernel build procedure. "include" statements are also honored, which means options and devices from included files are also included. Please note that comments from configuration files are not preserved by default. In order to preserve them, you can use -C flag for config(8). This will bring configuration file and included files literally; however, redirection to a file no longer works directly. This commit was followed by discussion, that took place on freebsd-current@. For more details, look here: http://lists.freebsd.org/pipermail/freebsd-current/2007-March/069994.html http://lists.freebsd.org/pipermail/freebsd-current/2007-May/071844.html Development of this patch took place in Perforce, hierarchy: //depot/user/wkoszek/wkoszek_kconftxt/ Support from: freebsd-current@ (links above) Reviewed by: imp@ Approved by: imp@
Notes
Notes: svn path=/head/; revision=169507
Diffstat (limited to 'usr.sbin/config/Makefile')
-rw-r--r--usr.sbin/config/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/config/Makefile b/usr.sbin/config/Makefile
index 8861b3cda326..bd318aeb53b0 100644
--- a/usr.sbin/config/Makefile
+++ b/usr.sbin/config/Makefile
@@ -4,13 +4,18 @@
PROG= config
MAN= config.5 config.8
SRCS= config.y main.c lang.l mkmakefile.c mkheaders.c \
- mkoptions.c y.tab.h
+ mkoptions.c y.tab.h kernconf.c
+
+kernconf.c: kernconf.tmpl
+ file2c 'char kernconfstr[] = {' ',0};' < kernconf.tmpl > kernconf.c
WARNS?= 6
CFLAGS+= -I. -I${.CURDIR}
DPADD= ${LIBL}
-LDADD= -ll
+LDADD= -ll -lsbuf
+
+CLEANFILES+= kernconf.c
mkmakefile.o: configvers.h