build-system: detect libdivecomputer changes in MXE build

Automatically trigger a rebuild of libdivecomputer if it has changed
since the last build.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2018-06-25 15:06:11 +08:00
parent dde2049027
commit d35c3c0fbf

View file

@ -173,7 +173,9 @@ if [ ! -f libdivecomputer/configure ] ; then
fi
cd "$BUILDDIR"
if [[ ! -d libdivecomputer || -f build.libdivecomputer ]] ; then
CURRENT_SHA=$(cd "$BASEDIR"/subsurface/libdivecomputer ; git describe)
PREVIOUS_SHA=$(cat "libdivecomputer.SHA" 2>/dev/null || echo)
if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" ] || [ ! -d libdivecomputer ] || [ -f build.libdivecomputer ] ; then
rm -f build.libdivecomputer
mkdir -p libdivecomputer
cd libdivecomputer