1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-06-03 02:38:44 +02:00
build/util/toolchain.sh
David Oberhollenzer 525b36aa89 Cleanup deploy/devdeploy split
- Don't duplicate shared objects, use the ones from the deploy
   directory when building dependend packages
 - Add helper function for moving headers, static libraries
   and pkgconfig data to devdeploy directory

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-02-10 19:59:51 +01:00

35 lines
728 B
Bash

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() {
if [ -z "$DEPENDS" ]; then
return
fi
for deppkg in $DEPENDS; do
local devdir="$PKGDEPLOYDIR/${deppkg}-dev"
if [ -d "$devdir/include" ]; then
cp -R "$devdir/include" "$TCDIR/$TARGET"
fi
if [ -d "$PKGDEPLOYDIR/$deppkg/lib" ]; then
cp -R "$PKGDEPLOYDIR/$deppkg/lib" "$TCDIR/$TARGET"
fi
if [ -d "$devdir/lib" ]; then
cp -R "$devdir/lib" "$TCDIR/$TARGET"
fi
done
}