aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/tests/generated/Makefile
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-10-26 13:00:45 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2015-10-26 13:00:45 +0100
commit51b059d9a5559cf06e13e82bcda3da9f1c70fad1 (patch)
treed2060251ae147a565e2d6297666effc5fe7fa7a0 /cparser/tests/generated/Makefile
parent94163429293cef7410320f79fc5964fc546fccef (diff)
parent52c4f2622a32a88f9470111542b547514e6b21cc (diff)
downloadcompcert-51b059d9a5559cf06e13e82bcda3da9f1c70fad1.tar.gz
compcert-51b059d9a5559cf06e13e82bcda3da9f1c70fad1.zip
Merge branch 'fpottier-clean'
Diffstat (limited to 'cparser/tests/generated/Makefile')
-rw-r--r--cparser/tests/generated/Makefile50
1 files changed, 50 insertions, 0 deletions
diff --git a/cparser/tests/generated/Makefile b/cparser/tests/generated/Makefile
new file mode 100644
index 00000000..fb6e7610
--- /dev/null
+++ b/cparser/tests/generated/Makefile
@@ -0,0 +1,50 @@
+#######################################################################
+# #
+# The Compcert verified compiler #
+# #
+# François Pottier, INRIA Paris-Rocquencourt #
+# #
+# Copyright Institut National de Recherche en Informatique et en #
+# Automatique. All rights reserved. This file is distributed #
+# under the terms of the INRIA Non-Commercial License Agreement. #
+# #
+#######################################################################
+
+.PHONY: all clean
+
+SOURCES := $(wildcard *.c)
+TARGETS := \
+ $(patsubst %.c,%.ccomp.err,$(SOURCES)) \
+ $(patsubst %.c,%.gcc.err,$(SOURCES)) \
+ $(patsubst %.c,%.clang.err,$(SOURCES))
+
+CCOMP := ../../../ccomp
+GCC := gcc
+CLANG := clang
+
+all: $(TARGETS)
+
+clean:
+ @ rm -f *.err *~
+
+%.ccomp.err: %.c $(CCOMP)
+ @ echo $(CCOMP) -c $<
+ @ if $(CCOMP) -c $< 2>$@ ; then \
+ echo "UNEXPECTED SUCCESS: $(CCOMP) -c $< SUCCEEDED!" ; \
+ fi
+ @ if grep "unknown syntax error" $@ ; then \
+ echo "UNKNOWN SYNTAX ERROR!" ; \
+ fi
+
+%.gcc.err: %.c
+ @ echo $(GCC) -c $<
+ @ if $(GCC) -c $< 2>$@ ; then \
+ echo "UNEXPECTED SUCCESS: $(GCC) -c $< SUCCEEDED!" ; \
+ fi
+
+%.clang.err: %.c
+ @ echo $(CLANG) -c $<
+ @ if $(CLANG) -c $< 2>$@ ; then \
+ echo "UNEXPECTED SUCCESS: $(CLANG) -c $< SUCCEEDED!" ; \
+ fi
+