summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 16 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index ba9756d..a19af3e 100644
--- a/Makefile
+++ b/Makefile
@@ -8,16 +8,24 @@ test: test-go test-wrappers
test-go:
go test
+wrappers = $(wildcard wrappers/*/)
+
# Enable parallelism if -j is specified
test-wrappers: build
- $(MAKE) .test-csharp .test-python
-
-.test-csharp:
- $(MAKE) -C wrappers/csharp test
-
-.test-python:
- $(MAKE) -C wrappers/python test
+ $(MAKE) $(foreach wrapper,$(wrappers),.test_$(wrapper))
clean:
$(MAKE) -C exports clean
- $(MAKE) -C wrappers/csharp clean
+ $(MAKE) .clean_libs $(foreach wrapper,$(wrappers),.clean_$(wrapper) )
+
+.clean_libs:
+ $(MAKE) -C exports clean
+
+define wrapper_targets
+.test_$(1):
+ $(MAKE) -C $(1) test
+.clean_$(1):
+ $(MAKE) -C $(1) clean
+endef
+
+$(foreach wrapper,$(wrappers),$(eval $(call wrapper_targets,$(wrapper))))