#-- start of packages_header ------

#!include $(CMTROOT)\src\NMakefile.core
!include $(cmt_broadcast_tagfile)

!if "$(BCAST_CMD)" == ""
BCAST_CMD = $(cmtexe) make /$(MAKEFLAGS) CMTBCAST=
!endif

!if "$(LOG_LOCATION)" != ""
!if "$(LOG_SUFFIX)" == ""
LOG_SUFFIX = .log
!endif
!endif

!if "$(CMTACTIONS)" == ""
Cmt_actions_handler = if not "%%g" == "cmt_actions"
!else
Cmt_actions_handler =
!endif

# -- Special macro to change the behavior on a failure of a package
#    (complementary to the option '-k')
#  Allowed values for PACKAGE_FAILURE_POLICY:
#    stop:   do not continue (default)
#    skip:   if a group fails, continue with the next package
#    ignore: try all the groups even if one fails before going to the next package
#            (may result in duplicated errors within a package)
# Unix version taken from https://svnweb.cern.ch/trac/gaudi/browser/Gaudi/trunk/Makefile.cmt (Modified by Grigory Rybkin)
Package_failure_handler = || exit
!if "$(PACKAGE_FAILURE_POLICY)" != ""
!if "$(PACKAGE_FAILURE_POLICY)" == "stop"
Package_failure_handler = || exit
!else if "$(PACKAGE_FAILURE_POLICY)" == "skip"
Package_failure_handler = || exit 0
!else if "$(PACKAGE_FAILURE_POLICY)" == "ignore"
Package_failure_handler = || type nul > nul
!else
!error "Unknown PACKAGE_FAILURE_POLICY $(PACKAGE_FAILURE_POLICY). Allowed values: stop (default), skip, ignore"
!endif
!endif
# -----------------------------------------------------------------

all :: ;

!if "$(BCAST_ONLY)" != ""
all :: ${PACKAGE}
clean : ${PACKAGE}clean
binclean : ${PACKAGE}binclean
uninstall : ${PACKAGE}uninstall
check : ${PACKAGE}check
!endif
#--------------------------------------------------------

!if "$(use_requirements)" != ""
$(use_requirements) : ;
!endif

#-- end of packages_header ------
