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

Commit

Permalink
bootstrap: Run bootstrap scripts in build/pkgs/*/, create build/pkgs/…
Browse files Browse the repository at this point in the history
…sagelib/bootstrap
  • Loading branch information
Matthias Koeppe committed Nov 20, 2020
1 parent 411cbfb commit 3b02c3d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
16 changes: 5 additions & 11 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

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

export PATH="$SAGE_ROOT/build/bin:$PATH"
Expand Down Expand Up @@ -94,15 +95,9 @@ SAGE_SPKG_ENABLE([$pkgname], [$pkgtype])"
fi
;;
esac
for infile in "$pkgdir"/src/*.m4; do
if [ -f "$infile" ]; then
outfile="$pkgdir/src/$(basename $infile .m4)"
if [ "${BOOTSTRAP_QUIET}" = "no" ]; then
echo "$0: installing $outfile"
fi
m4 "$infile" > "$outfile"
fi
done
if [ -x "$pkgdir/bootstrap" ]; then
(cd $pkgdir && ./bootstrap || exit 1)
fi
done
for filename in $(find build/pkgs -type f -name spkg-configure.m4 | sort); do
pkgname="$(echo $filename | cut -d/ -f3)"
Expand All @@ -123,8 +118,6 @@ SAGE_SPKG_CONFIGURE_$(echo ${pkgname} | tr '[a-z]' '[A-Z]')"
# ONLY stderr, and to re-output the results back to stderr leaving
# stdout alone. Basically we swap the two descriptors using a
# third, filter, and then swap them back.
BOOTSTRAP_QUIET="${BOOTSTRAP_QUIET}" \
SAGE_ROOT="$SAGE_ROOT" \
src/doc/bootstrap && \
install_config_rpath && \
aclocal -I m4 && \
Expand Down Expand Up @@ -249,6 +242,7 @@ do
?) usage; exit 2;;
esac
done
export BOOTSTRAP_QUIET
CONFBALL="upstream/configure-$CONFVERSION.tar.gz"

if [ $DOWNLOAD$SAVE = yesyes ]; then
Expand Down
10 changes: 10 additions & 0 deletions build/pkgs/sagelib/bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#! /bin/sh
for infile in src/*.m4; do
if [ -f "$infile" ]; then
outfile="src/$(basename $infile .m4)"
if [ "${BOOTSTRAP_QUIET}" = "no" ]; then
echo "$0: installing build/pkgs/sagelib/$outfile"
fi
m4 "$infile" > "$outfile"
fi
done

0 comments on commit 3b02c3d

Please sign in to comment.