forked from mozilla/shumway
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
151 lines (117 loc) · 4.68 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# Copyright 2013 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
default:
@echo "run: make [check-system|install-utils|install-libs|build-tamarin-tests|"
@echo " build-playerglobal|build-extension|build-bundle|build-web|"
@echo " run-tamarin-tests|run-tamarin-sanity-tests|check-extension|"
@echo " test|push-test|build-bot|start-build-bot|update-flash-refs|"
@echo " install-tamarin|bootstrap]"
check-system:
echo "Checking the presence of wget..."
wget --version
echo "Checking the presence of java..."
java -version
echo "Checking the presence of node..."
node -v
if node -v | grep -e "v0\\.[0-7]\\." ; then \
echo "node 0.8+"; exit 1; \
fi
echo "The environment is good"
bootstrap: check-system install-libs install-utils build-playerglobal
install-libs:
git submodule init
git submodule update
install-utils: check-system
make -C utils/ install-asc install-closure install-js install-node-modules install-flex-sdk
install-tamarin: check-system
echo "Checking the presence of mercurial..."
hg --version
make -C utils/ install-tamarin install-tamarin-tests
BASE ?= $(error ERROR: Specify BASE that points to the Shumway folder with installed utils)
link-utils:
ln -s $(BASE)/utils/asc.jar $(BASE)/utils/cc.jar $(BASE)/utils/tamarin-redux $(BASE)/utils/jsshell $(BASE)/utils/node_modules utils/
run-tamarin-sanity-tests:
make -C utils/ run-tamarin-sanity-tests
run-tamarin-tests:
make -C utils/ run-tamarin-tests
build-playerglobal:
make -C utils/ build-playerglobal
build-bundle:
make -C utils/builder build
build-extension: build-bundle
make -C extension/firefox/ build
FIREFOX_PATH ?= $(error ERROR: Specify FIREFOX_PATH)
check-extension: build-extension
cd test/extension; python check.py -b "$(FIREFOX_PATH)"
build-web: build-bundle build-extension
make -C web/ build
MXMLC_FLAGS ?= -static-link-runtime-shared-libraries
MXMLC = ./utils/flex_sdk/bin/mxmlc $(MXMLC_FLAGS)
%.swf: %.as
$(MXMLC) $<
update-flash-refs:
node utils/update-flash-refs.js examples/inspector/inspector.html src/flash
node utils/update-flash-refs.js test/harness/slave.html src/flash
test-avm1:
make -C src/avm1/tests/ test
test-avm2:
make -C src/avm2/bin/ test-regress
reftest:
make -C test/ reftest
makeref:
make -C test/ makeref
reftest-swfdec:
make -C test/ reftest-swfdec
lint:
make -C test/ lint
hello-world:
make -C src/avm2/bin/ hello-world
IRC_ROOM = shumway-build-bot
server:
python utils/webserver.py
push-test:
git pull origin master
echo "Started test-interpreter-all" > /tmp/irc.mozilla.org/#$(IRC_ROOM)/in
make THREADS=8 -C src/avm2/bin/ test-interpreter-all
rsync -r -avz -e ssh src/avm2/bin/runs/ [email protected]:~/public/haxpath.com/public/Shumway/src/avm2/bin/runs/
echo "http://haxpath.com/Shumway/src/avm2/bin/plot/plot.html?runs="`cat .build_bot_latest_head`.i.parallel > /tmp/irc.mozilla.org/#$(IRC_ROOM)/in
echo "Started test-all" > /tmp/irc.mozilla.org/#$(IRC_ROOM)/in
make THREADS=8 -C src/avm2/bin/ test-all
rsync -r -avz -e ssh src/avm2/bin/runs/ [email protected]:~/public/haxpath.com/public/Shumway/src/avm2/bin/runs/
echo "http://haxpath.com/Shumway/src/avm2/bin/plot/plot.html?runs="`cat .build_bot_latest_head`.icov.parallel > /tmp/irc.mozilla.org/#$(IRC_ROOM)/in
build-bot:
if [ ! -f .build_bot_previous_head ] ; then \
git rev-parse master > .build_bot_previous_head ; \
fi
git pull origin master ;
git rev-parse master > .build_bot_latest_head ;
if ! diff .build_bot_latest_head .build_bot_previous_head > /dev/null ; then \
echo "Building" ; \
cat .build_bot_latest_head > .build_bot_previous_head ; \
echo "Started "`cat .build_bot_latest_head` > /tmp/irc.mozilla.org/#$(IRC_ROOM)/in ; \
make push-test ; \
echo "Finished All" > /tmp/irc.mozilla.org/#$(IRC_ROOM)/in ; \
fi
start-build-bot:
# Login to IRC
ii -i /tmp -s irc.mozilla.org -n shumway-build-bot &
echo "/JOIN #$(IRC_ROOM)" > /tmp/irc.mozilla.org/in
while [ 1 ] ; do \
make build-bot ; \
sleep 60 ; \
done
.PHONY: check-system install-libs install-utils build-tamarin-tests \
build-playerglobal build-extension build-web test default \
reftest reftest-swfdec makeref check-browser-manifest \
test-avm1 test-avm2