]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Add WERROR to Makefile for disabling -Werror
authorPekka Enberg <penberg@kernel.org>
Wed, 8 Jun 2011 14:29:12 +0000 (17:29 +0300)
committerPekka Enberg <penberg@kernel.org>
Wed, 8 Jun 2011 14:29:12 +0000 (17:29 +0300)
This patch adds a WERROR variable to Makefile that can be used as follows:

  make WERROR=0

to disable '-Werror' while building. This is useful while doing 'git bisect',
for example.

Suggested-by: Ingo Molnar <mingo@elte.hu>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/Makefile

index 84aea8ca31417dd9121943e6dc6a0e68008e50ff..97dce8698e2f7beca0dde4ae3ae95ce254db8b90 100644 (file)
@@ -1,3 +1,7 @@
+#
+# Define WERROR=0 to disable -Werror.
+#
+
 ifeq ($(strip $(V)),)
        E = @echo
        Q = @
@@ -111,7 +115,10 @@ DEFINES    += -D_GNU_SOURCE
 KVM_INCLUDE := include
 CFLAGS += $(CPPFLAGS) $(DEFINES) -I$(KVM_INCLUDE) -I../../include -I../../arch/$(ARCH)/include/ -Os -g
 
-WARNINGS += -Werror
+ifneq ($(WERROR),0)
+       WARNINGS += -Werror
+endif
+
 WARNINGS += -Wall
 WARNINGS += -Wcast-align
 WARNINGS += -Wformat=2