summaryrefslogtreecommitdiff
path: root/xmake/scripts/platform/android/prober.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-12-01 23:59:53 +0800
committerruki <[email protected]>2015-12-01 23:59:53 +0800
commite56812a09d3677957c41bccc8988599208e3b49a (patch)
tree5e208f2707be9348b7b215706c3fa6cf64aa2134 /xmake/scripts/platform/android/prober.lua
parente88ecbfd2dcdf19908df50abf86fd29032e2d359 (diff)
improve proberv1.0.3
Diffstat (limited to 'xmake/scripts/platform/android/prober.lua')
-rw-r--r--xmake/scripts/platform/android/prober.lua34
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