diff options
author | ru <ru@FreeBSD.org> | 2004-02-13 10:40:54 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2004-02-13 10:40:54 +0000 |
commit | af8088c9ba27292603409aa376603147869c8904 (patch) | |
tree | 2dc600b1ea35478c78cfad2a526be513da1aa01b /sys/conf | |
parent | bd38cbd92d701cbcb3aea7ca00674222a9e19f40 (diff) | |
download | FreeBSD-src-af8088c9ba27292603409aa376603147869c8904.zip FreeBSD-src-af8088c9ba27292603409aa376603147869c8904.tar.gz |
Reduce the number of knobs controlling the build of debug modules
to one, DEBUG_FLAGS, which is also compatible with <bsd.prog.mk>.
Previously one had to set both DEBUG and DEBUG_FLAGS to build the
.ko.debug with debugging symbols which was boring when doing this
manually.
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/kern.pre.mk | 2 | ||||
-rw-r--r-- | sys/conf/kmod.mk | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 0b2b624..daa64bd 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -98,5 +98,5 @@ MKMODULESENV+= ALL_MODULES=LINT MKMODULESENV+= MODULES_OVERRIDE="${MODULES_OVERRIDE}" .endif .if defined(DEBUG) -MKMODULESENV+= DEBUG="${DEBUG}" DEBUG_FLAGS="${DEBUG}" +MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index d6de871..4138137 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -117,7 +117,7 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g} PROG= ${KMOD}.ko .endif -.if !defined(DEBUG) +.if !defined(DEBUG_FLAGS) FULLPROG= ${PROG} .else FULLPROG= ${PROG}.debug @@ -127,8 +127,8 @@ ${PROG}: ${FULLPROG} ${FULLPROG}: ${KMOD}.kld ${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${KMOD}.kld -.if !defined(DEBUG) - ${OBJCOPY} --strip-debug ${FULLPROG} +.if !defined(DEBUG_FLAGS) + ${OBJCOPY} --strip-debug ${.TARGET} .endif EXPORT_SYMS?= NO @@ -191,7 +191,7 @@ ${_ILINKS}: CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} ${_ILINKS} symb.tmp tmp.o -.if defined(DEBUG) +.if defined(DEBUG_FLAGS) CLEANFILES+= ${FULLPROG} .endif @@ -202,7 +202,7 @@ _INSTALLFLAGS:= ${INSTALLFLAGS} _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} .endfor -.if defined(DEBUG) +.if defined(DEBUG_FLAGS) install.debug: cd ${.CURDIR}; ${MAKE} -DINSTALL_DEBUG install .endif @@ -210,12 +210,11 @@ install.debug: .if !target(realinstall) realinstall: _kmodinstall .ORDER: beforeinstall _kmodinstall -.if defined(DEBUG) && defined(INSTALL_DEBUG) _kmodinstall: +.if defined(DEBUG_FLAGS) && defined(INSTALL_DEBUG) ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${FULLPROG} ${DESTDIR}${KMODDIR} .else -_kmodinstall: ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR} |