-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathMakefile
58 lines (39 loc) · 1.48 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#####################################################################################
# Copyright 2017 Normation SAS
#####################################################################################
.DEFAULT_GOAL := unlicensed
include makefiles/global-vars.mk
PLUGINS = $(shell find . -path ./src -prune -o -name "build.conf" -printf '%P\n' | cut -d "/" -f1 | grep -v "plugins-common" | xargs echo)
SCALA_PLUGINS = $(shell find . -path ./src -prune -o -name "pom-template.xml" -printf '%P\n' | cut -d "/" -f1 | grep -v "plugins-common" | xargs echo)
PLUGINS-LICENSED = $(addsuffix -licensed,$(PLUGINS))
ALL = $(PLUGINS)
# all
all: unlicensed
unlicensed: $(PLUGINS)
licensed: $(PLUGINS-LICENSED)
$(PLUGINS):%:
cd $@ && make
$(PLUGINS-LICENSED):%-licensed:
cd $* && make licensed
generate-all-pom:
for i in $(SCALA_PLUGINS); do cd $$i; $(MAKE) generate-pom; cd ..; done
doc-pages:
mkdir -p doc/pages
for i in $(PLUGINS); do cd $$i; [ -f README.adoc ] && sed '1,/\/\/ ====doc====/d' README.adoc >> ../doc/pages/$$i.adoc; cd ..; done
doc-assets:
mkdir -p doc/assets
for i in $(PLUGINS); do cd $$i; [ -d docs ] && cp -r docs/* ../doc/assets/; cd ..; done
doc: doc-assets doc-pages
scala-plugins-list:
@echo $(SCALA_PLUGINS)
plugins-list:
@echo $(PLUGINS)
clean:
rm -f pom.xml
rm -rf doc
for i in $(ALL); do cd $$i; $(MAKE) clean; cd ..; done
very-clean: clean
./makefiles/find_m2_repo.sh clean
optipng:
find . -name "*.png" -exec optipng -strip all {} \;
.PHONY: $(PLUGINS) doc