################################################################################ ## ## 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 FlowCellTargets.mk ## ## brief Standard make targets for the whole flow cell. ## ## postrun, reporting, summaries, clean, etc. ## ## author Come Raczy ## ################################################################################ # declare everything as secondary so that cleaning unnecessary files does not # cause rebuild of everything. BREAKS PATTERN RULES WITH QMAKE! #.SECONDARY: include $(MAKEFILES_DIR)/FlowcellSummary.mk include $(MAKEFILES_DIR)/Report.mk $(TOOLS): $(ECHO) Could not find program $@ $(AND) $(EXIT) $(ERROR_MISSING_PROGRAM) self_test: shell_test.done shell_test.done: has_shell.done has_pipefail.done has_shell.done: override OLD_SHELL:=$(SHELL) has_shell.done: override SHELL:=/bin/sh has_shell.done: @[ -e $(word 1, $(OLD_SHELL)) ] || { echo invalid shell: $(word 1, $(OLD_SHELL)): not found ; exit 1 ; } @[ -x $(word 1, $(OLD_SHELL)) ] || { echo invalid shell: $(word 1, $(OLD_SHELL)): not executable ; exit 1 ; } LIST_SHELL_OPTIONS ?= $(SET) -o CHECK_PIPEFAIL ?= { $(LIST_SHELL_OPTIONS) | $(GREP) pipefail ; } has_pipefail.done: has_shell.done @$(LIST_SHELL_OPTIONS) > /dev/null || { $(ECHO) ; $(ECHO) Error: could not list shell options: $(LIST_SHELL_OPTIONS) \(SHELL=$(SHELL)\) ; $(ECHO) Disable "'pipefail'" check by setting the environment variable ; $(ECHO) LIST_SHELL_OPTIONS to \"echo pipefail on\" ; exit $(ERROR_NO_PIPEFAIL) ; } @$(CHECK_PIPEFAIL) > /dev/null || { $(ECHO) ; $(ECHO) Error: Shell does not support "'pipefail'" \(SHELL=$(SHELL)\) ; $(ECHO) "'pipefail'" is required for accurate workflow management ; $(ECHO) Disable "'pipefail'" check by setting the environment variable ; $(ECHO) LIST_SHELL_OPTIONS to \"echo pipefail on\" ; exit ${ERROR_NO_PIPEFAIL} ; } @{ $(CHECK_PIPEFAIL) | grep '\' ; } > /dev/null || { $(ECHO) ; $(ECHO) Error: Shell option "'pipefail'" is not set \(SHELL=$(SHELL)\) ; $(ECHO) Try \'SHELL=\"$(SHELL) -o pipefail\"\' on the make command line ; $(ECHO) Disable "'pipefail'" check by setting the environment variable ; $(ECHO) LIST_SHELL_OPTIONS to \"echo pipefail on\" ; exit ${ERROR_NO_PIPEFAIL} ; } clean_intermediate.done: postrun.done $(if $(call IS_BOOLEAN_TRUE, $(KEEP_INTERMEDIARY)), , $(FIND) $(TEMP_DIR) -type f -not -name .sentinel |xargs $(RM)) clean: $(FIND) $(TEMP_DIR) -type f -not -name .sentinel |xargs $(RM) $(AND) @echo Finished cleaning. recursive_msg.done: @echo No target \'recursive\' - using \'all\' instead. recursive: recursive_msg.done all