aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gmail.com>2011-04-08 02:39:00 +0200
committerDiego Elio Pettenò <flameeyes@gmail.com>2011-04-08 02:39:00 +0200
commita53f71f99bf7df3f9afc66e6ab0d71b6c3139a94 (patch)
tree93f5de25808f6fed5d620c6e79f467e6d4fdce66
parentsparse 0.4.3 finial (diff)
downloadsparse-a53f71f99bf7df3f9afc66e6ab0d71b6c3139a94.tar.gz
sparse-a53f71f99bf7df3f9afc66e6ab0d71b6c3139a94.tar.bz2
sparse-a53f71f99bf7df3f9afc66e6ab0d71b6c3139a94.zip
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.
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 74905df..67d5ee6 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