mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-07-02 01:28:42 +08:00
Support for changing binary dir, support for doing binary staging after recipe_stage function
This commit is contained in:
parent
20a53f60d3
commit
5c2e74c425
15
cook.sh
15
cook.sh
@ -9,7 +9,8 @@ REPO="$ROOT/repo/$TARGET"
|
||||
export CC="$ROOT/libc-artifacts/gcc.sh"
|
||||
|
||||
# Variables to be overriden by recipes
|
||||
export CARGOFLAGS=--verbose
|
||||
export BINDIR=bin
|
||||
export CARGOFLAGS=
|
||||
|
||||
set -e
|
||||
|
||||
@ -68,19 +69,23 @@ function op {
|
||||
stage)
|
||||
mkdir -p stage
|
||||
pushd build > /dev/null
|
||||
skip_bins="0"
|
||||
if [ "$(type -t recipe_stage)" = "function" ]
|
||||
then
|
||||
recipe_stage ../stage
|
||||
else
|
||||
skip_bins="$?"
|
||||
fi
|
||||
if [ "$skip_bins" -eq "0" ]
|
||||
then
|
||||
#TODO xargo install --root "../stage" $CARGOFLAGS
|
||||
bins="$(find target/$TARGET/release/ -maxdepth 1 -type f ! -name '*.*')"
|
||||
if [ -n "$bins" ]
|
||||
then
|
||||
mkdir -p ../stage/bin
|
||||
mkdir -p "../stage/$BINDIR"
|
||||
for bin in $bins
|
||||
do
|
||||
cp -v "$bin" "../stage/bin/$(basename $bin)"
|
||||
#strip -v "../stage/bin/$(basename $bin)"
|
||||
cp -v "$bin" "../stage/$BINDIR/$(basename $bin)"
|
||||
#strip -v "../stage/$BINDIR/$(basename $bin)"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user