makepkg: unset variables as per !{make,build}flags

Don't just set the flag variables to zero length strings, actually unset
them from the environment. This fixes issues with broken gnu Makefies
that use ?= for assigment, where the presence of a var is enough to make
this condition avoid assignment.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dave Reisner 2011-09-06 09:29:52 -04:00 committed by Dan McGee
parent 7ed54a9940
commit 29ad9e0a0a

View file

@ -864,14 +864,12 @@ run_function() {
# clear user-specified buildflags if requested
if [[ $(check_option buildflags) = "n" ]]; then
CFLAGS=""
CXXFLAGS=""
LDFLAGS=""
unset CFLAGS CXXFLAGS LDFLAGS
fi
# clear user-specified makeflags if requested
if [[ $(check_option makeflags) = "n" ]]; then
MAKEFLAGS=""
unset MAKEFLAGS
fi
msg "$(gettext "Starting %s()...")" "$pkgfunc"