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

Commit 3b02c3d

Browse files
author
Matthias Koeppe
committed
bootstrap: Run bootstrap scripts in build/pkgs/*/, create build/pkgs/sagelib/bootstrap
1 parent 411cbfb commit 3b02c3d

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

bootstrap

+5-11
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
# Set SAGE_ROOT to the path to this file and then cd into it
2626
SAGE_ROOT="$(cd "$(dirname "$0")" && pwd -P)"
27+
export SAGE_ROOT
2728
cd "$SAGE_ROOT"
2829

2930
export PATH="$SAGE_ROOT/build/bin:$PATH"
@@ -94,15 +95,9 @@ SAGE_SPKG_ENABLE([$pkgname], [$pkgtype])"
9495
fi
9596
;;
9697
esac
97-
for infile in "$pkgdir"/src/*.m4; do
98-
if [ -f "$infile" ]; then
99-
outfile="$pkgdir/src/$(basename $infile .m4)"
100-
if [ "${BOOTSTRAP_QUIET}" = "no" ]; then
101-
echo "$0: installing $outfile"
102-
fi
103-
m4 "$infile" > "$outfile"
104-
fi
105-
done
98+
if [ -x "$pkgdir/bootstrap" ]; then
99+
(cd $pkgdir && ./bootstrap || exit 1)
100+
fi
106101
done
107102
for filename in $(find build/pkgs -type f -name spkg-configure.m4 | sort); do
108103
pkgname="$(echo $filename | cut -d/ -f3)"
@@ -123,8 +118,6 @@ SAGE_SPKG_CONFIGURE_$(echo ${pkgname} | tr '[a-z]' '[A-Z]')"
123118
# ONLY stderr, and to re-output the results back to stderr leaving
124119
# stdout alone. Basically we swap the two descriptors using a
125120
# third, filter, and then swap them back.
126-
BOOTSTRAP_QUIET="${BOOTSTRAP_QUIET}" \
127-
SAGE_ROOT="$SAGE_ROOT" \
128121
src/doc/bootstrap && \
129122
install_config_rpath && \
130123
aclocal -I m4 && \
@@ -249,6 +242,7 @@ do
249242
?) usage; exit 2;;
250243
esac
251244
done
245+
export BOOTSTRAP_QUIET
252246
CONFBALL="upstream/configure-$CONFVERSION.tar.gz"
253247

254248
if [ $DOWNLOAD$SAVE = yesyes ]; then

build/pkgs/sagelib/bootstrap

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#! /bin/sh
2+
for infile in src/*.m4; do
3+
if [ -f "$infile" ]; then
4+
outfile="src/$(basename $infile .m4)"
5+
if [ "${BOOTSTRAP_QUIET}" = "no" ]; then
6+
echo "$0: installing build/pkgs/sagelib/$outfile"
7+
fi
8+
m4 "$infile" > "$outfile"
9+
fi
10+
done

0 commit comments

Comments
 (0)