]> arthur.barton.de Git - bup.git/commitdiff
Makefile: avoid using -Werror with clang for now.
authorRob Browning <rlb@defaultvalue.org>
Sun, 10 Nov 2013 20:11:44 +0000 (14:11 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sun, 10 Nov 2013 21:59:09 +0000 (15:59 -0600)
Apparently the default compiler on OS X and FreeBSD is now clang, and
it doesn't like our CHECK_VALUE_FITS() definition.  So for now, just
don't specify -Werror when we detect clang.

Thanks to Alexander Barton <alex@barton.de>, Thomas Klausner
<tk@giga.or.at>, Sebastian Schumb <sebastian@sebastians-site.de>, and
Zoran Zaric <zz@zoranzaric.de> for reporting the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Alexander Barton <alex@barton.de>
Makefile

index 62f006c6dbf24d4a9f6290c740657e57c84bac9e..d2e61a7cb3d4c5964fcbdc1f3680364c26b148ca 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,11 @@
 OS:=$(shell uname | sed 's/[-_].*//')
-CFLAGS := -Wall -O2 -Werror $(PYINCLUDE) $(CFLAGS)
+
+ifeq ($(shell $(CC) --version | grep clang),)
+       CFLAGS := -Wall -Werror -O2 $(PYINCLUDE) $(CFLAGS)
+else # clang
+       CFLAGS := -Wall -O2 $(PYINCLUDE) $(CFLAGS)
+endif
+
 SOEXT:=.so
 
 ifeq ($(OS),CYGWIN)