-
Notifications
You must be signed in to change notification settings - Fork 222
/
Makefile
70 lines (59 loc) · 2.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
59
60
61
62
63
64
65
66
67
68
69
GARGOYLE_VERSION:=1.15.X (Built $(shell echo "`date -u +%Y%m%d-%H%M` git@`git log -1 --pretty=format:%h`"))
V=s
FULL_BUILD=false
CUSTOM_TEMPLATE=ath79
CUSTOM_TARGET=ath79
JS_COMPRESS=true
CSS_COMPRESS=true
TRANSLATION=internationalize
FALLBACK_LANG=English-EN
ACTIVE_LANG=English-EN
BUILD_THREADS=auto
DISTRIBUTION=false
ALL:
( \
targets=`ls targets | sed 's/custom//g' ` ;\
if [ -d "Distribution" ] ; then rm -rf "Distribution" ; fi ;\
for t in $$targets ; do \
if [ ! -d "$$t-src" ] || [ "$(FULL_BUILD)" = "1" -o "$(FULL_BUILD)" = "true" -o "$(FULL_BUILD)" = "TRUE" ] ; then \
bash build.sh "$$t" "$(GARGOYLE_VERSION)" "$(V)" "" "" "$(JS_COMPRESS)" "$(CSS_COMPRESS)" "" "$(TRANSLATION)" "$(FALLBACK_LANG)" "$(ACTIVE_LANG)" "$(BUILD_THREADS)" "$(DISTRIBUTION)";\
else \
bash rebuild.sh "$$t" "$(GARGOYLE_VERSION)" "$(V)" "$(JS_COMPRESS)" "$(CSS_COMPRESS)" "" "$(TRANSLATION)" "$(FALLBACK_LANG)" "$(ACTIVE_LANG)" "$(BUILD_THREADS)" "$(DISTRIBUTION)" ;\
fi ;\
done ;\
)
distclean:
rm -rf ./*-src
rm -rf ./compressed_javascript
rm -rf ./compressed_css
rm -rf ./package-prepare
rm -rf ./built
rm -rf ./images
rm -rf ./downloaded
rm -rf ./minifiers
clean:
rm -rf ./*-src
rm -rf ./compressed_javascript
rm -rf ./compressed_css
rm -rf ./package-prepare
rm -rf ./built
rm -rf ./images
cleanup:
find . -name ".svn" | xargs rm -rf
find . -name "*~" | xargs rm -rf
find . -name ".*sw*" | xargs rm -rf
%:
( \
target=`echo $@ | sed 's/\..*$$//'` ; \
profile=`echo $@ | sed 's/^.*\.//'` ; \
have_profile=`echo $@ | grep "\."` ; \
if [ -z "$$have_profile" ] ; then profile="" ; fi ; \
if [ ! -d "targets/$${target}" ] ; then echo "ERROR: Specified Target Does Not Exist" ; exit ; fi ; \
if [ -n "$$profile" ] && [ ! -d "targets/$${target}/profiles/$${profile}" ] ; then echo "ERROR: Specified Target Profile Does Not Exist" ; exit ; fi ; \
if [ -d "Distribution" ] ; then rm -rf "Distribution" ; fi ;\
if [ ! -d "$${target}-src" ] || [ "$(FULL_BUILD)" = "1" -o "$(FULL_BUILD)" = "true" -o "$(FULL_BUILD)" = "TRUE" ] ; then \
bash build.sh "$$target" "$(GARGOYLE_VERSION)" "$(V)" "$(CUSTOM_TARGET)" "$(CUSTOM_TEMPLATE)" "$(JS_COMPRESS)" "$(CSS_COMPRESS)" "$$profile" "$(TRANSLATION)" "$(FALLBACK_LANG)" "$(ACTIVE_LANG)" "$(BUILD_THREADS)" "$(DISTRIBUTION)"; \
else \
bash rebuild.sh "$$target" "$(GARGOYLE_VERSION)" "$(V)" "$(JS_COMPRESS)" "$(CSS_COMPRESS)" "$$profile" "$(TRANSLATION)" "$(FALLBACK_LANG)" "$(ACTIVE_LANG)" "$(BUILD_THREADS)" "$(DISTRIBUTION)"; \
fi ; \
)