From 6c22ef2c8287ef16f57fba08077520ad0c68dff8 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 23 Sep 2012 17:06:34 +1000 Subject: makepkg: add option to include debugging compiler flags Add a "debug" option that appends the compiler flags specified in the variables DEBUG_CFLAGS and DEBUG_CXXFLAGS in makepkg.conf to their counterpart buildflags. Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index d4d435f0..238d3408 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -44,7 +44,8 @@ declare -r confdir='@sysconfdir@' declare -r BUILDSCRIPT='@BUILDSCRIPT@' declare -r startdir="$PWD" -packaging_options=('strip' 'docs' 'libtool' 'emptydirs' 'zipman' 'purge' 'upx') +packaging_options=('strip' 'docs' 'libtool' 'emptydirs' 'zipman' 'purge' 'upx' \ + 'debug') other_options=('ccache' 'distcc' 'buildflags' 'makeflags') splitpkg_overrides=('pkgver' 'pkgrel' 'epoch' 'pkgdesc' 'arch' 'url' 'license' \ 'groups' 'depends' 'optdepends' 'provides' 'conflicts' \ @@ -1340,6 +1341,11 @@ run_function() { unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS fi + if check_option "debug" "y"; then + CFLAGS+=" $DEBUG_CFLAGS" + CXXFLAGS+=" $DEBUG_CXXFLAGS" + fi + # clear user-specified makeflags if requested if check_option "makeflags" "n"; then unset MAKEFLAGS -- cgit v1.2.3-70-g09d2