-
-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #29052: Create build/bin/sage-build-env-config and call it from …
…build/make/deps; add sage --buildsh This is part of #21707 - "Split `sage-env` into 5". We set up a new `configure`-generated, to-be-`source`d shell script `build/bin/sage-build-env-config` to which we move environment variable settings from `src/bin/sage-env[-config]` that are only needed for: 1. Sage-the-distribution while building spkgs, 2. Sage-the-distribution for building sagelib. The new script is used in addition to `src/bin/sage-env` in these two contexts. We add a command `sage --buildsh`, like `sage --sh` but using the larger environment. -------- Follow-up: - `build/make/install` contains more environment settings that should be reviewed for moving to `sage-build-env-config` URL: https://trac.sagemath.org/29052 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): Dima Pasechnik, Volker Braun
- Loading branch information
Showing
9 changed files
with
120 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,4 +95,5 @@ gitlab-build-docker.log | |
/src/build | ||
/src/Makefile | ||
/src/bin/sage-env-config | ||
/build/bin/sage-build-env-config | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# -*- shell-script -*- | ||
|
||
########################################################################### | ||
# | ||
# Set some environment variables for building Sage (the distribution). | ||
# | ||
# NOTES: | ||
# - You must *source* this script instead of executing. | ||
# - Use "return" instead of "exit" to signal a failure. Since this | ||
# file is sourced, an "exit" here will actually exit src/bin/sage, | ||
# which is probably not intended. | ||
# - All environment variables set here should be *exported*, otherwise | ||
# they won't be available in child programs. | ||
# | ||
# If you want to set all environment variables for your shell like | ||
# they are during the build of Sage packages, type | ||
# | ||
# sage --buildsh | ||
# | ||
########################################################################## | ||
|
||
# This is usually blank if the system GMP is used, or $SAGE_LOCAL otherwise | ||
export SAGE_GMP_PREFIX="@SAGE_GMP_PREFIX@" | ||
export SAGE_GMP_INCLUDE="@SAGE_GMP_INCLUDE@" | ||
if [ -n "$SAGE_GMP_PREFIX" ]; then | ||
# Many packages that depend on GMP accept a --with-gmp=<prefix> flag to | ||
# their ./configure scripts. When using the system's GMP this is not | ||
# generally necessary, but when using the GMP package installed in | ||
# SAGE_LOCAL it is useful to pass it. We define this variable to | ||
# pass to these packages' ./configure scripts. When using the system | ||
# GMP its value is just blank (for many of these packages passing | ||
# --with-gmp without an argument is actually a bug) | ||
export SAGE_CONFIGURE_GMP="--with-gmp=$SAGE_GMP_PREFIX" | ||
fi | ||
|
||
# The MPFR case is very close to the GMP case above | ||
# This is usually blank if the system MPFR is used, or $SAGE_LOCAL otherwise | ||
export SAGE_MPFR_PREFIX="@SAGE_MPFR_PREFIX@" | ||
if [ -n "$SAGE_MPFR_PREFIX" ]; then | ||
# Some packages that depend on MPFR accept a --with-mpfr=<prefix> flag to | ||
# their ./configure scripts. Thus we deal with this just as with GMP above. | ||
export SAGE_CONFIGURE_MPFR="--with-mpfr=$SAGE_MPFR_PREFIX" | ||
fi | ||
|
||
# The MPC case is very close to the MPFR case above | ||
# This is usually blank if the system MPC is used, or $SAGE_LOCAL otherwise | ||
export SAGE_MPC_PREFIX="@SAGE_MPC_PREFIX@" | ||
if [ -n "$SAGE_MPC_PREFIX" ]; then | ||
# Some packages that depend on MPC accept a --with-mpc=<prefix> flag to | ||
# their ./configure scripts. Thus we deal with this just as with GMP above. | ||
export SAGE_CONFIGURE_MPC="--with-mpc=$SAGE_MPC_PREFIX" | ||
fi | ||
|
||
# Location of system crti.o, in case we build our own gcc | ||
export SAGE_CRTI_DIR="@SAGE_CRTI_DIR@" | ||
|
||
# This is usually blank if the system NTL is used, or $SAGE_LOCAL otherwise | ||
export SAGE_NTL_PREFIX="@SAGE_NTL_PREFIX@" | ||
if [ -n "$SAGE_NTL_PREFIX" ]; then | ||
# Many packages that depend on NTL accept a --with-ntl=<prefix> flag to | ||
# their ./configure scripts. When using the system's NTL this is not | ||
# generally necessary, but when using the NTL package installed in | ||
# SAGE_LOCAL it is useful to pass it. | ||
export SAGE_CONFIGURE_NTL="--with-ntl=$SAGE_NTL_PREFIX" | ||
fi | ||
|
||
# The FLINT case is very close to the MPFR case above | ||
# This is usually blank if the system FLINT is used, or $SAGE_LOCAL otherwise | ||
export SAGE_FLINT_PREFIX="@SAGE_FLINT_PREFIX@" | ||
if [ -n "$SAGE_FLINT_PREFIX" ]; then | ||
# Some packages that depend on FLINT accept a --with-flint=<prefix> flag to | ||
# their ./configure scripts. Thus we deal with this just as with GMP above. | ||
export SAGE_CONFIGURE_FLINT="--with-flint=$SAGE_FLINT_PREFIX" | ||
fi | ||
|
||
# This is usually blank if the system PARI is used, or $SAGE_LOCAL otherwise | ||
export SAGE_PARI_PREFIX="@SAGE_PARI_PREFIX@" | ||
if [ -n "$SAGE_PARI_PREFIX" ]; then | ||
# Some packages that depend on PARI accept a --with-pari=<prefix> flag to | ||
# their ./configure scripts. Thus we deal with this just as with GMP above. | ||
export SAGE_CONFIGURE_PARI="--with-pari=$SAGE_PARI_PREFIX" | ||
fi | ||
export SAGE_PARI_CFG="@SAGE_PARI_CFG@" | ||
|
||
export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@" | ||
export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@" | ||
export SAGE_ARB_LIBRARY="@SAGE_ARB_LIBRARY@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters