We added stamp file as build time optimization but that should not stop jhbuild
if config files are changed. Also moving the stamp file to Root directory
so that clobbering jhbuild will also force rebuild.
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=6110
Reviewed by: Yi Shen, SeungSeop Park
Change-Id: Idc0939030c51b1941420abc250ce58ee055a5be6
Signed-off-by: Balazs Kelemen <b.kelemen@samsung.com>
-JHBUILD_STAMPFILE="${GYP_GENERATOR_OUTPUT}/Dependencies/jhbuild.stamp"
+JHBUILD_STAMPFILE="${GYP_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp"
-if echo "$@" | grep -cq '\-\-force-jhbuild'; then
+shouldForceJHBuild() {
+ if echo "$@" | grep -cq '\-\-force-jhbuild'; then
+ return 1
+ fi
+
+ # Check if anything in jhbuild is more recent than stamp file.
+ for i in $(find "$SCRIPTDIR/jhbuild"); do
+ if [ -f "$i" -a "$JHBUILD_STAMPFILE" -ot "$i" ]; then
+ return 1
+ fi
+ done
+
+ return 0
+}
+
+if [ "$(shouldForceJHBuild $@)" == "1" ]; then
rm -f $JHBUILD_STAMPFILE
fi
rm -f $JHBUILD_STAMPFILE
fi