-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile_amptools
More file actions
55 lines (47 loc) · 1.65 KB
/
Makefile_amptools
File metadata and controls
55 lines (47 loc) · 1.65 KB
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
ifdef AMPTOOLS_VERSION
SOURCE_TARGET = $(AMPTOOLS_DIR)/.make_prep_done
TARFILE = v$(AMPTOOLS_VERSION).tar.gz
AMPTOOLS_LOCAL_DIR_BASE = AmpTools-$(AMPTOOLS_VERSION)
else
SOURCE_TARGET = $(AMPTOOLS_DIR)/.clone_done
AMPTOOLS_LOCAL_DIR_BASE = AmpTools
endif
ifdef AMPTOOLS_DIRTAG
AMPTOOLS_LOCAL_DIR = $(AMPTOOLS_LOCAL_DIR_BASE)^$(AMPTOOLS_DIRTAG)
else
AMPTOOLS_LOCAL_DIR = $(AMPTOOLS_LOCAL_DIR_BASE)
endif
AMPTOOLS_DIR = $(shell pwd)/$(AMPTOOLS_LOCAL_DIR)
ifndef AMPTOOLS_URL
AMPTOOLS_URL = https://github.com/mashephe/AmpTools
endif
all: $(AMPTOOLS_DIR)/amptools_prereqs_version.xml
$(TARFILE):
wget --no-verbose --no-check-certificate \
$(AMPTOOLS_URL)/archive/$(TARFILE) -O $(TARFILE)
$(AMPTOOLS_DIR)/.unpack: $(TARFILE)
rm -rfv untar_temp
mkdir -v untar_temp
cd untar_temp; tar zxvf ../$(TARFILE)
mv -v untar_temp/AmpTools-$(AMPTOOLS_VERSION) $(AMPTOOLS_DIR)
rmdir -v untar_temp
date > $@
$(AMPTOOLS_DIR)/.patch: $(AMPTOOLS_DIR)/.unpack
cd $(AMPTOOLS_DIR); \
patch -p1 < ${BUILD_SCRIPTS}/patches/amptools/amptools_c++11.patch
date > $@
ifeq ($(AMPTOOLS_VERSION),0.9.1)
$(AMPTOOLS_DIR)/.make_prep_done: $(AMPTOOLS_DIR)/.patch
else
$(AMPTOOLS_DIR)/.make_prep_done: $(AMPTOOLS_DIR)/.unpack
endif
date > $@
$(AMPTOOLS_DIR)/.clone_done:
git clone $(AMPTOOLS_URL) $(AMPTOOLS_LOCAL_DIR)
date > $@
$(AMPTOOLS_DIR)/.make_done: $(SOURCE_TARGET)
export AMPTOOLS_HOME=$(AMPTOOLS_DIR); cd $(AMPTOOLS_DIR)/AmpTools ; make
export AMPTOOLS_HOME=$(AMPTOOLS_DIR); cd $(AMPTOOLS_DIR)/AmpPlotter ; make
date > $@
$(AMPTOOLS_DIR)/amptools_prereqs_version.xml: $(AMPTOOLS_DIR)/.make_done
cd $(AMPTOOLS_DIR) ; $(BUILD_SCRIPTS)/version_prereqs.pl amptools