Index: Mk/Scripts/actual-package-depends.sh =================================================================== --- Mk/Scripts/actual-package-depends.sh +++ Mk/Scripts/actual-package-depends.sh @@ -2,6 +2,8 @@ # MAINTAINER: portmgr@FeeeBSD.org # $FreeBSD$ +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_ACTUAL_PACKAGE_DEPENDS}" ] && set -x + if [ -z "${PKG_BIN}" ]; then echo "PKG_BIN required in environment." >&2 exit 1 Index: Mk/Scripts/check-stagedir.sh =================================================================== --- Mk/Scripts/check-stagedir.sh +++ Mk/Scripts/check-stagedir.sh @@ -229,6 +229,8 @@ validate_env STAGEDIR PREFIX LOCALBASE WRKDIR WRKSRC MTREE_FILE \ TMPPLIST PLIST_SUB_SED SCRIPTSDIR PORT_OPTIONS NO_PREFIX_RMDIR +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CHECK_STAGEDIR}" ] && set -x + set -u if [ $makeplist = 0 ] ; then Index: Mk/Scripts/check_leftovers.sh =================================================================== --- Mk/Scripts/check_leftovers.sh +++ Mk/Scripts/check_leftovers.sh @@ -23,6 +23,8 @@ # The PLIST_SUB feature can be disabled by setting PLIST_SUB_SED= # in environment. +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CHECK_LEFTOVERS}" ] && set -x + origin="$1" [ $# -eq 1 ] || { echo "Must supply ORIGIN as parameter" >&2; exit 1; } [ -n "${PORTSDIR}" ] || { echo "PORTSDIR must be set" >&2; exit 1; } Index: Mk/Scripts/depends-list.sh =================================================================== --- Mk/Scripts/depends-list.sh +++ Mk/Scripts/depends-list.sh @@ -34,6 +34,8 @@ MAKE="${dp_MAKE}" export_ports_env >/dev/null fi +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DEPENDS_LIST}" ] && set -x + set -u check_dep() { Index: Mk/Scripts/dialog4ports.sh =================================================================== --- Mk/Scripts/dialog4ports.sh +++ Mk/Scripts/dialog4ports.sh @@ -3,6 +3,8 @@ # Maintainer: portmgr@FreeBSD.org set -e +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DIALOG4PORTS}" ] && set -x + if [ -z "${DIALOG4PORTS}" -o -z "${PORTSDIR}" -o -z "${MAKE}" ]; then echo "DIALOG4PORTS, MAKE and PORTSDIR required in environment." >&2 exit 1 Index: Mk/Scripts/do-depends.sh =================================================================== --- Mk/Scripts/do-depends.sh +++ Mk/Scripts/do-depends.sh @@ -13,6 +13,8 @@ dp_PKGNAME dp_STRICT_DEPENDS dp_LOCALBASE dp_LIB_DIRS dp_SH \ dp_SCRIPTSDIR PORTSDIR dp_MAKE +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DO_DEPENDS}" ] && set -x + set -u install_depends() Index: Mk/Scripts/do-users-groups.sh =================================================================== --- Mk/Scripts/do-users-groups.sh +++ Mk/Scripts/do-users-groups.sh @@ -12,6 +12,8 @@ dp_UG_DEINSTALL dp_UG_INSTALL dp_UID_FILES dp_UID_OFFSET \ dp_USERS_BLACKLIST +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DO_USERS_GROUPS}" ] && set -x + set -u USERS=$1 Index: Mk/Scripts/find-lib.sh =================================================================== --- Mk/Scripts/find-lib.sh +++ Mk/Scripts/find-lib.sh @@ -2,6 +2,8 @@ # MAINTAINER: portmgr@FreeBSD.org # $FreeBSD$ +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_FIND_LIB}" ] && set -x + if [ -z "${LIB_DIRS}" -o -z "${LOCALBASE}" ]; then echo "LIB_DIRS, LOCALBASE required in environment." >&2 exit 1 Index: Mk/Scripts/qa.sh =================================================================== --- Mk/Scripts/qa.sh +++ Mk/Scripts/qa.sh @@ -7,6 +7,8 @@ exit 1 fi +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_QA}" ] && set -x + LF=$(printf '\nX') LF=${LF%X} Index: Mk/Scripts/smart_makepatch.sh =================================================================== --- Mk/Scripts/smart_makepatch.sh +++ Mk/Scripts/smart_makepatch.sh @@ -25,6 +25,7 @@ # if those targets modify source files (e.g. with sed). You may also # want to disable EXTRA_PATCHES as well if that is being used. +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_SMART_MAKEPATCH}" ] && set -x if [ -z "${PATCHDIR}" -o -z "${PATCH_WRKSRC}" -o -z "${WRKDIR}" ]; then echo "WRKDIR, PATCHDIR, and PATCH_WRKSRC required in environment." >&2