-
Notifications
You must be signed in to change notification settings - Fork 199
/
Makefile.deploy
75 lines (59 loc) · 2.41 KB
/
Makefile.deploy
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
JSDIR = $(PWD)/js
JS_SRCFILES = $(shell find $(JSDIR)/ -type f -and -name '*.js')
TWIKI_PLUGIN_MAKEFILE = twiki/JBrowsePlugin/Makefile.jbrowse
all: minify-js docs wig2png
release: release-normal release-min release-normal-test release-min-test release-notes.html
release-notes.html: release-notes.txt
markdown release-notes.txt > $@
release-normal: superclean docs minify-js
dzil build;
cp Makefile.PL JBrowse-*/;
cp JBrowse-*/release-notes.txt .;
rm JBrowse-*.tar.gz;
mv JBrowse-*/ `basename JBrowse-*`-full/;
zip -r `basename JBrowse-*`.zip JBrowse-*/;
release-normal-test: release-normal
cd JBrowse-*-full;
./setup.sh;
prove -lr -j3 tests/perl_tests;
release-min: release-normal
( \
export RELEASE=$(shell basename JBrowse-*/ -full); \
export MIN=$$RELEASE-min; \
cp -r JBrowse-*/ $$MIN/; \
rm -rf $$MIN/index-debug.html $$MIN/js $$MIN/dist.ini $$MIN/docs/jsdoc $$MIN/t $$MIN/tests $$MIN/xt $$MIN/sample_data $$MIN/*META.*; \
zip -r $$MIN.zip $$MIN/; \
cd $$MIN && ./setup.sh; \
)
release-min-test: release-min
cd JBrowse-*-min;
./setup.sh;
wig2png: wig2png/Makefile
$(MAKE) -C wig2png;
wig2png/Makefile: wig2png/configure
cd wig2png && ./configure
wig2png/configure: wig2png/configure.in
cd wig2png && autoconf
docs: doc
doc: docs/jsdoc/index.html
docs/jsdoc/index.html: $(JS_SRCFILES)
cd jslib/jsdoc_toolkit-*/ && java -jar jsrun.jar app/run.js -a -t=templates/jsdoc -d=../../docs/jsdoc $(JS_SRCFILES)
jbrowse:
$(MAKE) -f $(TWIKI_PLUGIN_MAKEFILE) all
minify-js: $(JS_SRCFILES)
for HTMLFILE in index compat_121; do \
if grep -q '<!-- js_source_files -->' $$HTMLFILE.html; then \
mv $$HTMLFILE.html $$HTMLFILE-debug.html; \
if ! which yui-compressor >/dev/null; then \
sudo apt-get install yui-compressor; \
fi; \
cat `perl -nE 'say $$1 if /src="(js\/[^"]+)/' $$HTMLFILE-debug.html` | yui-compressor --type js > jbrowse-$$HTMLFILE-min.js; \
perl -pe 'BEGIN { undef $$/; $$minfile = shift; }; s#<!-- js_source_files -->.*<!-- js_source_files --># <script type="text/javascript" src="$$minfile"></script>\n#ms' jbrowse-$$HTMLFILE-min.js $$HTMLFILE-debug.html > $$HTMLFILE.html; \
fi \
done
superclean: clean
-git clean -fdx;
clean:
-mv index-debug.html index.html;
rm -rf docs/jsdoc *-min.js release-notes.html;
.PHONY: all clean superclean jbrowse minify-js docs doc wig2png release release-min release-normal release-normal-test release-min-test