summaryrefslogtreecommitdiff
path: root/build/tools/test/Makefile
diff options
context:
space:
mode:
authorNicolas Schodet2012-12-08 23:24:41 +0100
committerNicolas Schodet2019-10-06 23:29:59 +0200
commit849d164146e36554017732392526edb3793f1f7e (patch)
treedac2c2bfe2ba62e16877a5131342aa40268bd2c8 /build/tools/test/Makefile
parentc16defa7e73d1746bbbdd2572fcc608a628a447b (diff)
build: add target specific configuration
Diffstat (limited to 'build/tools/test/Makefile')
-rw-r--r--build/tools/test/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/build/tools/test/Makefile b/build/tools/test/Makefile
new file mode 100644
index 0000000..59bd2da
--- /dev/null
+++ b/build/tools/test/Makefile
@@ -0,0 +1,16 @@
+CONFIG_GEN = ../config-gen
+MODULES_CONFIG = a-Config b-Config
+
+TARGETS := host:host stm32f4:stm32f4 stm32f4:arm
+
+TESTS = ok nok-unknown nok-nodefault nok-missdefault nok-toomany nok-badtarget
+
+all: $(TESTS:%=test-%)
+
+test-%: Config-% $(MODULES_CONFIG) $(CONFIG_GEN)
+ expect=$(if $(filter ok,$*),0,1); \
+ $(CONFIG_GEN) -p $< -H out-$*/%.hh -T "$(TARGETS)" $(MODULES_CONFIG); \
+ test $$expect -eq $$?
+
+clean:
+ rm -rf $(TESTS:%=out-%)