diff options
| author | ruki <[email protected]> | 2015-12-01 23:59:53 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-12-01 23:59:53 +0800 |
| commit | e56812a09d3677957c41bccc8988599208e3b49a (patch) | |
| tree | 5e208f2707be9348b7b215706c3fa6cf64aa2134 /xmake/scripts/platform/android | |
| parent | e88ecbfd2dcdf19908df50abf86fd29032e2d359 (diff) | |
improve proberv1.0.3
Diffstat (limited to 'xmake/scripts/platform/android')
| -rw-r--r-- | xmake/scripts/platform/android/prober.lua | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/xmake/scripts/platform/android/prober.lua b/xmake/scripts/platform/android/prober.lua index 6149b54fb..bb4abe023 100644 --- a/xmake/scripts/platform/android/prober.lua +++ b/xmake/scripts/platform/android/prober.lua @@ -205,6 +205,14 @@ function prober._probe_toolpath(configs, kind, cross, name, description) utils.verbose("checking for %s (%s) ... no", description, kind) end + -- failed? + if not toolpath and not configs.get("ndk") then + utils.error("checking for the NDK directory ... no") + utils.error(" - xmake config --ndk=xxx") + utils.error("or - xmake global --ndk=xxx") + return false + end + -- ok return true end @@ -226,6 +234,8 @@ function prober._probe_toolchains(configs) if not prober._probe_toolpath(configs, "ld", prefix, "g++", "the linker") then return false end if not prober._probe_toolpath(configs, "ar", prefix, "ar", "the static library linker") then return false end if not prober._probe_toolpath(configs, "sh", prefix, "g++", "the shared library linker") then return false end + + -- ok return true end @@ -233,13 +243,13 @@ end function prober.config() -- call all probe functions - utils.call( { prober._probe_arch - , prober._probe_make - , prober._probe_ccache - , prober._probe_ndk_sdkver - , prober._probe_toolchains} - , nil - , config) + return utils.call( { prober._probe_arch + , prober._probe_make + , prober._probe_ccache + , prober._probe_ndk_sdkver + , prober._probe_toolchains} + , nil + , config) end @@ -247,11 +257,11 @@ end function prober.global() -- call all probe functions - utils.call( { prober._probe_make - , prober._probe_ccache - , prober._probe_ndk_sdkver} - , nil - , global) + return utils.call( { prober._probe_make + , prober._probe_ccache + , prober._probe_ndk_sdkver} + , nil + , global) end -- return module: prober |
