forked from CyberAgent/beez
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
116 lines (90 loc) · 2.59 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#
# Beez Project: Makefile
#
PROJECTNAME="beez"
DESC="beez"
DIST="dist"
RELEASE="release"
REPORT="report"
__tar=$(shell which tar)
__tar_package_prefix=$(__tar)
__r_js=node_modules/requirejs/bin/r.js
__jshint=node_modules/jshint/bin/jshint
__jsdoc=node_modules/jsdoc/jsdoc
__plato=node_modules/plato/bin/plato
R_JS_CONFIG=build.js
DIST_FILE=dist/beez/index.js
NONE_RELEASE_FILE=release/beez.js
OPTIMIZE_RELEASE_FILE=release/beez.min.js
all: clean init deps setver jshint release last
release: release-none release-uglify
init:
@echo ""
@echo "####################"
@echo "# -- target: init"
npm install .
mkdir -p $(RELEASE)
mkdir -p $(REPORT)
clean:
@echo ""
@echo "####################"
@echo "# -- target: clean"
rm -rf $(DIST)
setver:
@echo ""
@echo "####################"
@echo "# -- target: setver"
./setver
deps:
@echo ""
@echo "####################"
@echo "# -- target: depsbuild"
#git submodule foreach 'git checkout master; git pull --all'
#git submodule foreach 'git checkout master; git fetch --prune; git pull --all'
#git submodule sync
#git submodule update
#git checkout master
#git pull --all
cd libs/beez-core; [ ! -d node_modules ] && npm install .; make
#cd libs/beez-ua; [ ! -d node_modules ] && npm install .; ./setver && make
cd libs/beez-utils; [ ! -d node_modules ] && npm install .; make
cd libs/beez-i18n; [ ! -d node_modules ] && npm install .; make
cd libs/beez-mvcr; [ ! -d node_modules ] && npm install .; make
jsdoc:
@echo ""
@echo "####################"
@echo "# -- target: jsdoc"
$(__jsdoc) -c .jsdoc3.json -d docs -p -r -l s/beez libs/beez-core/s/beez-core libs/beez-mvcr/s/beez-mvcr libs/beez-ua/s/beez-ua libs/beez-utils/s/beez-utils libs/beez-i18n/s/beez-i18n
jshint:
@echo ""
@echo "####################"
@echo "# -- target: jshint"
$(__jshint) --config .jshintrc s
report:
@echo ""
@echo "####################"
@echo "# -- target: report"
$(__plato) -d ./report -r ./s libs/beez-*/s
release-none:
@echo ""
@echo "####################"
@echo "# -- target: build-none"
$(__r_js) -o $(R_JS_CONFIG) optimize=none
cp -f $(DIST_FILE) $(NONE_RELEASE_FILE)
release-uglify:
@echo ""
@echo "####################"
@echo "# -- target: build-uglify"
$(__r_js) -o $(R_JS_CONFIG) optimize=uglify2
cp -f $(DIST_FILE) $(OPTIMIZE_RELEASE_FILE)
last:
@echo ""
@echo "####################"
@echo "# Successful!!!!"
@echo "####################"
@echo "release output"
@echo " - $(NONE_RELEASE_FILE)"
@echo " - $(OPTIMIZE_RELEASE_FILE)"
@echo ""
@echo ""
.PHONY: all release init clean setver deps jsdoc jshint report release-none release-uglify last