Skip to content

Commit

Permalink
BuildPackages.sh: add --with-gap option
Browse files Browse the repository at this point in the history
We call gap to parse PackageInfo.g files. To do so, so far we called
$GAPROOT/gap. But that does not work reliably with out-of-tree builds; instead
$GAPROOT/bin/gap.sh should be called (which we now do by default) But even
that might not be enough for special applications. Hence we added a --with-gap
option to allow users to override this, if they should really need to.
  • Loading branch information
fingolfin committed Apr 20, 2020
1 parent f0a8f49 commit e89f016
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/BuildPackages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ fi

CURDIR="$(pwd)"
GAPROOT="$(cd .. && pwd)"
GAP="$GAPROOT/bin/gap.sh"
COLORS=yes
STRICT=no # exit with non-zero exit code when encountering any failures
PACKAGES=()
Expand All @@ -46,6 +47,9 @@ while [[ "$#" -ge 1 ]]; do
--with-gaproot) GAPROOT="$1"; shift ;;
--with-gaproot=*) GAPROOT=${option#--with-gaproot=}; ;;

--with-gap) GAP="$1"; shift ;;
--with-gap=*) GAP=${option#--with-gap=}; ;;

--no-color) COLORS=no ;;
--color) COLORS=yes ;;

Expand Down Expand Up @@ -168,7 +172,7 @@ run_configure_and_make() {
then
if grep Autoconf ./configure > /dev/null
then
local PKG_NAME=$($GAPROOT/gap -q -T -A <<GAPInput
local PKG_NAME=$($GAP -q -T -A <<GAPInput
Read("PackageInfo.g");
Print(GAPInfo.PackageInfoCurrent.PackageName);
GAPInput
Expand Down

0 comments on commit e89f016

Please sign in to comment.