selfcheck target for the makefile
authorMatthias Braun <matze@braunis.de>
Thu, 14 Feb 2008 15:44:43 +0000 (15:44 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 14 Feb 2008 15:44:43 +0000 (15:44 +0000)
[r18857]

Makefile

index 61b3cb3..4749e6a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -51,6 +51,7 @@ SOURCES := \
 OBJECTS = $(SOURCES:%.c=build/%.o)
 
 SPLINTS = $(addsuffix .splint, $(SOURCES))
+CPARSERS = $(addsuffix .cparser, $(SOURCES))
 
 Q = @
 
@@ -82,10 +83,16 @@ $(GOAL): build/adt build/driver $(OBJECTS)
 
 splint: $(SPLINTS)
 
+selfcheck: $(CPARSERS)
+
 %.c.splint: %.c
        @echo '===> SPLINT $<'
        $(Q)splint $(CPPFLAGS) $<
 
+%.c.cparser: %.c
+       @echo '===> CPARSER $<'
+       $(Q)./cparser $(CPPFLAGS) -fsyntax-only $<
+
 build/adt build/driver:
        @echo "===> MKDIR $@"
        $(Q)mkdir -p $@