#11959: build spkgs in parallel by default
---------------------------+------------------------------------------------
Reporter: jhpalmieri | Owner: GeorgSWeber
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-4.7.3
Component: build | Keywords: SAGE_PARALLEL_SPKG_BUILD MAKE -j
--jobs
Work_issues: | Upstream: N/A
Reviewer: | Author: John Palmieri
Merged: | Dependencies:
---------------------------+------------------------------------------------
Comment(by leif):
My alternate patch to `$SAGE_ROOT/spkg/install` has become a bit longer:
{{{
#!diff
diff --git a/spkg/install b/spkg/install
--- a/spkg/install
+++ b/spkg/install
@@ -430,12 +430,10 @@
# Skip the rest if nothing to do (i.e., to [re]build):
-# Note that we should use $MAKE here, but we currently don't use
-# it further below either unless SAGE_PARALLEL_SPKG_BUILD=yes, which
-# I consider a "bug". -- Leif Leonhardy
-# If "make" doesn't understand the -q option, it should exit with a
-# non-zero status which is not a problem.
-if make -q -f standard/deps $1; then
+# If "make" doesn't understand the -q option (although we require
+# GNU make, which supports it), it should exit with a non-zero status
+# which is not a problem.
+if ${MAKE:-make} -q -f standard/deps $1; then
echo "Nothing to (re)build / all up-to-date."
exit 0
fi
@@ -443,48 +441,57 @@
# Dump environment for debugging purposes:
echo "*** ALL ENVIRONMENT VARIABLES BEFORE BUILD: ***"
-env
+env | sort
echo "***********************************************"
###############################################################################
# NOW do the actual build:
###############################################################################
-if [ "$SAGE_PARALLEL_SPKG_BUILD" = "yes" ] && [ -n "$MAKE" ]; then
- time $MAKE -f standard/deps $1
-else
- time make -f standard/deps $1
-fi
+time ${MAKE:-make} -f standard/deps $1
-# added by Burcin Erocal, see trac #6295.
+# Added by Burcin Erocal, see trac #6295:
if [ $? -ne 0 ]; then
- echo "Error building Sage."
+ echo >&2 "Error building Sage."
exit 1
fi
+# Rename makefile to Makefile (see #10156):
cd "$SAGE_ROOT"
-
-# Rename makefile to Makefile (see #10156)
if [ -f makefile ]; then
- mv makefile Makefile
- if [ $? -ne 0 ]; then
- echo "Error renaming 'makefile' to 'Makefile'."
- exit 1
+ if [ ! -f Makefile ]; then
+ if ! mv makefile Makefile; then
+ echo >&2 "Error renaming 'makefile' to 'Makefile'."
+ exit 1
+ fi
+ else
+ # Both 'makefile' and 'Makefile' exist.
+ echo >&2 "Warning: Deleting old 'makefile'; 'Makefile' remains."
+ if ! rm -f makefile; then
+ echo >&2 "Error deleting old 'makefile'."
+ exit 1
+ fi
fi
fi
-# build succeeded
-if [ "$1" = "all" ]; then
- echo "To install gap, gp, singular, etc., scripts"
- echo "in a standard bin directory, start sage and"
- echo "type something like"
- echo " sage: install_scripts('/usr/local/bin')"
- echo "at the Sage command prompt."
- echo ""
- echo "To build the documentation, run"
- echo " make doc"
- echo ""
-fi
-
+# Build succeeded.
echo "Sage build/upgrade complete!"
+if [ "$1" = "all" ]; then
+ echo
+ echo "To install small scripts to directly run Sage's versions of
GAP,"
+ echo "the PARI/GP interpreter, Maxima, or Singular etc. (by typing
e.g."
+ echo "just 'gap' or 'gp') into a standard 'bin' directory, start
Sage"
+ echo "by typing 'sage' (or './sage') and enter something like"
+ echo
+ echo " install_scripts('/usr/local/bin')"
+ echo
+ echo "at the Sage command prompt ('sage:')."
+ echo
+ echo "To (re)build the HTML documentation, run 'make doc' (if you
haven't"
+ echo "issued 'make' but just 'make build' or e.g. 'sage --upgrade';
other-"
+ echo "wise it will be built automatically right now)."
+ echo
+ echo "To build the PDF version of the documentation, run 'make doc-
pdf'."
+ echo
+fi
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11959#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.