aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorRamsay Jones <ramsay@ramsayjones.plus.com>2017-07-31 00:27:42 +0100
committerChristopher Li <sparse@chrisli.org>2017-08-09 21:56:31 -0400
commitc3db8218a6d1fa3ada5e1513a21f8207604d877c (patch)
treea711e9a5a415bfe65e634c51dfbe902807406843
parent2927c4a4f9b1e8f439679f8741b0411c0f22b419 (diff)
downloadsparse-dev-c3db8218a6d1fa3ada5e1513a21f8207604d877c.tar.gz
Makefile: pass -Wno-vla to sparse while checking pre-process.c
Introduce a $(CHECKER_FLAGS) variable to allow adding flags, using target specific variable assignments, to specific $(CHECKER) command invocations. In particular, in a new pre-process.cs target, include '-Wno-vla' in the flags while checking pre-process.c. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 64146dbd..c20ea2cd 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,7 @@ LD = gcc
AR = ar
PKG_CONFIG = pkg-config
CHECKER = ./cgcc -no-compile
+CHECKER_FLAGS =
ALL_CFLAGS = $(CFLAGS) $(BASIC_CFLAGS)
#
@@ -198,11 +199,13 @@ endif
c2xml.o c2xml.sc: CFLAGS += $(LIBXML_CFLAGS)
+pre-process.sc: CHECKER_FLAGS += -Wno-vla
+
%.o: %.c $(LIB_H)
$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
%.sc: %.c sparse
- $(QUIET_CHECK) $(CHECKER) -c $(ALL_CFLAGS) $<
+ $(QUIET_CHECK) $(CHECKER) $(CHECKER_FLAGS) -c $(ALL_CFLAGS) $<
ALL_OBJS := $(LIB_OBJS) $(foreach p,$(PROGRAMS),$(p).o $($(p)_EXTRA_DEPS))
selfcheck: $(ALL_OBJS:.o=.sc)