aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gmail.com>2011-04-13 13:06:04 +0200
committerChristopher Li <sparse@chrisli.org>2011-04-18 03:21:07 -0700
commitce870b5e305bf4f4422b1a82d75b6c73271981fa (patch)
treedc8e1842cca4d24cc656042282cc91af98dd9ab6
parent0c7d6bffbccead5fdf0897d575b12e389496c9d7 (diff)
downloadsparse-ce870b5e305bf4f4422b1a82d75b6c73271981fa.tar.gz
build: allow easy override of GCC_BASE
Sometimes gcc reports the wrong path for its own base (for instance when ICC is present in the same system); by allowing an override of GCC_BASE in Makefile, it's easier for packages to fix this up. Signed-off-by: Christopher Li <sparse@chrisli.org>
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 701cdc9a..3d259eed 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,8 @@ HAVE_GCC_DEP:=$(shell touch .gcc-test.c && \
echo 'yes'; rm -f .gcc-test.d .gcc-test.o .gcc-test.c)
HAVE_GTK2:=$(shell pkg-config --exists gtk+-2.0 2>/dev/null && echo 'yes')
-CFLAGS += -DGCC_BASE=\"$(shell $(CC) --print-file-name=)\"
+GCC_BASE = $(shell $(CC) --print-file-name=)
+CFLAGS += -DGCC_BASE=\"$(GCC_BASE)\"
ifeq ($(HAVE_GCC_DEP),yes)
CFLAGS += -Wp,-MD,$(@D)/.$(@F).d