| 1 |
# |
| 2 |
# Makefile for Augustus |
| 3 |
# |
| 4 |
include common.mk |
| 5 |
|
| 6 |
.PHONY: all augustus auxprogs clean install release test unit_test |
| 7 |
|
| 8 |
all: augustus auxprogs |
| 9 |
|
| 10 |
augustus: |
| 11 |
mkdir -p bin |
| 12 |
cd src && ${MAKE} |
| 13 |
|
| 14 |
auxprogs: |
| 15 |
mkdir -p bin |
| 16 |
cd auxprogs && ${MAKE} |
| 17 |
|
| 18 |
clean: |
| 19 |
cd src && ${MAKE} clean |
| 20 |
cd auxprogs && ${MAKE} clean |
| 21 |
@if [ -n $(shell which python3) ] ; then \ |
| 22 |
cd tests/short && \ |
| 23 |
./execute_test.py --clean examples && \ |
| 24 |
./execute_test.py --clean bam2hints && \ |
| 25 |
./execute_test.py --clean bam2wig; \ |
| 26 |
cd .. && ./pyclean.sh; \ |
| 27 |
fi |
| 28 |
|
| 29 |
PREFIX = /usr |
| 30 |
INSTALLDIR = debian/augustus-$(AUGVERSION) |
| 31 |
|
| 32 |
install: |
| 33 |
if [ ! $(PWD) -ef $(INSTALLDIR) ] ; then \ |
| 34 |
install -d $(INSTALLDIR) && \ |
| 35 |
cp -a config bin scripts $(INSTALLDIR) ; \ |
| 36 |
fi |
| 37 |
ln -sf $(INSTALLDIR)/bin/augustus $(PREFIX)/bin/augustus |
| 38 |
ln -sf $(INSTALLDIR)/bin/etraining $(PREFIX)/bin/etraining |
| 39 |
ln -sf $(INSTALLDIR)/bin/prepareAlign $(PREFIX)/bin/prepareAlign |
| 40 |
ln -sf $(INSTALLDIR)/bin/fastBlockSearch $(PREFIX)/bin/fastBlockSearch |
| 41 |
if [ -f $(INSTALLDIR)/bin/load2db ] ; then ln -sf $(INSTALLDIR)/bin/load2db $(PREFIX)/bin/load2db ; fi |
| 42 |
if [ -f $(INSTALLDIR)/bin/getSeq ] ; then ln -sf $(INSTALLDIR)/bin/getSeq $(PREFIX)/bin/getSeq ; fi |
| 43 |
|
| 44 |
# for internal purposes: |
| 45 |
release: |
| 46 |
find . -name "*~" | xargs rm -f |
| 47 |
rm .travis.yml |
| 48 |
rm -rf .git |
| 49 |
rm -rf .github |
| 50 |
rm -f src/makedepend.pl |
| 51 |
cd docs/tutorial2015/results; ls | grep -v do.sh | grep -v README | xargs rm; cd - |
| 52 |
rm -r auxprogs/utrrnaseq/input/human-chr19 |
| 53 |
rm -r docs/tutorial-cgp/results/cactusout |
| 54 |
make clean all |
| 55 |
rm config/species/generic/*.pbl |
| 56 |
cd src/parser; rm Makefile; cd - |
| 57 |
cd ..; tar -czf augustus-$(AUGVERSION).tar.gz augustus-$(AUGVERSION) |
| 58 |
|
| 59 |
check-python3: |
| 60 |
@if [ -z $(shell which python3) ] ; then \ |
| 61 |
echo "warning: Python3 is required for the execution of the test cases!"; \ |
| 62 |
exit 1; \ |
| 63 |
fi |
| 64 |
|
| 65 |
test: check-python3 all |
| 66 |
ifeq ("$(shell uname -s -m)","Linux x86_64") |
| 67 |
$(eval TEST_COMPARE := ) |
| 68 |
$(eval TEST_HTML := --html) |
| 69 |
else |
| 70 |
$(info If you run make test on a non-AMD64 architecture or a non-Linux system (like macOS), most tests will run without the --compare option!) |
| 71 |
$(eval TEST_COMPARE := ) |
| 72 |
$(eval TEST_HTML := ) |
| 73 |
endif |
| 74 |
cd tests/short && ./execute_test.py $(TEST_COMPARE) $(TEST_HTML) examples |
| 75 |
cd tests/short && ./execute_test.py --html bam2hints |
| 76 |
cd tests/short && ./execute_test.py --html bam2wig |
| 77 |
cd tests/short && ./execute_test.py --html filterbam |
| 78 |
|
| 79 |
unit_test: |
| 80 |
cd src && ${MAKE} unittest |
| 81 |
cd src/unittests && ./unittests |