diff --git a/config/functions b/config/functions index 9dca01adf5..1f5b4bdbcd 100644 --- a/config/functions +++ b/config/functions @@ -456,19 +456,6 @@ init_package_cache() { fi } -check_path() { - local dashes="===========================" path_err_msg - if [ "${PWD##/usr}" != "${PWD}" ]; then - path_err_msg="\n $dashes$dashes$dashes" - path_err_msg="${path_err_msg}\n ERROR: Detected building inside /usr" - path_err_msg="${path_err_msg}\n $dashes$dashes$dashes" - path_err_msg="${path_err_msg}\n This is not supported with our buildsystem." - path_err_msg="${path_err_msg}\n Please use another dir (for example your \$HOME) to build ${DISTRONAME}" - - die "${path_err_msg}" - fi -} - load_build_config() { if [ -d "${1}" -a -f ${1}/.build.conf ]; then source ${1}/.build.conf @@ -486,6 +473,19 @@ save_build_config() { done } +check_path() { + local dashes="===========================" path_err_msg + if [ "${PWD##/usr}" != "${PWD}" ]; then + path_err_msg="\n $dashes$dashes$dashes" + path_err_msg="${path_err_msg}\n ERROR: Detected building inside /usr" + path_err_msg="${path_err_msg}\n $dashes$dashes$dashes" + path_err_msg="${path_err_msg}\n This is not supported with our buildsystem." + path_err_msg="${path_err_msg}\n Please use another dir (for example your \$HOME) to build ${DISTRONAME}" + + die "${path_err_msg}" + fi +} + check_distro() { local dashes="===========================" distro_err_msg if [ -z "${DISTRO}" -o ! -d "${DISTRO_DIR}/${DISTRO}" ]; then @@ -557,6 +557,7 @@ check_arch() { } check_config() { + check_path check_distro check_project check_device diff --git a/config/options b/config/options index e6d8d2867c..79580973b1 100644 --- a/config/options +++ b/config/options @@ -95,7 +95,6 @@ fi [ -z "${_DEBUG_DEPENDS_LIST+x}" ] && set_debug_depends -check_path check_config . config/graphic