-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
86 lines (71 loc) · 2 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
# Makefile
#
# Copyright 2012 Chaitanya Talnikar <chaitukca@gmail.com>
#
# This file contains the necessary targets for building the simulator
# for production.
SRC = main
JSFILES = $(SRC)/js/*
HTML = $(SRC)/index.html
LIB = $(SRC)/lib
CSS = $(SRC)/css
ZIP = simulator
TEST = test.io.TestImportExport.testR
LINT = jshint
all: lint doc test pkg
libs: libdir bui d3 rickshaw libSBGN.js
libdir:
#create the lib directory
rm -rf $(LIB)
mkdir -p $(LIB)
bui:
#fetch biographer-ui, install it's compilation dependencies for ubuntu and build it
hg clone https://code.google.com/p/biographer.visualization/ UI
cd UI; \
python src/build/python/manage.py clean build test compress createDistribution
cp -R UI/target/distribution/css/. $(CSS)
cp -R UI/target/distribution/js/. $(LIB)
rm -rf UI
d3:
#fetch d3.js min library
wget http://d3js.org/d3.v2.min.js
mv d3.v2.min.js $(LIB)
rickshaw:
#fetch Rickshaw from github
wget https://raw.github.com/shutterstock/rickshaw/master/rickshaw.min.css
mv rickshaw.min.css $(CSS)
wget https://raw.github.com/shutterstock/rickshaw/master/rickshaw.min.js
mv rickshaw.min.js $(LIB)
libSBGN.js:
#fetch libSBGN.js, install ant and build it
git clone git://github.com/chemhack/libSBGN.js.git
cd libSBGN.js; \
git submodule init; \
git submodule update; \
ant compile
cp libSBGN.js/build/compiled-advanced.js $(LIB)/libSBGN.min.js
rm -rf libSBGN.js
lint:
#run lint to check code faults
$(LINT) $(JSFILES)
doc:
#create documentation for the project
rm -rf jsdoc
jsdoc -d=jsdoc $(JSFILES)
deps:
#dependencies required for the simulator: building libs, checking code
sudo apt-get install nodejs npm node-uglify ant git-core \
jsdoc-toolkit libqtwebkit4 python-qt4 python-pip
sudo npm install -g $(LINT)
sudo pip install selenium
browse:
#test the app in a small browser
python tests/browse.py $(HTML)
test:
#test using selenium webdriver locally
python tests/main.py
pkg:
#create a deployable package
cd main; \
zip -r $(ZIP) .
mv main/$(ZIP).zip .