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() {
|
2018-02-16 00:53:38 +01:00
|
|
|
pushd "$TCDIR/$TARGET" > /dev/null
|
|
|
|
rm -rf include lib
|
2018-02-15 23:47:54 +01:00
|
|
|
if [ -e "${TCDIR}/${TARGET}.tar.gz" ]; then
|
|
|
|
tar zxf "${TCDIR}/${TARGET}.tar.gz"
|
|
|
|
fi
|
2018-02-16 00:53:38 +01:00
|
|
|
popd > /dev/null
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
2018-02-17 02:03:39 +01:00
|
|
|
local devdir="$PKGDEVDEPLOYDIR/$deppkg"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
|
|
|
if [ -d "$devdir/include" ]; then
|
|
|
|
cp -R "$devdir/include" "$TCDIR/$TARGET"
|
|
|
|
fi
|
2018-02-10 01:57:53 +01:00
|
|
|
if [ -d "$PKGDEPLOYDIR/$deppkg/lib" ]; then
|
|
|
|
cp -R "$PKGDEPLOYDIR/$deppkg/lib" "$TCDIR/$TARGET"
|
|
|
|
fi
|
2017-12-09 21:51:48 +01:00
|
|
|
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
|
|
|
}
|