Skip to content

Commit c8d604a

Browse files
author
Matthias Koeppe
committed
bootstrap: Accept SPKG arguments
1 parent 1ca4a47 commit c8d604a

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

bootstrap

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,14 @@ SAGE_SPKG_FINALIZE([$pkgname], [$pkgtype], [$SPKG_SOURCE], [$SPKG_TREE_VAR])"
110110
echo 'changequote(>>>`<<<, >>>'"'"'<<<)dnl' >> $a
111111
done
112112

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

117+
if [ $# != 0 ]; then
118+
return
119+
fi
120+
117121
# Default to no filter if "-q" was not passed.
118122
QUIET_SED_FILTER=""
119123
if [ "${BOOTSTRAP_QUIET}" = "yes" ]; then
@@ -126,7 +130,6 @@ SAGE_SPKG_FINALIZE([$pkgname], [$pkgtype], [$SPKG_SOURCE], [$SPKG_TREE_VAR])"
126130
# stdout alone. Basically we swap the two descriptors using a
127131
# third, filter, and then swap them back.
128132
./bootstrap-conda && \
129-
src/doc/bootstrap && \
130133
aclocal -I m4 && \
131134
automake --add-missing --copy build/make/Makefile-auto 3>&1 1>&2 2>&3 \
132135
| sed "${QUIET_SED_FILTER}" 3>&1 1>&2 2>&3 && \
@@ -236,7 +239,7 @@ save () {
236239

237240

238241
usage () {
239-
echo >&2 "Usage: $0 [-d|-D|-s] [-u <URL>] [-h] [-q]"
242+
echo >&2 "Usage: $0 [-d|-D|-s] [-u <URL>] [-h] [-q] [SPKG...]"
240243
echo >&2 ""
241244
echo >&2 "Options:"
242245
echo >&2 " -d fall back to downloading (released versions only)"
@@ -269,6 +272,7 @@ do
269272
?) usage; exit 2;;
270273
esac
271274
done
275+
shift $(($OPTIND - 1))
272276
export BOOTSTRAP_QUIET
273277
CONFBALL="upstream/configure-$CONFVERSION.tar.gz"
274278

@@ -278,14 +282,16 @@ if [ $DOWNLOAD$SAVE = yesyes ]; then
278282
exit 2
279283
fi
280284

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

290296
if [ $ALWAYSDOWNLOAD = yes ]; then
291297
if [ -n "$CONFTARBALL_URL" ]; then
@@ -302,7 +308,7 @@ if [ $ALWAYSDOWNLOAD = yes ]; then
302308
bootstrap_download || exit $?
303309
fi
304310
else
305-
bootstrap
311+
bootstrap "$@"
306312
fi
307313

308314
if [ $SAVE = yes ]; then
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/bootstrap

build/pkgs/sagemath_doc_html/src

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../src/doc

0 commit comments

Comments
 (0)