PWD = $(shell pwd) #JANA_VERSION = 0.6.1 ifdef JANA_VERSION JANA_DIR = jana_$(JANA_VERSION) TARFILE = jana_$(JANA_VERSION).tgz else JANA_DIR = JANA endif export JANA_HOME = $(PWD)/$(JANA_DIR) all: prod_link prod_link: make_install_jana test -L prod || ln -s $(JANA_DIR) prod # will not overwrite existing link make_install_jana: make_jana $(MAKE) -C$(JANA_HOME)/src install make_jana: $(JANA_HOME)/.configure_done $(MAKE) -C$(JANA_HOME) # uncomment one of the following two lines to choose checkout of # source code or retrieval of a tar file ifdef JANA_VERSION $(JANA_HOME)/.configure_done: $(JANA_HOME)/.untar_done # tar file else $(JANA_HOME)/.configure_done: $(JANA_HOME)/.checkout_done # checkout endif cd $(JANA_HOME); ./configure --with-xerces=$(XERCESCROOT) date > $@ $(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)