From 0e77878de63c8b116d6cf04ce2a6c5ed5f91a509 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Oct 2020 12:34:35 -0700 Subject: [PATCH] t-30624 improve configure recommendation message --- build/bin/sage-print-system-package-command | 9 +++++--- m4/sage_spkg_collect.m4 | 23 ++++++++++++++++----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index 872c0c4ae1d..c3c41883c88 100755 --- a/build/bin/sage-print-system-package-command +++ b/build/bin/sage-print-system-package-command @@ -52,11 +52,14 @@ options= shopt -s extglob case $system:$command in homebrew*:setup-build-env) - $IF_VERBOSE echo "${COMMENT}To automatically take care of homebrew messages regarding " - $IF_VERBOSE echo "${COMMENT}keg-only packages for the current shell session:" + $IF_VERBOSE echo "${COMMENT}" + $IF_VERBOSE echo "${COMMENT}Homebrew can issue suggestions regarding keg-only packages." + $IF_VERBOSE echo "${COMMENT}The following command is to automatically apply these suggestions." + $IF_VERBOSE echo "${COMMENT}Run it once to apply the suggestions for the current session." + $IF_VERBOSE echo "${COMMENT}Add it to your shell profile to apply them for all future sessions." + $IF_VERBOSE echo "${COMMENT}" [ -n "$SAGE_ROOT" ] || SAGE_ROOT=. echo "${PROMPT}source $SAGE_ROOT/.homebrew-build-env" - $IF_VERBOSE echo "${COMMENT}Add this to your shell profile if you want it to persist between shell sessions." ;; *:setup-build-env) # Nothing needed diff --git a/m4/sage_spkg_collect.m4 b/m4/sage_spkg_collect.m4 index 7cba7252c45..170b8fa4fd2 100644 --- a/m4/sage_spkg_collect.m4 +++ b/m4/sage_spkg_collect.m4 @@ -325,7 +325,12 @@ AC_SUBST([SAGE_SDIST_PACKAGES]) AC_DEFUN([SAGE_SYSTEM_PACKAGE_NOTICE], [ AS_IF([test -n "$SAGE_NEED_SYSTEM_PACKAGES"], [ - AC_MSG_NOTICE([notice: the following SPKGs did not find equivalent system packages:$SAGE_NEED_SYSTEM_PACKAGES]) + AC_MSG_NOTICE([ + + notice: the following SPKGs did not find equivalent system packages: + + $SAGE_NEED_SYSTEM_PACKAGES + ]) AC_MSG_CHECKING([for the package system in use]) SYSTEM=$(build/bin/sage-guess-package-system 2>& AS_MESSAGE_FD) AC_MSG_RESULT([$SYSTEM]) @@ -334,10 +339,18 @@ AC_DEFUN([SAGE_SYSTEM_PACKAGE_NOTICE], [ AS_IF([test -n "$SYSTEM_PACKAGES"], [ PRINT_SYS="build/bin/sage-print-system-package-command $SYSTEM --verbose --prompt --sudo" COMMAND=$($PRINT_SYS update && $PRINT_SYS install $SYSTEM_PACKAGES && SAGE_ROOT=$SAGE_ROOT $PRINT_SYS setup-build-env ) - AC_MSG_NOTICE([hint: installing the following system packages is recommended and may avoid building some of the above SPKGs from source:]) - AC_MSG_NOTICE([$COMMAND]) - AC_MSG_NOTICE([After installation, re-run configure using:]) - AC_MSG_NOTICE([ \$ ./config.status --recheck && ./config.status]) + AC_MSG_NOTICE([ + + hint: installing the following system packages, if not + already present, is recommended and may avoid having to + build them (though some may have to be built anyway): + + $COMMAND + + After installation, re-run configure using: + + \$ ./config.status --recheck && ./config.status + ]) ], [ AC_MSG_NOTICE([No equivalent system packages for $SYSTEM are known to Sage]) ])