-
Notifications
You must be signed in to change notification settings - Fork 65
/
Makefile
54 lines (42 loc) · 1.55 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
# PERL scripts to extract regions from Cufflinks.
BINCUFF=bin/alter2bed.pl bin/combine_diff.pl bin/coordinat.pl \
bin/difflist2bed.pl bin/get_difflist.pl \
bin/parse_diff.pl bin/alt_reg_cufflinks
# ngs.plot R executable R scripts.
BINNGSP=bin/ngs.plot.r bin/replot.r bin/ngsplotdb.py \
bin/install.db.tables.r bin/remove.db.tables.r \
bin/setTableDefaults.py bin/plotCorrGram.r
# ngs.plot R libs.
LIB=lib/parse.args.r lib/plotlib.r lib/coverage.r lib/genedb.r
# All ngs.plot R files.
ALLR=${BINNGSP} ${LIB}
# ngs.plot database, example, readme, etc.
OTHERS=database example README Changes galaxy
# ngs.plot distribution folder
DISTFOLDER=ngsplot
# ngs.plot current version
CURVER := $(shell grep 'ngsplot.version' bin/ngs.plot.r |grep -oE '[0-9]\.[0-9]+(\.[0-9]+)?')
# example bam files.
BAM=example.bam
all: program bam
program: ngsplot-$(CURVER).tar.gz
bam: example.bam.tar.gz
ngsplot-$(CURVER).tar.gz: $(BINCUFF) $(BINNGSP) $(LIB) $(OTHERS)
rm -rf ${DISTFOLDER}
mkdir -p ${DISTFOLDER}/bin ${DISTFOLDER}/lib
cp -RL $(BINCUFF) $(BINNGSP) ${DISTFOLDER}/bin
cp -RL $(LIB) ${DISTFOLDER}/lib
cp -RL $(OTHERS) ${DISTFOLDER}
find ${DISTFOLDER}/ -name '.svn'|xargs -I% rm -r %
find ${DISTFOLDER}/ -name '.git'|xargs -I% rm -r %
# Remove comments and blank lines from *.r files.
# for r in ${ALLR}; do \
# sed '2,+10000 s/^\s*#.*//' ${DISTFOLDER}/$$r|sed '/^$$/ c\' > tmp; \
# mv tmp ${DISTFOLDER}/$$r; \
# done
tar czvf $@ ${DISTFOLDER}
rm -rf ${DISTFOLDER}
example.bam.tar.gz: $(BAM)
tar czvf $@ $(BAM)
clean:
rm -rf ngsplot-*.tar.gz example.bam.tar.gz