Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
t-30624 improve configure recommendation message
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Nov 27, 2020
1 parent 2016d4d commit 0e77878
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
9 changes: 6 additions & 3 deletions build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 18 additions & 5 deletions m4/sage_spkg_collect.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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])
])
Expand Down

0 comments on commit 0e77878

Please sign in to comment.