# 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) all: prod_link $(EVIO_HOME)/.checkout_done: svn co $(SVN_URL) date > $@ $(TARFILE): wget --no-check-certificate http://coda.jlab.org/wiki/Downloads/evio/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 > $@ ifndef EVIO_VERSION make_evio: $(EVIO_HOME)/.checkout_done else make_evio: $(EVIO_HOME)/.untar_done endif cd $(EVIO_HOME) ; scons --prefix=. install prod_link: make_evio test -L prod || ln -s $(DIR_NAME) prod # will not overwrite existing link