################################################################################ ## ## Copyright (c) 2007-2011 Illumina, Inc. ## ## This software is covered by the "Illumina Genome Analyzer Software ## License Agreement" and the "Illumina Source Code License Agreement", ## and certain third party copyright/licenses, and any user of this ## source file is bound by the terms therein (see accompanying files ## Illumina_Genome_Analyzer_Software_License_Agreement.pdf and ## Illumina_Source_Code_License_Agreement.pdf and third party ## copyright/license notices). ## ## This file is part of the Consensus Assessment of Sequence And VAriation ## (CASAVA) software package. ## ## file BuildProjectSample.mk ## ## brief Rules for single project sample build validation ## ## author Roman Petrovski ## ################################################################################ ifeq (,$(currentProjectSamples)) $(error ERROR: empty list of project samples) endif project_sample := $(word 1, $(currentProjectSamples)) ifeq (1,$(words $(currentProjectSamples))) currentProjectSamples := else currentProjectSamples := $(wordlist 2, $(words $(currentProjectSamples)), $(currentProjectSamples)) endif BUILD_PARAMS:= include $(BUILD_CFG_ROOT)/$(project_sample)/ValidationConfig.mk ifeq (,$(BUILD_PARAMS)) $(error "BUILD_PARAMS not set by $(BUILD_CFG_ROOT)/$(project_sample)/ValidationConfig.mk") endif FORMAT_TASKS_FILE_NAME = tasks_$(shell $(DATE) '+%F_%H-%M-%S').txt Build/$(project_sample)/Build.configured: tasks_file_name := $(FORMAT_TASKS_FILE_NAME) Build/$(project_sample)/Build.configured: project_sample:=$(project_sample) Build/$(project_sample)/Build.configured: BUILD_PARAMS:=$(BUILD_PARAMS) Build/$(project_sample)/Build.configured: SHELL=$(SHELL_LOG) Build/$(project_sample)/Build.configured: Build/$(project_sample)/.sentinel $(CMDPREFIX) $(CONFIGURE_BUILD) \ --skipVariableMetadata $(BUILD_PARAMS) \ --outDir $(dir $@) \ --postRunCmd '$(TOUCH) $(CURDIR)/$(dir $@)Build.finished' \ --make \ --workflowFile $(dir $@)$(tasks_file_name) \ --task2MakeParams='--finishedPrefix tmp/make/$(tasks_file_name)/' \ $(CONFIGURE_BUILD_PARAMS) \ $(AND) $(TOUCH) $@ \ $(AND) ($(LOG_INFO) 'Configure build [OK]') # make sure cat is used instead of copy for ValidationConfig.mk to get the default permission # bits as opposite to inheriting the installation folder ones which are usually read-only Build/$(project_sample)/ValidationConfig.mk: src:=$(BUILD_CFG_ROOT)/$(project_sample)/ValidationConfig.mk Build/$(project_sample)/ValidationConfig.mk: Build/$(project_sample)/Build.configured Build/$(project_sample)/.sentinel $(CAT) $(src) >$(SAFEPIPETARGET) BUILD_CONFIGURED_TARGETS += Build/$(project_sample)/Build.configured # make sure the submake uses our MAKEFILES_DIR regardless of what it has defined internally. # this is useful when chaning the top level makefile during debugging Build/$(project_sample)/Build.finished: SHELL=$(SHELL_LOG_OLD) Build/$(project_sample)/Build.finished: Build/$(project_sample)/Build.configured $(MAKE) -C $(dir $@) MAKEFILES_DIR:=$(MAKEFILES_DIR) BUILD_FINISHED_TARGETS += Build/$(project_sample)/Build.finished Build/$(project_sample)/ValidationConfig.mk