diff options
author | Brian Behlendorf <[email protected]> | 2012-02-27 10:42:07 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-02-27 14:24:22 -0800 |
commit | 3c208a5480960c9610676dbabeee35fd8b8bb3d8 (patch) | |
tree | cc3ebd553d4f6f1f44bc9541a13b26c95e96f486 /Makefile.in | |
parent | feedc4360114941021ff0053a8f979235dd673da (diff) |
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 <[email protected]>
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 8 |
1 files changed, 8 insertions, 0 deletions
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 |