summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh2
-rw-r--r--etc/build.usage7
-rw-r--r--subr/ex_rtl_log.subr10
-rw-r--r--subr/ex_setup_args.subr8
4 files changed, 22 insertions, 5 deletions
diff --git a/build.sh b/build.sh
index a834a929..bfd435d6 100755
--- a/build.sh
+++ b/build.sh
@@ -26,7 +26,7 @@ for BUILD_TARGET_META in invariants ${BUILD_TARGETS_META:-world}; do
*) ex_log_msg fail "Build failed in \`${PKG_NAME}', check \`${WORKDIR}/${PKG_NAME}_std{err,out}.log' for details.";
: $((BUILD_NFAIL+=1));
if [ ${ARG_RELAXED:-0} -eq 1 ]; then
- BUILD_PKGS_FAILED="${BUILD_PKGS_FAILED:+${BUILD_PKGS_FAILED} }${PKG_NAME}";
+ BUILD_PKGS_FAILED="${BUILD_PKGS_FAILED:+${BUILD_PKGS_FAILED} }${PKG_NAME}";
continue;
else
break;
diff --git a/etc/build.usage b/etc/build.usage
index 165f957b..277024ca 100644
--- a/etc/build.usage
+++ b/etc/build.usage
@@ -1,5 +1,5 @@
usage: ./build.sh [-x] [-4|6] [-a nt32|nt64] [-b debug|release] [-c] [-h]
- [-i] [-N] [-r package[,...][:step]] [-R] [-t[.gz|.bz2|.xz] [-v]
+ [-i] [-N] [-r package[,...][:step]] [-R] [-t[.gz|.bz2|.xz] [-v[v[v]]]
[<target>[ ...]]
-x Set the xtrace sh(1)ell option for debugging purposes.
-4|-6 Force IPv[46] when downloading files.
@@ -17,14 +17,15 @@ usage: ./build.sh [-x] [-4|6] [-a nt32|nt64] [-b debug|release] [-c] [-h]
configure, build_clean, build, install_subdirs, install_make,
install_files, install_libs, install_pkgconfig, install_purge_la,
install_strip, and install.
- -R Ignore build failures and continue building (relaxed mode.)
+ -R Ignore build failures, skip printing package logs, and continue
+ building (relaxed mode.)
-t[.gz|.bz2|.xz] Produce binary distribution and source tarballs containing
${PREFIX} sans ${WORKDIR} and ${PREFIX}/src/midipix_build
and ${WORKDIR} sans top-level regular files at the end of
a build with zero failures. The tarballs will be compressed
with either gzip, bzip2, or xz and signed with GPG; the
default compression is xz.
- -v Be verbose.
+ -v[v[v]] Be verbose; -vv: always print package logs; -vvv: logs fileops.
--debug-minipix Don't strip(1) minipix binaries to facilitate debugging minipix.
<target>[ ...] One of:
host_toolchain, native_toolchain, runtime, host_packages,
diff --git a/subr/ex_rtl_log.subr b/subr/ex_rtl_log.subr
index f4e250a5..31d5cead 100644
--- a/subr/ex_rtl_log.subr
+++ b/subr/ex_rtl_log.subr
@@ -22,15 +22,23 @@ ex_log_env_vars() {
ex_log_msg() {
local _lvl="${1}"; shift;
- if [ "${_lvl#v}" != "${_lvl}" ]\
+ if [ "${_lvl}" = vnfo ]\
&& [ ${ARG_VERBOSE:-0} -eq 0 ]; then
return;
+ elif [ "${_lvl}" = vvfo ]\
+ && [ ${ARG_VERBOSE1:-0} -eq 0 ]; then
+ return;
+ elif [ "${_lvl}" = vvvo ]\
+ && [ ${ARG_VERBOSE2:-0} -eq 0 ]; then
+ return;
fi;
case "${_lvl}" in
failexit) printf "\033[0m\033[${LOG_MSG_FAIL_COLOUR}m"; ;;
fail) printf "\033[0m\033[${LOG_MSG_FAIL_COLOUR}m"; ;;
info) printf "\033[0m\033[${LOG_MSG_INFO_COLOUR}m"; ;;
vnfo) printf "\033[0m\033[${LOG_MSG_INFO_COLOUR}m"; ;;
+ vvfo) printf "\033[0m\033[${LOG_MSG_INFO_COLOUR}m"; ;;
+ vvvo) printf "\033[0m\033[${LOG_MSG_INFO_COLOUR}m"; ;;
succ) printf "\033[0m\033[${LOG_MSG_SUCC_COLOUR}m"; ;;
warn) printf "\033[0m\033[${LOG_MSG_WARN_COLOUR}m"; ;;
varn) printf "\033[0m\033[${LOG_MSG_WARN_COLOUR}m"; ;;
diff --git a/subr/ex_setup_args.subr b/subr/ex_setup_args.subr
index 637a7d38..fed20d69 100644
--- a/subr/ex_setup_args.subr
+++ b/subr/ex_setup_args.subr
@@ -14,6 +14,8 @@ BUILD_ARGS_SPEC="
ARG_TARBALL:selfarg:-t.gz
ARG_TARBALL:selfarg:-t.xz
ARG_VERBOSE:-v
+ ARG_VERBOSE2:-vv
+ ARG_VERBOSE3:-vvv
ARG_XTRACE:-x";
ex_setup_args() {
@@ -51,6 +53,12 @@ ex_setup_args() {
if [ "${ARG_XTRACE:-0}" -eq 1 ]; then
set -o xtrace;
fi;
+ if [ "${ARG_VERBOSE3:-0}" -eq 1 ]; then
+ ARG_VERBOSE2=1;
+ fi;
+ if [ "${ARG_VERBOSE2:-0}" -eq 1 ]; then
+ ARG_VERBOSE=1;
+ fi;
if [ -n "${ARG_RESTART}" ]; then
if [ "${ARG_RESTART%:*}" != "${ARG_RESTART}" ]; then
ARG_RESTART_AT="${ARG_RESTART#*:}"; ARG_RESTART="${ARG_RESTART%:*}";