forked from kyuwabara/titanium-jasmine
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
50 lines (39 loc) · 1.26 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
# Makefile to start Titanium Mobile project from the command line.
# More info at http://github.com/guilhermechapiewski/titanium-jasmine
PROJECT_ROOT=$(shell pwd)
run-iphone:
@DEVICE_TYPE=iphone make run
test-iphone:
@DEVICE_TYPE=iphone make test
run-ipad:
@DEVICE_TYPE=ipad make run
test-ipad:
@DEVICE_TYPE=ipad make test
run-android:
@DEVICE_TYPE=android make run
test-android:
@DEVICE_TYPE=android make test
run:
@if [ "${DEVICE_TYPE}" == "" ]; then\
echo "Please run \"make run-[iphone|ipad]\" instead.";\
exit 1;\
fi
@mkdir -p ${PROJECT_ROOT}/Resources/spec/
@echo "" > ${PROJECT_ROOT}/Resources/spec/enabled.js
@make launch-titanium
test:
@if [ "${DEVICE_TYPE}" == "" ]; then\
echo "Please run \"make test-[iphone|ipad]\" instead.";\
exit 1;\
fi
@mkdir -p ${PROJECT_ROOT}/Resources/spec/
@echo "exports.tests_enabled = true;" > ${PROJECT_ROOT}/Resources/spec/enabled.js
@make launch-titanium
clean:
@rm -rf ${PROJECT_ROOT}/build/iphone/*
@mkdir -p ${PROJECT_ROOT}/build/iphone/
@echo "Deleted: ${PROJECT_ROOT}/build/iphone/*"
launch-titanium:
@echo "Building with Titanium... (DEVICE_TYPE:${DEVICE_TYPE})"
@mkdir -p ${PROJECT_ROOT}/build/iphone/
@PROJECT_ROOT=${PROJECT_ROOT} DEVICE_TYPE=${DEVICE_TYPE} bash ${PROJECT_ROOT}/bin/titanium.sh