Make all.sh more robust in some use cases
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh
index e9aa1ba..205966e 100755
--- a/tests/scripts/all.sh
+++ b/tests/scripts/all.sh
@@ -35,6 +35,8 @@
 {
     make clean
     find -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} \+
+    rm -f include/Makefile include/polarssl/Makefile programs/*/Makefile
+    git update-index --no-skip-worktree {.,library,programs,tests}/Makefile
     git checkout -- {.,library,programs,tests}/Makefile
 }