>From 98a50856d90ffaba812de4b538939ed2dccdfeed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Thu, 23 Oct 2014 13:59:08 +0100 Subject: [PATCH] bootstrap: print more diagnostics for missing programs * build-aux/bootstrap: only suppress stderr when checking for alternative program names. This supports programs issuing non standard error messages like: "Provide an AUTOMAKE_VERSION environment variable, please" Reported by Ingo Schwarze with OpenBSD --- ChangeLog | 7 +++++++ build-aux/bootstrap | 12 +++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b98a79..b03b571 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2014-10-23 Pádraig Brady + bootstrap: print more diagnostics for missing programs + * build-aux/bootstrap: only suppress stderr when checking for + alternative program names. This supports programs issuing non + standard error messages. + +2014-10-23 Pádraig Brady + bootstrap: only update the gnulib submodule * build-aux/bootstrap: Restrict the "submodule update" command to the gnulib path. diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 5dbd1b1..eec77be 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -210,7 +210,13 @@ bootstrap_sync=false use_git=true check_exists() { - ($1 --version /dev/null 2>&1 + if test "$1" = "--verbose"; then + ($2 --version /dev/null 2>&1 || + ($2 --version /dev/null 2>&1 + fi + test $? -lt 126 } @@ -408,7 +414,7 @@ sort_ver() { # sort -V is not generally available get_version() { app=$1 - $app --version >/dev/null 2>&1 || return 1 + $app --version >/dev/null 2>&1 || { $app --version; return 1; } $app --version 2>&1 | sed -n '# Move version to start of line. @@ -467,7 +473,7 @@ check_versions() { if [ "$req_ver" = "-" ]; then # Merely require app to exist; not all prereq apps are well-behaved # so we have to rely on $? rather than get_version. - if ! check_exists $app; then + if ! check_exists --verbose $app; then warn_ "Error: '$app' not found" ret=1 fi -- 1.7.7.6