Index: kitcreator ================================================================== --- kitcreator +++ kitcreator @@ -159,10 +159,37 @@ break fi done export TCLSH_NATIVE + +# Verify that each component is happy with the environment +validatefailed="0" +for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} kitsh; do + failed='0' + if [ -f "${pkg}/.success" ]; then + continue + fi + + if [ -x "${pkg}/validate.sh" ]; then + ( + cd "${pkg}" >/dev/null 2>/dev/null || exit 1 + + ./validate.sh 3>&1 4>&2 > build.log 2>&1 || exit 1 + ) || failed="1" + + if [ "${failed}" = '1' ]; then + echo "Failed pre-requisite check for ${pkg}" >&2 + + validatefailed='1' + fi + fi +done + +if [ "${validatefailed}" = '1' ]; then + exit 1 +fi # Do build failedpkgs="" buildfailed="0" for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} kitsh; do ADDED tcl/validate.sh Index: tcl/validate.sh ================================================================== --- /dev/null +++ tcl/validate.sh @@ -0,0 +1,10 @@ +#! /usr/bin/env bash + +if [ ! -x "$(which patch 2>/dev/null)" ]; then + echo "No \"patch\" command." + echo "No \"patch\" command." >&4 + + exit 1 +fi + +exit 0