Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,14 @@ SAGE_SPKG_FINALIZE([$pkgname], [$pkgtype], [$SPKG_SOURCE], [$SPKG_TREE_VAR])"
echo 'changequote(>>>`<<<, >>>'"'"'<<<)dnl' >> $a
done

for pkgname in $(sage-package list --has-file bootstrap); do
(cd build/pkgs/$pkgname && ./bootstrap) || exit 1
for pkgname in $(sage-package list --has-file bootstrap "$@"); do
(cd build/pkgs/$pkgname && if [ -x bootstrap ]; then ./bootstrap; else echo >&2 "bootstrap:$LINENO: Nothing to do for $pkgname"; fi) || exit 1
done

if [ $# != 0 ]; then
return
fi

# Default to no filter if "-q" was not passed.
QUIET_SED_FILTER=""
if [ "${BOOTSTRAP_QUIET}" = "yes" ]; then
Expand All @@ -126,7 +130,6 @@ SAGE_SPKG_FINALIZE([$pkgname], [$pkgtype], [$SPKG_SOURCE], [$SPKG_TREE_VAR])"
# stdout alone. Basically we swap the two descriptors using a
# third, filter, and then swap them back.
./bootstrap-conda && \
src/doc/bootstrap && \
aclocal -I m4 && \
automake --add-missing --copy build/make/Makefile-auto 3>&1 1>&2 2>&3 \
| sed "${QUIET_SED_FILTER}" 3>&1 1>&2 2>&3 && \
Expand Down Expand Up @@ -236,7 +239,7 @@ save () {


usage () {
echo >&2 "Usage: $0 [-d|-D|-s] [-u <URL>] [-h] [-q]"
echo >&2 "Usage: $0 [-d|-D|-s] [-u <URL>] [-h] [-q] [SPKG...]"
echo >&2 ""
echo >&2 "Options:"
echo >&2 " -d fall back to downloading (released versions only)"
Expand Down Expand Up @@ -269,6 +272,7 @@ do
?) usage; exit 2;;
esac
done
shift $(($OPTIND - 1))
export BOOTSTRAP_QUIET
CONFBALL="upstream/configure-$CONFVERSION.tar.gz"

Expand All @@ -278,14 +282,22 @@ if [ $DOWNLOAD$SAVE = yesyes ]; then
exit 2
fi

# Start cleanly (it's not a problem if this fails)
if [ $# != 0 -a $DOWNLOAD$ALWAYSDOWNLOAD$SAVE != nonono ]; then
echo >&2 "$0: Cannot combine -d, -D, -s, -u with SPKG arguments"
usage
exit 2
fi

# Start cleanly when a full bootstrap is happening (it's not a problem if this fails)
# POSIX supports two separate incompatible formats for the MAKEFLAGS
# variable, so instead of guessing, we simply define our own variable
# to optionally pass an "-s" (silent) flag to Make.
MAKE_SILENT=""
[ "${BOOTSTRAP_QUIET}" = "yes" ] && MAKE_SILENT="-s"
$MAKE ${MAKE_SILENT} bootstrap-clean 2>/dev/null
mkdir config 2>/dev/null
if [ $# = 0 ]; then
MAKE_SILENT=""
[ "${BOOTSTRAP_QUIET}" = "yes" ] && MAKE_SILENT="-s"
$MAKE ${MAKE_SILENT} bootstrap-clean 2>/dev/null
fi
mkdir -p config 2>/dev/null

if [ $ALWAYSDOWNLOAD = yes ]; then
if [ -n "$CONFTARBALL_URL" ]; then
Expand All @@ -302,7 +314,7 @@ if [ $ALWAYSDOWNLOAD = yes ]; then
bootstrap_download || exit $?
fi
else
bootstrap
bootstrap "$@"
fi

if [ $SAVE = yes ]; then
Expand Down
1 change: 1 addition & 0 deletions build/pkgs/sagemath_doc_html/bootstrap
1 change: 1 addition & 0 deletions build/pkgs/sagemath_doc_html/src