blob: 36a19daa9b6ffe2f6c3c1e006425360cdb37380d (
plain)
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 github.com/jwijenbergh/eduvpn-common/src
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))))
|