diff options
-rwxr-xr-x | build.sh | 14 | ||||
-rw-r--r-- | subr/pkg_000000.subr | 1 | ||||
-rw-r--r-- | vars/build.vars | 2 |
3 files changed, 9 insertions, 8 deletions
@@ -62,14 +62,14 @@ for BUILD_TARGET_LC in $(subst_tgts invariants ${BUILD_TARGETS_META:-world}); do else unset BUILD_SCRIPT_RC; fi; - (set -o errexit -o noglob; pkg_000000; + (set -o errexit -o noglob; if [ -n "${BUILD_PACKAGES_RESTART}" ]\ || ! is_build_script_done "${PKG_NAME}" finish; then - build_fileop cd "${WORKDIR}"; + PKG_BUILD_STEPS="$(get_var_unsafe PKG_$(echo ${PKG_NAME} | tr a-z A-Z)_BUILD_STEPS)"; set -- ${PKG_BUILD_STEPS:-${BUILD_STEPS}}; while [ ${#} -gt 0 ]; do _pkg_step_cmds=""; - case ${1#*:} in + case "${1#*:}" in abstract) _pkg_step_cmds="pkg_${PKG_NAME}_${1%:*}"; ;; always) _pkg_step_cmds="pkg_${1%:*}"; ;; main) if [ -n "${BUILD_PACKAGES_RESTART}" ]; then @@ -86,10 +86,10 @@ for BUILD_TARGET_LC in $(subst_tgts invariants ${BUILD_TARGETS_META:-world}); do fi; ;; esac; for __ in ${_pkg_step_cmds}; do - if test_cmd ${__}; then - ${__}; - set_build_script_done "${PKG_NAME}" "${1%:*}" ${2:+-${2%:*}}; - break; + if test_cmd "${__}"; then + "${__}"; + set_build_script_done "${PKG_NAME}" "${1%:*}" \ + ${2:+-${2%:*}}; break; fi; done; shift; done; diff --git a/subr/pkg_000000.subr b/subr/pkg_000000.subr index f531eca4..17a48fc1 100644 --- a/subr/pkg_000000.subr +++ b/subr/pkg_000000.subr @@ -34,6 +34,7 @@ pkg_000000() { if [ -n "${_log_env_vars}" ]; then log_env_vars "build" ${_log_env_vars}; fi; + build_fileop cd "${WORKDIR}"; }; # vim:filetype=sh diff --git a/vars/build.vars b/vars/build.vars index ab8a7d78..bf3a7db3 100644 --- a/vars/build.vars +++ b/vars/build.vars @@ -40,7 +40,7 @@ fi; : ${BUILD_LOG_FNAME:=${PREFIX}/build.log}; : ${BUILD_LOG_LAST_FNAME:=${PREFIX}/build.log.last}; : ${BUILD_STATUS_IN_PROGRESS_FNAME:=${PREFIX}/BUILD_IN_PROGRESS}; -: ${BUILD_STEPS:="all:abstract disabled:always fetch:main extract:main build_dir:always patch_pre:main autoconf:main patch:main setup_env:always distclean:optional configure:main clean:optional build:main install:main finish:always"}; +: ${BUILD_STEPS:="000000:always all:abstract disabled:always fetch:main extract:main build_dir:always patch_pre:main autoconf:main patch:main setup_env:always distclean:optional configure:main clean:optional build:main install:main finish:always"}; : ${CHECK_PREREQ_CMDS:="aclocal autoconf autopoint awk basename bunzip2 find flex gcc git groff gunzip install ld libtool lzma make makeinfo msgfmt nl nroff openssl paste patch python sed sha256sum sort tar tee tic tr uname wget xz"}; : ${CHECK_PREREQ_FILES:="/usr/include/gmpxx.h /usr/include/mpc.h /usr/include/mpfr.h"}; : ${CHECK_PREREQ_FILES_DYNAMIC:='/usr/share/groff/$(groff -v 2>/dev/null | awk '\''/^GNU groff version /{print $NF}'\'')/tmac/e.tmac'}; |