[offsets-tool] Make sure to re-clone when the hash for the cpp binaries changes.
authorRolf Bjarne Kvinge <rolf@xamarin.com>
Mon, 14 Nov 2016 15:57:54 +0000 (16:57 +0100)
committerRolf Bjarne Kvinge <rolf@xamarin.com>
Mon, 14 Nov 2016 15:59:34 +0000 (16:59 +0100)
tools/offsets-tool/.gitignore
tools/offsets-tool/Makefile

index 61a0f8df9c00e1a1741c267488fe1ae3ee9c5e49..afc98f0d6b8c4483567b7da9c196e2d55b3decec 100644 (file)
@@ -1,4 +1,4 @@
-.stamp-clone
+.stamp-clone-*
 CppSharp
 *.exe
 *.h
index 37909156cee069bd22496d34967a1aac901f55d6..4869bf291724bf41151719a4ca70023d19843e7b 100644 (file)
@@ -36,12 +36,12 @@ SRC_ROOT = ../..
 
 MONO_OPTIONS_SRC = $(SRC_ROOT)/mcs/class/Mono.Options/Mono.Options/Options.cs
 
-.stamp-clone:
-       @if [ ! -d $(CPPSHARP_BASE_DIR) ]; then \
-               git clone -b 60f763a9 --depth 1 git://github.com/xamarin/CppSharpBinaries.git $(CPPSHARP_BASE_DIR) && touch $@; \
-       fi
+HASH=60f763a9
+.stamp-clone-$(HASH):
+       rm -Rf $(CPPSHARP_BASE_DIR)
+       git clone -b $(HASH) --depth 1 git://github.com/xamarin/CppSharpBinaries.git $(CPPSHARP_BASE_DIR) && touch $@
 
-MonoAotOffsetsDumper.exe: .stamp-clone MonoAotOffsetsDumper.cs $(MONO_OPTIONS_SRC)
+MonoAotOffsetsDumper.exe: .stamp-clone-$(HASH) MonoAotOffsetsDumper.cs $(MONO_OPTIONS_SRC)
        mcs MonoAotOffsetsDumper.cs /debug /nowarn:0436 $(MONO_OPTIONS_SRC) $(CPPSHARP_REFS)
 
 .PHONY: clean