-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
53 lines (44 loc) · 1.03 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
JS_COMPILER = uglifyjs
#dnaism.v1.min.js
all: dnaism.v1.js
dnaism.v1.js: \
src/dnaism.js \
src/id.js \
src/identity.js \
src/context.js \
src/metric.js \
src/horizon.js \
src/axis.js \
src/rule.js \
src/bedfile.js \
src/bedserver.js \
Makefile
%.min.js: %.js Makefile
@rm -f $@
$(JS_COMPILER) < $< > $@
%.js:
@rm -f $@
@echo '(function(exports){' > $@
cat $(filter %.js,$^) >> $@
@echo '})(this);' >> $@
@chmod a-w $@
test: dnaism.v1.js
@echo "var d3 = require('d3');" > tests/dnaism.test.js
@cat $< | grep -v "(this);" | grep -v "(exports)" >> tests/dnaism.test.js
@chmod 755 tests/*.js
tests/main.js
site: dnaism.v1.min.js
cd example/depth; make beds
rsync -Lavz --delete $< site/* apu:/usr/local/www/dnaism.davidr.io/public/
pages:
cp -r site /tmp
git checkout gh-pages
cp -r /tmp/site/* .
cat tracking.txt >> index.html
rm -rf /tmp/site
echo "Type comming msg: "; read MSG; git commit -a -m '$$MSG'
git push -u origin gh-pages
git checkout master
clean:
rm -f dnaism.v1.js dnaism.v1.min.js
.PHONY: site pages