2017-12-09 21:51:48 +01:00
|
|
|
save_toolchain() {
|
|
|
|
if [ ! -e "${TCDIR}/${TARGET}.tar.gz" ]; then
|
|
|
|
pushd "$TCDIR/$TARGET" > /dev/null
|
|
|
|
tar czf "${TCDIR}/${TARGET}.tar.gz" include lib
|
|
|
|
popd > /dev/null
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
restore_toolchain() {
|
|
|
|
pushd "$TCDIR/$TARGET" > /dev/null
|
|
|
|
rm -r include lib
|
|
|
|
tar zxf "${TCDIR}/${TARGET}.tar.gz"
|
|
|
|
popd > /dev/null
|
|
|
|
}
|
|
|
|
|
|
|
|
install_build_deps() {
|
2018-01-24 12:52:41 +01:00
|
|
|
if [ -z "$DEPENDS" ]; then
|
2017-12-09 21:51:48 +01:00
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
2018-01-24 12:52:41 +01:00
|
|
|
for deppkg in $DEPENDS; do
|
2017-12-09 21:51:48 +01:00
|
|
|
local devdir="$PKGDEPLOYDIR/${deppkg}-dev"
|
|
|
|
|
|
|
|
if [ -d "$devdir/include" ]; then
|
|
|
|
cp -R "$devdir/include" "$TCDIR/$TARGET"
|
|
|
|
fi
|
|
|
|
if [ -d "$devdir/lib" ]; then
|
|
|
|
cp -R "$devdir/lib" "$TCDIR/$TARGET"
|
|
|
|
fi
|
2018-01-24 12:52:41 +01:00
|
|
|
done
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|