PWD = $(shell pwd) ifndef JANA_VERSION JANA_VERSION = 0.7.2 endif JANA_DIR = jana_$(JANA_VERSION) TARFILE = jana_$(JANA_VERSION).tgz export JANA_HOME = $(PWD)/$(JANA_DIR) all: prod_link prod_link: sconstruct test -L prod || ln -s $(JANA_DIR) prod # will not overwrite existing link # uncomment one of the following two lines to choose checkout of # source code or retrieval of a tar file ifdef JANA_VERSION sconstruct: $(JANA_HOME)/.untar_done # tar file else sconstruct: $(JANA_HOME)/.checkout_done # checkout endif cd $(JANA_HOME); scons $(JANA_HOME)/.checkout_done: svn co https://phys12svn.jlab.org/repos/JANA date > $@ $(JANA_HOME)/.untar_done: $(TARFILE) tar zxvf $(TARFILE) date > $@ $(TARFILE): @echo making $@ wget http://www.jlab.org/JANA/releases/$(TARFILE)