forked from GMOD/jbrowse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.deploy
65 lines (51 loc) · 2.04 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
JSDIR = $(PWD)/js
JSMIN_TARGET = jbrowse-min.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: 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-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/; \
)
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: $(JSMIN_TARGET)
$(JSMIN_TARGET): $(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 > $@; \
perl -pe 'BEGIN { undef $$/; }; s#<!-- js_source_files -->.*<!-- js_source_files --># <script type="text/javascript" src="$(JSMIN_TARGET)"></script>\n#ms' $$HTMLFILE-debug.html > $$HTMLFILE.html; \
fi \
done
superclean: clean
-git clean -fdx;
clean:
-mv index-debug.html index.html;
rm -rf docs/jsdoc $(JSMIN_TARGET);
.PHONY: all clean superclean jbrowse minify-js docs doc wig2png release release-min release-normal