Merge "Fix ndk-build to observe NDK_APP_OUT set in Application.mk"
diff --git a/build/tools/download-toolchain-sources.sh b/build/tools/download-toolchain-sources.sh
index 026d1e6..6e77e3a 100755
--- a/build/tools/download-toolchain-sources.sh
+++ b/build/tools/download-toolchain-sources.sh
@@ -220,6 +220,12 @@
     (cd "$TMPDIR/llvm-$LLVM_VERSION/llvm" && \
         ln -s ../../clang tools && \
         mv tools/polly ..)
+    # In polly/utils/cloog_src, touch Makefile.in, aclocal.m4, and configure to
+    # make sure they are not regenerated.
+    (cd "$TMPDIR/llvm-$LLVM_VERSION/polly" && \
+        find . -name "Makefile.in" -exec touch {} \; && \
+        find . -name "aclocal.m4" -exec touch {} \; && \
+        find . -name "configure" -exec touch {} \; )
 done
 
 PYVERSION=2.7.3