-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile_evio
47 lines (38 loc) · 1.58 KB
/
Makefile_evio
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
# Makefile_evio
# Builds EVIO under a new directory rooted in the current working
# directory. The new directory (DIR_NAME) has a name that depends on
# the version being built.
# EVIO_VERSION defines which tagged version to build. It should
# correspond to the name of the desired directory in the repos/tags
# directory of the repository. If left undefined, the latest version
# will be checked out from the repos/trunk.
PWD = $(shell pwd)
ifndef EVIO_VERSION
EVIO_VERSION=4.3.1
endif
MAJOR_MINOR = $(shell perl -e '$$v = "$(EVIO_VERSION)"; @t = split(/\./, $$v); print "$$t[0].$$t[1]";')
DIR_NAME = evio-$(EVIO_VERSION)
TARFILE = evio-$(EVIO_VERSION).tgz
EVIO_HOME = $(PWD)/$(DIR_NAME)
EVIO_DOWNLOAD_URL_BASE = https://coda.jlab.org/drupal/system/files/coda/evio
SCONS = $(shell $(BUILD_SCRIPTS)/python_chooser.sh scons)
all: $(EVIO_HOME)/.scons_done
$(TARFILE):
wget --no-verbose --no-check-certificate $(EVIO_DOWNLOAD_URL_BASE)/evio-$(MAJOR_MINOR)/$(TARFILE)
$(EVIO_HOME)/.untar_done: $(TARFILE)
mkdir -p temp
cd temp ; tar zxf ../$(TARFILE)
mv -v temp/evio-$(MAJOR_MINOR)* $(DIR_NAME)
rmdir -v temp
date > $@
$(EVIO_HOME)/.patch_done: $(EVIO_HOME)/.untar_done
ifeq ($(MAJOR_MINOR),4.3)
cd $(EVIO_HOME) ; patch -p1 < $(BUILD_SCRIPTS)/patches/evio/evio-4.3.patch
endif
cd $(EVIO_HOME) ; patch SConstruct < $(BUILD_SCRIPTS)/patches/evio/SConstruct.patch
cd $(EVIO_HOME) ; patch coda.py < $(BUILD_SCRIPTS)/patches/evio/coda.py.patch
date > $@
$(EVIO_HOME)/.scons_done: $(EVIO_HOME)/.patch_done
@echo Makefile_evio info: SCONS = $(SCONS)
cd $(EVIO_HOME) ; $(SCONS) --prefix=. install
date > $@