summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorStevenWdV <stevenwdv@gmail.com>2022-02-09 13:18:09 +0100
committerStevenWdV <stevenwdv@gmail.com>2022-02-09 13:18:09 +0100
commitac564204f6d4441eaa79ec08ec7a91e99bdb9a15 (patch)
tree3a1faf92e6e5b2b7726f872836a24e694be66a47 /Makefile
parentd439d1e72cf4a90b26c58dd26fd274a71563c3b8 (diff)
Cleanup, update indirect Go packages, support specifying list of wrappers to `test-wrappers`
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 11 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 13b95f5..eee9483 100644
--- a/Makefile
+++ b/Makefile
@@ -1,31 +1,29 @@
.PHONY: build test test-go test-wrappers clean
build:
- $(MAKE) -C exports build
+ $(MAKE) -C exports
test: test-go test-wrappers
test-go:
go test
-wrappers = $(wildcard wrappers/*/)
+WRAPPERS ?= $(notdir $(patsubst %/,%,$(wildcard wrappers/*/)))
-# Enable parallelism if -j is specified
+# Enable parallelism if -j is specified, but first execute build
test-wrappers: build
- $(MAKE) $(foreach wrapper,$(wrappers),.test_$(wrapper))
+ $(MAKE) $(foreach wrapper,$(WRAPPERS),.test-$(wrapper))
-# Enable parallelism if -j is specified
-clean:
- $(MAKE) .clean_libs $(foreach wrapper,$(wrappers),.clean_$(wrapper))
+clean: .clean_libs $(foreach wrapper,$(WRAPPERS),.clean-$(wrapper))
-.clean_libs:
+.clean-libs:
$(MAKE) -C exports clean
# Define test & clean for each wrapper
define wrapper_targets
-.test_$(1):
- $(MAKE) -C "$(1)" test
-.clean_$(1):
- $(MAKE) -C "$(1)" clean
+.test-$(1):
+ $(MAKE) -C wrappers/$(1) test
+.clean-$(1):
+ $(MAKE) -C wrappers/$(1) clean
endef
-$(foreach wrapper,$(wrappers),$(eval $(call wrapper_targets,$(wrapper))))
+$(foreach wrapper,$(WRAPPERS),$(eval $(call wrapper_targets,$(wrapper))))