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

Commit

Permalink
Merge branch 'develop' into ticket/15552
Browse files Browse the repository at this point in the history
  • Loading branch information
ppurka committed Feb 23, 2014
2 parents f66afcc + 6452f9d commit 026336a
Show file tree
Hide file tree
Showing 538 changed files with 18,837 additions and 10,860 deletions.
15 changes: 4 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ all: start doc # indirectly depends on build
logs:
mkdir -p $@

build: logs
cd build && \
build: logs configure
+cd build && \
"../$(PIPE)" \
"env SAGE_PARALLEL_SPKG_BUILD='$(SAGE_PARALLEL_SPKG_BUILD)' ./install all 2>&1" \
"tee -a ../logs/install.log"
Expand Down Expand Up @@ -152,16 +152,9 @@ ptestoptional: ptestall # just an alias

ptestoptionallong: ptestalllong # just an alias

bootstrap:
$(MAKE) configure || \
bash -c 'source src/bin/sage-env; sage-download-file $$SAGE_UPSTREAM/configure/configure-`cat build/pkgs/configure/package-version.txt`.tar.gz | tar zxmf -'

configure: configure.ac src/bin/sage-version.sh \
m4/ax_c_check_flag.m4 m4/ax_gcc_option.m4 m4/ax_gcc_version.m4 m4/ax_gxx_option.m4 m4/ax_gxx_version.m4 m4/ax_prog_perl_version.m4
test -d config || mkdir config
aclocal -I m4
automake --add-missing --copy build/Makefile-auto
autoconf
./bootstrap -d

install:
echo "Experimental use only!"
Expand All @@ -182,7 +175,7 @@ install:
"$(DESTDIR)"/bin/sage -c # Run sage-location


.PHONY: all build build-serial start install micro_release bootstrap \
.PHONY: all build build-serial start install micro_release \
doc doc-html doc-html-jsmath doc-html-mathjax doc-pdf \
doc-clean clean lib-clean bdist-clean distclean bootstrap-clean maintainer-clean \
test check testoptional testall testlong testoptionallong testallong \
Expand Down
23 changes: 17 additions & 6 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,23 @@ Installation Guide:
"Precise"), you need the dpkg-dev package.

OS X: Xcode. Make sure you have installed the most recent version
of Xcode. For pre-Lion versions of OS X, you can download Xcode
from http://developer.apple.com/downloads/. For OS X Lion, you can
install it using the App Store. With Xcode 4.3 or later, you need
to install the "Command Line Tools": from the File menu, choose
"Preferences", then the "Downloads" tab, and then "Install" the
Command Line Tools.
of Xcode. With recent versions of OS X (OS X Lion or later), you
can install Xcode for free from the App Store. For pre-Lion
versions of OS X, you can download Xcode from
http://developer.apple.com/downloads/.

With OS X, you also need to install the "command line tools". When
using OS X Mavericks, after installing Xcode, run this command from
a terminal window:

xcode-select --install

Then click "Install" in the pop-up window.

When using OS X Mountain Lion or earlier, you need to install the
command line tools from Xcode: run Xcode; then from the File
menu, choose "Preferences", then the "Downloads" tab, and then
"Install" the Command Line Tools.

Other platforms: See detailed instructions below.

Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Sage version 6.1.beta5, released 2014-01-15
Sage version 6.2.beta2, released 2014-02-15
110 changes: 82 additions & 28 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
# build/pkgs/configure/package-version.txt
#
# If optional argument -i is given, then automatically increment the
# version number
# version number.
#
# If optional argument -d is given and bootstrapping failed, instead
# extract the files from a local configure tarball, downloading it if
# needed. If -D is given, don't try to bootstrap and always extract or
# donwload.
########################################################################

set -e

# Either run this script from SAGE_ROOT or make sure that SAGE_ROOT
# is set
test -z "$SAGE_ROOT" || cd "$SAGE_ROOT"
Expand All @@ -23,17 +26,58 @@ MAKE="${MAKE:-make}"
CONFVERSION=`cat $PKG/package-version.txt`

bootstrap () {
# Start cleanly
$MAKE bootstrap-clean
aclocal -I m4 && \
automake --add-missing --copy build/Makefile-auto && \
autoconf

st=$?
case $st in
0) true;; # Success

63|127) # Autotools not installed or version too old
if [ $DOWNLOAD = yes ]; then
echo >&2 "Bootstrap failed, downloading required files instead."
bootstrap-download || exit $?
else
if [ $st -eq 127 ]; then
verb="install"
else
verb="upgrade"
fi
echo >&2 "Bootstrap failed. Either $verb autotools or run bootstrap with"
echo >&2 "the -d option to download the auto-generated files instead."
exit $st
fi;;

# Generate auto-generated files
$MAKE configure
*) exit $st;; # Failure
esac
}

# Bootstrap by downloading the auto-generated files
bootstrap-download () {
source src/bin/sage-env

mkdir upstream 2>/dev/null
if [ ! -f $CONFBALL ]; then
sage-download-file $SAGE_UPSTREAM/configure/configure-$CONFVERSION.tar.gz >$CONFBALL
if [ $? -ne 0 ]; then
rm -f "$CONFBALL"
echo >&2 "Error: downloading configure-$CONFVERSION.tar.gz failed"
exit 1
fi
fi

# The "m" option to tar ensures that timestamps are set to the
# current time, not taken from the tarball.
# We need these files to be more recent than the input files
# like configure.ac, otherwise "make" gets confused.
tar xzmf $CONFBALL || exit $?
}

save () {
set -e

# Create configure tarball
CONFBALL="upstream/configure-$CONFVERSION.tar.gz"
echo "Creating $CONFBALL..."
mkdir -p upstream
tar zcf "$CONFBALL" configure config/* build/Makefile-auto.in
Expand All @@ -42,38 +86,48 @@ save () {
echo "$CONFVERSION" >$PKG/package-version.txt

# Compute checksum
src/bin/sage-fix-pkg-checksums "$CONFBALL"
SAGE_ROOT=. src/bin/sage-fix-pkg-checksums "$CONFBALL"
}


usage () {
echo >&2 "Usage: bootstrap [-i] [-s] [-h]"
echo >&2 "Usage: $0 [-d|-D|-s] [-i] [-h]"
}


# Parse options
SAVE=
while getopts "sih" OPTION
SAVE=no
DOWNLOAD=no
ALWAYSDOWNLOAD=no
while getopts "Ddsih" OPTION
do
case "$OPTION" in
s)
SAVE=yes
;;
i)
CONFVERSION=$(( CONFVERSION + 1 ))
;;
h)
usage
exit
;;
?)
usage
exit 2
;;
D) ALWAYSDOWNLOAD=yes; DOWNLOAD=yes;;
d) DOWNLOAD=yes;;
s) SAVE=yes;;
i) CONFVERSION=$(( CONFVERSION + 1 ));;
h) usage; exit 0;;
?) usage; exit 2;;
esac
done
CONFBALL="upstream/configure-$CONFVERSION.tar.gz"

if [ $DOWNLOAD$SAVE = yesyes ]; then
echo >&2 "$0: refusing to download and save."
usage
exit 2
fi

# Start cleanly (it's not a problem if this fails)
$MAKE bootstrap-clean 2>/dev/null
mkdir config 2>/dev/null

if [ $ALWAYSDOWNLOAD = yes ]; then
bootstrap-download || exit $?
else
bootstrap
fi

bootstrap
if [ -n "$SAVE" ]; then
if [ $SAVE = yes ]; then
save
fi
29 changes: 21 additions & 8 deletions build/deps
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,16 @@ SAGERUNTIME = $(SCRIPTS) $(INST)/sage $(INST)/$(SAGENB) $(INST)/$(IPYTHON)
###############################################################################
base: $(INST)/prereq $(INST)/$(BZIP2) $(INST)/$(PATCH)

$(INST)/prereq: prereq.sh
$(PIPE) "./prereq.sh 2>&1" "tee -a $(SAGE_LOGS)/prereq.log"
$(INST)/prereq: ../configure
@cd ..; rm -f config.log; ln -s logs/pkgs/config.log config.log; \
./configure $$PREREQ_OPTIONS || ( \
if [ "x$$SAGE_PORT" = x ]; then \
echo "If you would like to try to build Sage anyway (to help porting),"; \
echo "export the variable 'SAGE_PORT' to something non-empty."; \
exit 1; \
else \
echo "Since 'SAGE_PORT' is set, we will try to build anyway."; \
fi; )
touch $@

$(INST)/$(BZIP2): $(INST)/prereq
Expand Down Expand Up @@ -216,9 +224,16 @@ $(INST)/$(NTL): $(INST)/$(MPIR) $(INST)/$(GF2X)
$(INST)/$(FPLLL): $(INST)/$(MPIR) $(INST)/$(MPFR)
+$(PIPE) "$(SAGE_SPKG) $(FPLLL) 2>&1" "tee -a $(SAGE_LOGS)/$(FPLLL).log"

$(INST)/$(PARI): $(INST)/$(READLINE) $(INST)/$(MPIR)
$(INST)/$(PARI): $(INST)/$(READLINE) $(INST)/$(MPIR) \
$(INST)/$(PARI_GALDATA) $(INST)/$(PARI_SEADATA_SMALL)
+$(PIPE) "$(SAGE_SPKG) $(PARI) 2>&1" "tee -a $(SAGE_LOGS)/$(PARI).log"

$(INST)/$(PARI_GALDATA):
+$(PIPE) "$(SAGE_SPKG) $(PARI_GALDATA) 2>&1" "tee -a $(SAGE_LOGS)/$(PARI_GALDATA).log"

$(INST)/$(PARI_SEADATA_SMALL):
+$(PIPE) "$(SAGE_SPKG) $(PARI_SEADATA_SMALL) 2>&1" "tee -a $(SAGE_LOGS)/$(PARI_SEADATA_SMALL).log"

$(INST)/$(POLYBORI): $(INST)/$(PYTHON) $(INST)/$(IPYTHON) \
$(INST)/$(SCONS) $(INST)/$(BOOST_CROPPED) \
$(INST)/$(M4RI) $(INST)/$(GD)
Expand Down Expand Up @@ -257,9 +272,6 @@ $(INST)/$(LINBOX): $(INST)/$(MPIR) $(INST)/$(NTL) $(INST)/$(GIVARO) \
$(INST)/$(IML): $(INST)/$(MPIR) $(INST)/$(GSL) $(INST)/$(ATLAS)
+$(PIPE) "$(SAGE_SPKG) $(IML) 2>&1" "tee -a $(SAGE_LOGS)/$(IML).log"

$(INST)/$(ECLIB): $(INST)/$(MPIR) $(INST)/$(PARI) $(INST)/$(NTL)
+$(PIPE) "$(SAGE_SPKG) $(ECLIB) 2>&1" "tee -a $(SAGE_LOGS)/$(ECLIB).log"

$(INST)/$(GENUS2REDUCTION): $(INST)/$(PARI)
+$(PIPE) "$(SAGE_SPKG) $(GENUS2REDUCTION) 2>&1" "tee -a $(SAGE_LOGS)/$(GENUS2REDUCTION).log"

Expand Down Expand Up @@ -387,6 +399,9 @@ $(INST)/$(FLINTQS): $(INST)/$(MPIR)
$(INST)/$(FLINT): $(INST)/$(MPIR) $(INST)/$(MPFR) $(INST)/$(NTL)
+$(PIPE) "$(SAGE_SPKG) $(FLINT) 2>&1" "tee -a $(SAGE_LOGS)/$(FLINT).log"

$(INST)/$(ECLIB): $(INST)/$(PARI) $(INST)/$(NTL) $(INST)/$(FLINT)
+$(PIPE) "$(SAGE_SPKG) $(ECLIB) 2>&1" "tee -a $(SAGE_LOGS)/$(ECLIB).log"

$(INST)/$(M4RI): $(INST)/$(LIBPNG)
+$(PIPE) "$(SAGE_SPKG) $(M4RI) 2>&1" "tee -a $(SAGE_LOGS)/$(M4RI).log"

Expand Down Expand Up @@ -468,8 +483,6 @@ $(INST)/csage: $(INST)/$(SCONS) \
$(INST)/$(MPIR) \
$(INST)/$(NTL) \
$(INST)/$(PARI) \
$(INST)/$(POLYBORI) \
$(INST)/$(PYNAC) \
$(INST)/$(PYTHON)
if [ -z "$$SAGE_INSTALL_FETCH_ONLY" ]; then \
cd $(SAGE_SRC) && source bin/sage-env && cd c_lib && \
Expand Down

0 comments on commit 026336a

Please sign in to comment.