From 2052f29cdb2248ffbdc2d10b815ac50ad7494e01 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 25 Dec 2010 15:43:06 +1000 Subject: makepkg: add option to clear buildflags Add the "buildflags" option, which is useful in its negative form for disabling CFLAGS, CXXFLAGS and LDFLAGS when building a package. This is useful when determining of one of these flags is causing an issue with a package. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index c0fcae0f..73e5b906 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -45,7 +45,7 @@ srcdir="$startdir/src" pkgdir="$startdir/pkg" packaging_options=('strip' 'docs' 'libtool' 'emptydirs' 'zipman' 'purge') -other_options=('ccache' 'distcc' 'makeflags') +other_options=('ccache' 'distcc' 'buildflags' 'makeflags') splitpkg_overrides=('pkgver' 'pkgrel' 'pkgdesc' 'arch' 'license' 'groups' \ 'depends' 'optdepends' 'provides' 'conflicts' 'replaces' \ 'backup' 'options' 'install' 'changelog') @@ -739,6 +739,13 @@ run_function() { fi local pkgfunc="$1" + # clear user-specified buildflags if requested + if [[ $(check_option buildflags) = "n" ]]; then + CFLAGS="" + CXXFLAGS="" + LDFLAGS="" + fi + # clear user-specified makeflags if requested if [[ $(check_option makeflags) = "n" ]]; then MAKEFLAGS="" -- cgit v1.2.3-70-g09d2