# Makefile_sim-recon # Builds sim-recon under a new directory (SIM_RECON_DIR) rooted in the current # working directory. The new directory has a name that depends on the # version being built. # SIM_RECON_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. WHICH_GFORTRAN = $(shell which gfortran) PWD = $(shell pwd) ifdef SIM_RECON_VERSION SIM_RECON_DIR = sim-recon-$(SIM_RECON_VERSION) TARFILE = sim-recon-$(SIM_RECON_VERSION)-src.tar.gz else SIM_RECON_DIR = sim-recon REPOSITORY_LOCATION = repos/trunk/sim-recon endif export HALLD_HOME = $(PWD)/$(SIM_RECON_DIR) all: prod_link $(TARFILE): wget --no-check-certificate http://halldweb1.jlab.org/dist/$(TARFILE) $(HALLD_HOME)/.untar_done: $(TARFILE) tar zxvf $(TARFILE) date > $@ $(HALLD_HOME)/.checkout_done: svn co https://halldsvn.jlab.org/$(REPOSITORY_LOCATION) date > $@ ifdef SIM_RECON_VERSION sconstruct: $(HALLD_HOME)/.untar_done # tar file else sconstruct: $(HALLD_HOME)/.checkout_done # checkout endif cd $(HALLD_HOME)/src ; scons install SHOWBUILD=1 prod_link: sconstruct test -L prod || ln -s $(SIM_RECON_DIR) prod # will not overwrite existing link