-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (21 loc) · 671 Bytes
/
Makefile
File metadata and controls
29 lines (21 loc) · 671 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.PHONY: build test test-go test-wrappers clean
build:
$(MAKE) -C exports
test: test-go test-wrappers
test-go:
go test
WRAPPERS ?= $(notdir $(patsubst %/,%,$(wildcard wrappers/*/)))
# Enable parallelism if -j is specified, but first execute build
test-wrappers: build
$(MAKE) $(foreach wrapper,$(WRAPPERS),.test-$(wrapper))
clean: .clean-libs $(foreach wrapper,$(WRAPPERS),.clean-$(wrapper))
.clean-libs:
$(MAKE) -C exports clean
# Define test & clean for each wrapper
define wrapper_targets
.test-$(1):
$(MAKE) -C wrappers/$(1) test
.clean-$(1):
$(MAKE) -C wrappers/$(1) clean
endef
$(foreach wrapper,$(WRAPPERS),$(eval $(call wrapper_targets,$(wrapper))))