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/13274
Browse files Browse the repository at this point in the history
  • Loading branch information
rwst committed Feb 20, 2014
2 parents cf8b120 + 6452f9d commit 6c85a8f
Show file tree
Hide file tree
Showing 926 changed files with 67,789 additions and 30,298 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@
/logs
/upstream

#############################
# Autotools generated files #
#############################
/aclocal.m4
/autom4te.cache/
/config/
/config.log
/config.status
/configure
/build/Makefile-auto
/build/Makefile-auto.in

###################
# Temporary Files #
###################
Expand Down
25 changes: 20 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@

PIPE = build/pipestatus


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 @@ -82,13 +83,24 @@ bdist-clean: clean
rm -rf logs
rm -rf dist
rm -rf tmp
rm -f build/Makefile
rm -f aclocal.m4 config.log config.status confcache
rm -rf autom4te.cache
rm -f build/Makefile build/Makefile-auto
rm -f .BUILDSTART

distclean: clean doc-clean lib-clean bdist-clean
@echo "Deleting all remaining output from build system ..."
rm -rf local

# Delete all auto-generated files which are distributed as part of the
# source tarball
bootstrap-clean:
rm -rf config configure build/Makefile-auto.in

# Remove absolutely everything which isn't part of the git repo
maintainer-clean: distclean bootstrap-clean
rm -rf upstream

micro_release: bdist-clean lib-clean
@echo "Stripping binaries ..."
LC_ALL=C find local/lib local/bin -type f -exec strip '{}' ';' 2>&1 | grep -v "File format not recognized" | grep -v "File truncated" || true
Expand Down Expand Up @@ -140,6 +152,9 @@ ptestoptional: ptestall # just an alias

ptestoptionallong: ptestalllong # just an alias

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
./bootstrap -d

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


.PHONY: all build build-serial start install \
.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 micro_release \
doc-clean clean lib-clean bdist-clean distclean bootstrap-clean maintainer-clean \
test check testoptional testall testlong testoptionallong testallong \
ptest ptestoptional ptestall ptestlong ptestoptionallong ptestallong
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.0, released 2013-12-17
Sage version 6.2.beta2, released 2014-02-15
133 changes: 133 additions & 0 deletions bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
#!/usr/bin/env bash

########################################################################
# Regenerate auto-generated files (e.g. configure)
#
# If the -s option is given, save the autogenerated scripts in
# $SAGE_ROOT/upstream/configure-$CONFVERSION.tar.gz where CONFVERSION
# is the version number stored in
# build/pkgs/configure/package-version.txt
#
# If optional argument -i is given, then automatically increment the
# 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.
########################################################################

# Either run this script from SAGE_ROOT or make sure that SAGE_ROOT
# is set
test -z "$SAGE_ROOT" || cd "$SAGE_ROOT"

PKG=build/pkgs/configure
MAKE="${MAKE:-make}"
CONFVERSION=`cat $PKG/package-version.txt`

bootstrap () {
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;;

*) 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
echo "Creating $CONFBALL..."
mkdir -p upstream
tar zcf "$CONFBALL" configure config/* build/Makefile-auto.in

# Update version number
echo "$CONFVERSION" >$PKG/package-version.txt

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


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


# Parse options
SAVE=no
DOWNLOAD=no
ALWAYSDOWNLOAD=no
while getopts "Ddsih" OPTION
do
case "$OPTION" in
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

if [ $SAVE = yes ]; then
save
fi
2 changes: 2 additions & 0 deletions build/Makefile-auto.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Currently, this file is unused. However, it needs to exist to coerce
# automake into thinking that this is an Automake project.
Loading

0 comments on commit 6c85a8f

Please sign in to comment.