-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
45 lines (31 loc) · 947 Bytes
/
Makefile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Exclude vendor folder from project subfolders
SUBDIRS = $(filter-out vendor/., $(wildcard */.))
SUBCLEAN = $(addsuffix .clean,$(SUBDIRS))
SUBTEST = $(addsuffix .test,$(SUBDIRS))
SUBLINT = $(addsuffix .lint,$(SUBDIRS))
SUBINSTALL = $(addsuffix .install,$(SUBDIRS))
SUBBUILD = $(addsuffix .build,$(SUBDIRS))
# invoke make all for all subprojects
all: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
# invoke make clean for all subprojects
clean: $(SUBCLEAN)
$(SUBCLEAN): %.clean:
$(MAKE) -C $* clean
# invoke make test for all subprojects
test: $(SUBTEST)
$(SUBTEST): %.test:
$(MAKE) -C $* test
# invoke make lint for all subprojects
lint: $(SUBLINT)
$(SUBLINT): %.lint:
$(MAKE) -C $* lint
install: $(SUBINSTALL)
$(SUBINSTALL): %.install:
$(MAKE) -C $* install
build: $(SUBBUILD)
$(SUBBUILD): %.build:
$(MAKE) -C $* build
.PHONY: all $(SUBDIRS) clean $(SUBCLEAN) test $(SUBTEST) lint $(SUBLINT) \
install $(SUBINSTALL) build $(SUBBUILD)