# 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. 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-commissioning REPOSITORY_LOCATION = repos/branches/sim-recon-commissioning 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 $(HALLD_HOME)/.getarg_patches_done: $(HALLD_HOME)/.untar_done # tar file else $(HALLD_HOME)/.getarg_patches_done: $(HALLD_HOME)/.checkout_done # checkout endif ifdef APPLY_GETARG_PATCH cp -pv $(BUILD_SCRIPTS)/patches/getarg_fix/* \ $(HALLD_HOME)/src/programs/Simulation/HDGeant endif date > $@ sconstruct: $(HALLD_HOME)/.getarg_patches_done cd $(HALLD_HOME)/src ; scons install SHOWBUILD=1 $(HALLD_HOME)/sim-recon_prereqs_version.xml: sconstruct cd $(HALLD_HOME) ; $(BUILD_SCRIPTS)/version_prereqs.pl sim-recon prod_link: $(HALLD_HOME)/sim-recon_prereqs_version.xml test -L prod || ln -s $(SIM_RECON_DIR) prod # will not overwrite existing link