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: $(JANA_HOME)/$(BMS_OSNAME)/jana_prereqs_version.xml test -L prod || ln -s $(JANA_DIR) prod # will not overwrite existing link $(JANA_HOME)/$(BMS_OSNAME)/jana_prereqs_version.xml: sconstruct cd $(JANA_HOME)/$(BMS_OSNAME) ; $(BUILD_SCRIPTS)/version_prereqs.pl jana 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)