From 3ac82896a22b8d973a2070281aaa902d8d57da87 Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Thu, 12 May 2016 14:50:15 +0200 Subject: [PATCH] Be more granular with SDK and NDK stamp files Previously we used a single stamp file to detect whether SDK/NDK need to be updated/recreate. This worked fine if nobody touched the toolchain directory. However, if any of the directories (sdk, ndk or anything in them) were removed, build would *not* recreate the toolchain *unless* the stamp file in the root folder would be deleted as well. This patch creates a stamp file per component directory for all the NDK and SDK components and thus the content will be restored should the directory be removed. It can be further improved, probably, by not removing the entire directory prior to unzipping files as we do now but instead unpack only those components that are missing. --- build-tools/android-toolchain/android-toolchain.targets | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build-tools/android-toolchain/android-toolchain.targets b/build-tools/android-toolchain/android-toolchain.targets index a52a5afb663..3e707ab1f74 100644 --- a/build-tools/android-toolchain/android-toolchain.targets +++ b/build-tools/android-toolchain/android-toolchain.targets @@ -23,6 +23,9 @@ Condition=" '%(HostOS)' == '$(HostOS)' Or '%(HostOS)' == '' "> + + <_SdkStampFiles Include="@(_PlatformAndroidSdkItem->'$(AndroidToolchainDirectory)\sdk\.stamp-%(Identity)')" /> + + Outputs="@(_SdkStampFiles);$(AndroidToolchainDirectory)\ndk\.stamp-ndk"> @@ -61,7 +64,7 @@ DestinationFolder="$(AndroidToolchainDirectory)\ndk" /> @@ -73,7 +76,7 @@ <_Script>$(AndroidToolchainDirectory)\ndk\build\tools\make-standalone-toolchain.sh