Module Name:    src
Committed By:   christos
Date:           Mon Dec 20 20:33:20 UTC 2021

Modified Files:
        src: BUILDING
        src/share/man/man5: mk.conf.5
        src/share/mk: bsd.README bsd.host.mk bsd.own.mk
        src/sys/conf: Makefile.kern.inc

Log Message:
Rename:
    MKKDEBUG -> MKDEBUGKERNEL
    MKTOOLSDEBUG -> MKDEBUGTOOLS
while keeping compatibility with the old names. Add missing documentation.
Now all debugging tunables are prefixed with MKDEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/BUILDING
cvs rdiff -u -r1.84 -r1.85 src/share/man/man5/mk.conf.5
cvs rdiff -u -r1.426 -r1.427 src/share/mk/bsd.README
cvs rdiff -u -r1.5 -r1.6 src/share/mk/bsd.host.mk
cvs rdiff -u -r1.1271 -r1.1272 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.284 -r1.285 src/sys/conf/Makefile.kern.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/BUILDING
diff -u src/BUILDING:1.140 src/BUILDING:1.141
--- src/BUILDING:1.140	Tue Nov 10 16:47:40 2020
+++ src/BUILDING	Mon Dec 20 15:33:20 2021
@@ -264,12 +264,28 @@ CONFIGURATION
 
                  Default: "no"
 
+     MKDEBUGKERNEL
+                 Can be set to "yes" or "no".  Force generation of full-debug
+                 symbol versions of all kernels compiled.  Alongside of the
+                 netbsd kernel file, an unstripped version netbsd.gdb is
+                 created.  This is useful if a cross-gdb is built as well (see
+                 MKCROSSGDB).
+
+                 Default: "no"
+
      MKDEBUGLIB  Can be set to "yes" or "no".  Indicates whether debug
                  information (see MKDEBUG) should also be generated for all
                  libraries built.
 
                  Default: "no"
 
+     MKDEBUGTOOLS 
+		 Can be set to "yes" or "no".  Indicates whether debug
+                 information (see MKDEBUG) should also be generated for all
+                 tools built.
+
+                 Default: "no"
+
      MKDOC       Can be set to "yes" or "no".  Indicates whether system
                  documentation destined for DESTDIR/usr/share/doc will be
                  installed during a build.
@@ -304,14 +320,6 @@ CONFIGURATION
 
                  Default: "yes"
 
-     MKKDEBUG    Can be set to "yes" or "no".  Force generation of full-debug
-                 symbol versions of all kernels compiled.  Alongside of the
-                 netbsd kernel file, an unstripped version netbsd.gdb is
-                 created.  This is useful if a cross-gdb is built as well (see
-                 MKCROSSGDB).
-
-                 Default: "no"
-
      MKKMOD      Can be set to "yes" or "no".  Indicates whether kernel
                  modules are built and installed.
 

Index: src/share/man/man5/mk.conf.5
diff -u src/share/man/man5/mk.conf.5:1.84 src/share/man/man5/mk.conf.5:1.85
--- src/share/man/man5/mk.conf.5:1.84	Thu Jan 14 18:32:12 2021
+++ src/share/man/man5/mk.conf.5	Mon Dec 20 15:33:20 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mk.conf.5,v 1.84 2021/01/14 23:32:12 pgoyette Exp $
+.\"	$NetBSD: mk.conf.5,v 1.85 2021/12/20 20:33:20 christos Exp $
 .\"
 .\"  Copyright (c) 1999-2003 The NetBSD Foundation, Inc.
 .\"  All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 27, 2020
+.Dd December 20, 2021
 .Dt MK.CONF 5
 .Os
 .\" turn off hyphenation
@@ -376,6 +376,18 @@ Indicates whether separate debugging sym
 .Sy DESTDIR Ns Pa /usr/libdata/debug .
 .DFLTn
 .
+.It Sy MKDEBUGKERNEL
+.YorN
+Indicates whether debugging symbols will be built for kernels
+by default; pretend as if
+.Em makeoptions DEBUG="-g"
+is specified in kernel configuration files.
+This will also put the debug kernel in the kernel sets.
+See
+.Xr options 4
+for details.
+.DFLTn
+.
 .It Sy MKDEBUGLIB
 .YorN
 Indicates whether debug libraries
@@ -385,6 +397,13 @@ Debug libraries are compiled with
 .Dq Li -g -DDEBUG .
 .DFLTn
 .
+.It Sy MKDEBUGTOOLS
+.YorN
+Indicates whether debug information
+.Sy ( lib*_g.a )
+will be included in the build toolchain.
+.DFLTn
+.
 .It Sy MKDOC
 .YorN
 Indicates whether system documentation destined for
@@ -506,17 +525,6 @@ Indicates whether the iSCSI library and 
 built and installed.
 .DFLTy
 .
-.It Sy MKKDEBUG
-.YorN
-Indicates whether debugging symbols will be built for kernels
-by default; pretend as if
-.Em makeoptions DEBUG="-g"
-is specified in kernel configuration files.
-See
-.Xr options 4
-for details.
-.DFLTn
-.
 .It Sy MKKERBEROS
 .YorN
 Indicates whether the Kerberos v5 infrastructure

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.426 src/share/mk/bsd.README:1.427
--- src/share/mk/bsd.README:1.426	Mon Dec 20 09:41:26 2021
+++ src/share/mk/bsd.README	Mon Dec 20 15:33:20 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.426 2021/12/20 14:41:26 christos Exp $
+#	$NetBSD: bsd.README,v 1.427 2021/12/20 20:33:20 christos Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -185,7 +185,13 @@ MKDEBUGLIB	Build *_g.a debugging librari
 		with -DDEBUG.
 		Default: no
 
-MKDEBUGKERNEL	Build .gdb kernels to be included with the kernel sets.
+MKDEBUGKERNEL	If "yes", force building of kernel symbol info and creation
+		of netbsd.gdb in all kernel builds, independently of the
+		settings for "makeoptions DEBUG" in the kernel config file.
+		The .gdb kernels will be included with the kernel sets.
+		Default: no
+
+MKDEBUGTOOLS	If "yes" build the tools with debugging symbols.
 		Default: no
 
 MKDEPINCLUDES	If "yes" issue .include statements in the .depend file
@@ -277,10 +283,6 @@ MKISCSI		If "no", don't build or install
 		(depends on libpthread.)
 		Default: yes
 
-MKKDEBUG	If "yes", force building of kernel symbol info and creation
-		of netbsd.gdb in all kernel builds, independently of the
-		settings for "makeoptions DEBUG" in the kernel config file.
-
 MKKERBEROS	If "no", disables building of Kerberos v5
 		infrastructure (libraries and support programs).
 		Default: yes
@@ -510,9 +512,6 @@ MKTEGRAFIRMWARE	If "no", install the /li
 		which is necessary for the NVIDIA Tegra XHCI driver.
 		Default: yes on evbarm, no elsewhere.
 
-MKTOOLSDEBUG	If "yes" build the tools with debugging symbols.
-		Default: no
-
 MKTPM		If "no" then don't build the Trusted Platform Module
 		infrastructure.
 		Default: no

Index: src/share/mk/bsd.host.mk
diff -u src/share/mk/bsd.host.mk:1.5 src/share/mk/bsd.host.mk:1.6
--- src/share/mk/bsd.host.mk:1.5	Sun Aug  9 17:13:38 2020
+++ src/share/mk/bsd.host.mk	Mon Dec 20 15:33:20 2021
@@ -1,9 +1,9 @@
-#	$NetBSD: bsd.host.mk,v 1.5 2020/08/09 21:13:38 christos Exp $
+#	$NetBSD: bsd.host.mk,v 1.6 2021/12/20 20:33:20 christos Exp $
 
 .if !defined(_BSD_HOST_MK_)
 _BSD_HOST_MK_=1
 
-.if ${MKTOOLSDEBUG:Uno} == "yes"
+.if ${MKDEBUGTOOLS:Uno} == "yes"
 HOST_DBG?= -g
 .else
 HOST_DBG?= -O

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1271 src/share/mk/bsd.own.mk:1.1272
--- src/share/mk/bsd.own.mk:1.1271	Mon Dec 20 09:41:26 2021
+++ src/share/mk/bsd.own.mk	Mon Dec 20 15:33:20 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1271 2021/12/20 14:41:26 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.1272 2021/12/20 20:33:20 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -1282,6 +1282,10 @@ MKLLVMRT.i386=		yes
 MKLLVMRT.aarch64=	yes
 .endif
 
+# compat with old names
+MKDEBUGKERNEL?=${MKKDEBUG:Uno}
+MKDEBUGTOOLS?=${MKTOOLSDEBUG:Uno}
+
 #
 # MK* options which default to "no".  Note that MKZFS has a different
 # default for some platforms, see above.  Please keep alphabetically
@@ -1292,7 +1296,7 @@ _MKVARS.no= \
 	MKARZERO \
 	MKBSDGREP \
 	MKCATPAGES MKCOMPATTESTS MKCOMPATX11 MKCTF \
-	MKDEBUG MKDEBUGKERNEL MKDEBUGLIB MKDTB MKDTRACE \
+	MKDEBUG MKDEBUGLIB MKDTB MKDTRACE \
 	MKEXTSRC \
 	MKFIRMWARE \
 	MKGROFFHTMLDOC \

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.284 src/sys/conf/Makefile.kern.inc:1.285
--- src/sys/conf/Makefile.kern.inc:1.284	Tue Oct 26 23:06:59 2021
+++ src/sys/conf/Makefile.kern.inc	Mon Dec 20 15:33:20 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.284 2021/10/27 03:06:59 ryo Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.285 2021/12/20 20:33:20 christos Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -17,8 +17,8 @@
 #
 # all ports are expected to include bsd.own.mk for toolchain settings
 
-# Default DEBUG to -g if kernel debug info is requested by MKKDEBUG=yes
-.if defined(MKKDEBUG) && ${MKKDEBUG} == "yes"
+# Default DEBUG to -g if kernel debug info is requested by MKDEBUGKERNEL=yes
+.if defined(MKDEBUGKERNEL) && ${MKDEBUGKERNEL} == "yes"
 DEBUG?=-g
 .endif
 

Reply via email to