--- trunk/mage/usr/lib/mage/smage2.sh 2011/12/28 10:44:37 1574 +++ trunk/mage/usr/lib/mage/smage2.sh 2011/12/28 10:49:37 1575 @@ -329,6 +329,13 @@ } # dummy function, used if that does not exist in smage file +src_check() +{ + echo "no src_check defined" + return 0 +} + +# dummy function, used if that does not exist in smage file src_compile() { echo "no src_compile defined" @@ -1444,6 +1451,7 @@ # fixes some issues with these functions export -f src_prepare || die "src_prepare export failed" export -f src_compile || die "src_compile export failed" +export -f src_check || die "src_check export failed" export -f src_install || die "src_install export failed" # fixes some compile issues @@ -1505,6 +1513,17 @@ die_pipestatus 0 "src_compile failed" step_by_step $_ +# only run checks if requested +if [[ ${MAGE_CHECK} != true ]] +then + echo "MAGE_CHECK not requested; src_check() will not be run!" | ${SMAGE_LOG_CMD} + step_by_step src_check +else + src_check | ${SMAGE_LOG_CMD} + die_pipestatus 0 "src_check failed" + step_by_step $_ +fi + # build several subpackages if [[ -n ${SPLIT_PACKAGES} ]] then