Make cargo configurable

This commit is contained in:
Jeremy Soller 2019-04-19 19:59:06 -06:00
parent dbe058a901
commit 93185f3995
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1

11
cook.sh
View File

@ -6,6 +6,7 @@ source config.sh
# Variables to be overriden by recipes
export BINDIR=bin
export CARGO=xargo
export CARGOBUILD=rustc
export CARGOFLAGS=
export DEBUG=
@ -229,7 +230,7 @@ function op {
fi
if [ "$skip" -eq "0" ]
then
xargo update
"${CARGO}" update
fi
popd > /dev/null
;;
@ -312,7 +313,7 @@ function op {
if [ "$skip" -eq "0" ]
then
cp -p "$ROOT/Xargo.toml" "Xargo.toml"
xargo "$CARGOBUILD" --target "$TARGET" $release_flag $CARGOFLAGS
"${CARGO}" "$CARGOBUILD" --target "$TARGET" $release_flag $CARGOFLAGS
fi
popd > /dev/null
;;
@ -333,7 +334,7 @@ function op {
if [ "$skip" -eq "0" ]
then
cp -p "$ROOT/Xargo.toml" "Xargo.toml"
xargo test --no-run --target "$TARGET" $release_flag $CARGOFLAGS
"${CARGO}" test --no-run --target "$TARGET" $release_flag $CARGOFLAGS
fi
popd > /dev/null
;;
@ -346,7 +347,7 @@ function op {
fi
if [ "$skip" -eq "0" ]
then
xargo clean
"${CARGO}" clean
fi
popd > /dev/null
;;
@ -362,7 +363,7 @@ function op {
fi
if [ "$skip" -eq "0" ]
then
#TODO xargo install --root "$stage" $CARGOFLAGS
#TODO "${CARGO}" install --root "$stage" $CARGOFLAGS
if [ "$DEBUG" == 1 ]
then
build=debug