From 3c208a5480960c9610676dbabeee35fd8b8bb3d8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 27 Feb 2012 10:42:07 -0800 Subject: Cleanly support debug packages Allow a source rpm to be rebuilt with debugging enabled. This avoids the need to have to manually modify the spec file. By default debugging is still largely disabled. To enable specific debugging features use the following options with rpmbuild. '--with debug' - Enables ASSERTs '--with debug-log' - Enables the internal debug log '--with debug-kmem' - Enables basic memory accounting '--with debug-kmem-tracking' - Enables detailed memory tracking # For example: $ rpmbuild --rebuild --with debug spl-modules-0.6.0-rc6.src.rpm Signed-off-by: Brian Behlendorf --- Makefile.in | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index 90c10c074..7c8f696a5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -181,6 +181,10 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_KMEM = @DEBUG_KMEM@ +DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ +DEBUG_LOG = @DEBUG_LOG@ +DEBUG_SPL = @DEBUG_SPL@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -905,6 +909,10 @@ rpm-common: --define "require_kdir $(LINUX)" \ --define "require_kobj $(LINUX_OBJ)" \ --define "require_kver $(LINUX_VERSION)" \ + --define "$(DEBUG_SPL) 1" \ + --define "$(DEBUG_LOG) 1" \ + --define "$(DEBUG_KMEM) 1" \ + --define "$(DEBUG_KMEM_TRACKING) 1" \ --nodeps --rebuild $$rpmpkg || exit 1; \ cp $$rpmbuild/RPMS/*/* . || exit 1; \ $(RM) -R $$rpmbuild -- cgit v1.2.3