From cb9a055f42c023f527e4f97d1a3ec80a44729cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Mon, 11 May 2020 10:39:07 +0100 Subject: subr/build_init.subr:buildp_init_{args,getopts}(): call rtl_fileop_set_log() as soon as possible. subr/ex_pkg.subr:ex_pkg_load_vars(): log variable file names at `notice' level. subr/rtl_fileop.subr:rtl_fileop(): implements `source'. --- subr/ex_pkg.subr | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'subr/ex_pkg.subr') diff --git a/subr/ex_pkg.subr b/subr/ex_pkg.subr index 4b88622c..317bd725 100644 --- a/subr/ex_pkg.subr +++ b/subr/ex_pkg.subr @@ -105,7 +105,7 @@ ex_pkg_load_dump() { # Return: zero (0) on success, non-zero (>0) on failure, build variables post-return on success. # ex_pkg_load_vars() { - local _rc=0; _status=""; + local _rc=0 _fname=""; _status=""; if ! rtl_lmatch "${ARCH}" "nt32 nt64"; then _rc=1; _status="Error: invalid architecture \`${ARCH}'."; elif ! rtl_lmatch "${BUILD_KIND}" "debug release"; then @@ -114,9 +114,16 @@ ex_pkg_load_vars() { nt32) DEFAULT_TARGET="i686-nt32-midipix"; ;; nt64) DEFAULT_TARGET="x86_64-nt64-midipix"; ;; esac; - rtl_fileop source_opt \ - "${HOME}/midipix_build.vars" "${HOME}/.midipix_build.vars" \ - ../midipix_build.vars ./midipix.env; + for _fname in \ + "${HOME}/midipix_build.vars" \ + "${HOME}/.midipix_build.vars" \ + ../midipix_build.vars \ + ./midipix.env; do + if [ -r "${_fname}" ]; then + rtl_log_msg notice "Sourcing \`%s'." "${_fname}"; + rtl_fileop source "${_fname}"; + fi; + done; if [ -z "${PREFIX}" ]; then _rc=1; _status="Error: \${PREFIX} empty or unset."; fi; -- cgit v1.2.3