diff options
| author | ruki <[email protected]> | 2015-06-10 20:50:58 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-10 20:50:58 +0800 |
| commit | b5815f7c047221ea4a85333f7a8b6be5a2a4c737 (patch) | |
| tree | f53349989af5e057d77233d333ef5efc46d03ed3 /xmake/scripts/platform | |
| parent | 62f8e7581602d698a341db16257bd3d9304fa30d (diff) | |
modify the checking verbose info
Diffstat (limited to 'xmake/scripts/platform')
| -rw-r--r-- | xmake/scripts/platform/android/prober.lua | 30 | ||||
| -rw-r--r-- | xmake/scripts/platform/iphoneos/prober.lua | 49 | ||||
| -rw-r--r-- | xmake/scripts/platform/iphonesimulator/prober.lua | 49 | ||||
| -rw-r--r-- | xmake/scripts/platform/linux/prober.lua | 30 | ||||
| -rw-r--r-- | xmake/scripts/platform/macosx/prober.lua | 49 | ||||
| -rw-r--r-- | xmake/scripts/platform/windows/prober.lua | 37 |
6 files changed, 112 insertions, 132 deletions
diff --git a/xmake/scripts/platform/android/prober.lua b/xmake/scripts/platform/android/prober.lua index d3840d812..5ecf1731b 100644 --- a/xmake/scripts/platform/android/prober.lua +++ b/xmake/scripts/platform/android/prober.lua @@ -44,6 +44,9 @@ function prober._probe_arch(configs) -- init the default architecture configs.set("arch", "armv7-a") + -- trace + utils.verbose("checking the architecture ... %s", configs.get("arch")) + -- ok return true end @@ -72,6 +75,9 @@ function prober._probe_ccache(configs) configs.set("ccache", false) end + -- trace + utils.verbose("checking for the ccache ... %s", utils.ifelse(ccache_path, ccache_path, "no")) + -- ok return true end @@ -80,16 +86,9 @@ end function prober.config() -- call all probe functions - utils.call( prober - , { "_probe_arch" - , "_probe_ccache"} - - , function (name, result) - -- trace - utils.verbose("checking %s ...: %s", name:gsub("_probe_", ""), utils.ifelse(result, "ok", "no")) - return result - end - + utils.call( { prober._probe_arch + , prober._probe_ccache} + , nil , config) end @@ -98,15 +97,8 @@ end function prober.global() -- call all probe functions - utils.call( prober - , { "_probe_ccache"} - - , function (name, result) - -- trace - utils.verbose("checking %s ...: %s", name:gsub("_probe_", ""), utils.ifelse(result, "ok", "no")) - return result - end - + utils.call( prober._probe_ccache + , nil , global) end diff --git a/xmake/scripts/platform/iphoneos/prober.lua b/xmake/scripts/platform/iphoneos/prober.lua index 4d29d77cb..e62b4d39f 100644 --- a/xmake/scripts/platform/iphoneos/prober.lua +++ b/xmake/scripts/platform/iphoneos/prober.lua @@ -44,6 +44,9 @@ function prober._probe_arch(configs) -- init the default architecture configs.set("arch", "armv7") + -- trace + utils.verbose("checking the architecture ... %s", configs.get("arch")) + -- ok return true end @@ -77,10 +80,14 @@ function prober._probe_xcode(configs) -- probe ok? update it if xcode_dir then + -- save it configs.set("xcode_dir", xcode_dir) + + -- trace + utils.verbose("checking the Xcode application directory ... %s", xcode_dir) else -- failed - utils.error("The Xcode directory is unknown now, please config it first!") + utils.error("checking the Xcode application directory ... no") utils.error(" - xmake config --xcode_dir=xxx") utils.error("or - xmake global --xcode_dir=xxx") return false @@ -115,10 +122,15 @@ function prober._probe_xcode_sdkver(configs) -- probe ok? update it if xcode_sdkver then + + -- save it configs.set("xcode_sdkver", xcode_sdkver) + + -- trace + utils.verbose("checking the Xcode SDK version for %s ... %s", configs.get("plat"), xcode_sdkver) else -- failed - utils.error("The Xcode SDK version is unknown now, please config it first!") + utils.error("checking the Xcode SDK version for %s ... no", configs.get("plat")) utils.error(" - xmake config --xcode_sdkver=xxx") utils.error("or - xmake global --xcode_sdkver=xxx") return false @@ -152,6 +164,9 @@ function prober._probe_ccache(configs) configs.set("ccache", false) end + -- trace + utils.verbose("checking for the ccache ... %s", utils.ifelse(ccache_path, ccache_path, "no")) + -- ok return true end @@ -160,18 +175,11 @@ end function prober.config() -- call all probe functions - utils.call( prober - , { "_probe_arch" - , "_probe_xcode" - , "_probe_xcode_sdkver" - , "_probe_ccache"} - - , function (name, result) - -- trace - utils.verbose("checking %s ...: %s", name:gsub("_probe_", ""), utils.ifelse(result, "ok", "no")) - return result - end - + utils.call( { prober._probe_arch + , prober._probe_xcode + , prober._probe_xcode_sdkver + , prober._probe_ccache} + , nil , config) end @@ -180,16 +188,9 @@ end function prober.global() -- call all probe functions - utils.call( prober - , { "_probe_xcode" - , "_probe_ccache"} - - , function (name, result) - -- trace - utils.verbose("checking %s ...: %s", name:gsub("_probe_", ""), utils.ifelse(result, "ok", "no")) - return result - end - + utils.call( { prober._probe_xcode + , prober._probe_ccache} + , nil , global) end diff --git a/xmake/scripts/platform/iphonesimulator/prober.lua b/xmake/scripts/platform/iphonesimulator/prober.lua index 5804e97b9..419becf12 100644 --- a/xmake/scripts/platform/iphonesimulator/prober.lua +++ b/xmake/scripts/platform/iphonesimulator/prober.lua @@ -44,6 +44,9 @@ function prober._probe_arch(configs) -- init the default architecture configs.set("arch", "x86") + -- trace + utils.verbose("checking the architecture ... %s", configs.get("arch")) + -- ok return true end @@ -77,10 +80,14 @@ function prober._probe_xcode(configs) -- probe ok? update it if xcode_dir then + -- save it configs.set("xcode_dir", xcode_dir) + + -- trace + utils.verbose("checking the Xcode application directory ... %s", xcode_dir) else -- failed - utils.error("The Xcode directory is unknown now, please config it first!") + utils.error("checking the Xcode application directory ... no") utils.error(" - xmake config --xcode_dir=xxx") utils.error("or - xmake global --xcode_dir=xxx") return false @@ -115,10 +122,15 @@ function prober._probe_xcode_sdkver(configs) -- probe ok? update it if xcode_sdkver then + + -- save it configs.set("xcode_sdkver", xcode_sdkver) + + -- trace + utils.verbose("checking the Xcode SDK version for %s ... %s", configs.get("plat"), xcode_sdkver) else -- failed - utils.error("The Xcode SDK version is unknown now, please config it first!") + utils.error("checking the Xcode SDK version for %s ... no", configs.get("plat")) utils.error(" - xmake config --xcode_sdkver=xxx") utils.error("or - xmake global --xcode_sdkver=xxx") return false @@ -152,6 +164,9 @@ function prober._probe_ccache(configs) configs.set("ccache", false) end + -- trace + utils.verbose("checking for the ccache ... %s", utils.ifelse(ccache_path, ccache_path, "no")) + -- ok return true end @@ -160,18 +175,11 @@ end function prober.config() -- call all probe functions - utils.call( prober - , { "_probe_arch" - , "_probe_xcode" - , "_probe_xcode_sdkver" - , "_probe_ccache"} - - , function (name, result) - -- trace - utils.verbose("checking %s ...: %s", name:gsub("_probe_", ""), utils.ifelse(result, "ok", "no")) - return result - end - + utils.call( { prober._probe_arch + , prober._probe_xcode + , prober._probe_xcode_sdkver + , prober._probe_ccache} + , nil , config) end @@ -179,16 +187,9 @@ end function prober.global() -- call all probe functions - utils.call( prober - , { "_probe_xcode" - , "_probe_ccache"} - - , function (name, result) - -- trace - utils.verbose("checking %s ...: %s", name:gsub("_probe_", ""), utils.ifelse(result, "ok", "no")) - return result - end - + utils.call( { prober._probe_xcode + , prober._probe_ccache} + , nil , global) end diff --git a/xmake/scripts/platform/linux/prober.lua b/xmake/scripts/platform/linux/prober.lua index 70f877bb7..772c0ee66 100644 --- a/xmake/scripts/platform/linux/prober.lua +++ b/xmake/scripts/platform/linux/prober.lua @@ -44,6 +44,9 @@ function prober._probe_arch(configs) -- init the default architecture configs.set("arch", xmake._ARCH) + -- trace + utils.verbose("checking the architecture ... %s", configs.get("arch")) + -- ok return true end @@ -72,6 +75,9 @@ function prober._probe_ccache(configs) configs.set("ccache", false) end + -- trace + utils.verbose("checking for the ccache ... %s", utils.ifelse(ccache_path, ccache_path, "no")) + -- ok return true end @@ -80,16 +86,9 @@ end function prober.config() -- call all probe functions - utils.call( prober - , { "_probe_arch" - , "_probe_ccache"} - - , function (name, result) - -- trace - utils.verbose("checking %s ...: %s", name:gsub("_probe_", ""), utils.ifelse(result, "ok", "no")) - return result - end - + utils.call( { prober._probe_arch + , prober._probe_ccache} + , nil , config) end @@ -97,15 +96,8 @@ end function prober.global() -- call all probe functions - utils.call( prober - , { "_probe_ccache"} - - , function (name, result) - -- trace - utils.verbose("checking %s ...: %s", name:gsub("_probe_", ""), utils.ifelse(result, "ok", "no")) - return result - end - + utils.call( prober._probe_ccache + , nil , global) end diff --git a/xmake/scripts/platform/macosx/prober.lua b/xmake/scripts/platform/macosx/prober.lua index bdee6431e..32e059269 100644 --- a/xmake/scripts/platform/macosx/prober.lua +++ b/xmake/scripts/platform/macosx/prober.lua @@ -44,6 +44,9 @@ function prober._probe_arch(configs) -- init the default architecture configs.set("arch", xmake._ARCH) + -- trace + utils.verbose("checking the architecture ... %s", configs.get("arch")) + -- ok return true end @@ -77,10 +80,14 @@ function prober._probe_xcode(configs) -- probe ok? update it if xcode_dir then + -- save it configs.set("xcode_dir", xcode_dir) + + -- trace + utils.verbose("checking the Xcode application directory ... %s", xcode_dir) else -- failed - utils.error("The Xcode directory is unknown now, please config it first!") + utils.error("checking the Xcode application directory ... no") utils.error(" - xmake config --xcode_dir=xxx") utils.error("or - xmake global --xcode_dir=xxx") return false @@ -115,10 +122,15 @@ function prober._probe_xcode_sdkver(configs) -- probe ok? update it if xcode_sdkver then + + -- save it configs.set("xcode_sdkver", xcode_sdkver) + + -- trace + utils.verbose("checking the Xcode SDK version for %s ... %s", configs.get("plat"), xcode_sdkver) else -- failed - utils.error("The Xcode SDK version is unknown now, please config it first!") + utils.error("checking the Xcode SDK version for %s ... no", configs.get("plat")) utils.error(" - xmake config --xcode_sdkver=xxx") utils.error("or - xmake global --xcode_sdkver=xxx") return false @@ -152,6 +164,9 @@ function prober._probe_ccache(configs) configs.set("ccache", false) end + -- trace + utils.verbose("checking for the ccache ... %s", utils.ifelse(ccache_path, ccache_path, "no")) + -- ok return true end @@ -160,18 +175,11 @@ end function prober.config() -- call all probe functions - utils.call( prober - , { "_probe_arch" - , "_probe_xcode" - , "_probe_xcode_sdkver" - , "_probe_ccache"} - - , function (name, result) - -- trace - utils.verbose("checking %s ...: %s", name:gsub("_probe_", ""), utils.ifelse(result, "ok", "no")) - return result - end - + utils.call( { prober._probe_arch + , prober._probe_xcode + , prober._probe_xcode_sdkver + , prober._probe_ccache} + , nil , config) end @@ -179,16 +187,9 @@ end function prober.global() -- call all probe functions - utils.call( prober - , { "_probe_xcode" - , "_probe_ccache"} - - , function (name, result) - -- trace - utils.verbose("checking %s ...: %s", name:gsub("_probe_", ""), utils.ifelse(result, "ok", "no")) - return result - end - + utils.call( { prober._probe_xcode + , prober._probe_ccache} + , nil , global) end diff --git a/xmake/scripts/platform/windows/prober.lua b/xmake/scripts/platform/windows/prober.lua index bc39f2382..099212179 100644 --- a/xmake/scripts/platform/windows/prober.lua +++ b/xmake/scripts/platform/windows/prober.lua @@ -43,6 +43,9 @@ function prober._probe_arch(configs) -- init the default architecture configs.set("arch", xmake._ARCH) + -- trace + utils.verbose("checking the architecture ... %s", configs.get("arch")) + -- ok return true end @@ -86,10 +89,14 @@ function prober._probe_vs_version(configs) -- probe ok? update it if vs then + -- save it configs.set("vs", vs) + + -- trace + utils.verbose("checking the Microsoft Visual Studio version ... %s", vs) else -- failed - utils.error("The Microsoft Visual Studio is unknown now, please config it first!") + utils.error("checking the Microsoft Visual Studio version ... no") utils.error(" - xmake config --vs=xxx") utils.error("or - xmake global --vs=xxx") return false @@ -191,17 +198,10 @@ end function prober.config() -- call all probe functions - utils.call( prober - , { "_probe_arch" - , "_probe_vs_version" - , "_probe_vs_path"} - - , function (name, result) - -- trace - utils.verbose("checking %s ...: %s", name:gsub("_probe_", ""), utils.ifelse(result, "ok", "no")) - return result - end - + utils.call( { prober._probe_arch + , prober._probe_vs_version + , prober._probe_vs_path} + , nil , config) end @@ -209,16 +209,9 @@ end function prober.global() -- call all probe functions - utils.call( prober - , { "_probe_vs_version" - , "_probe_vs_path"} - - , function (name, result) - -- trace - utils.verbose("checking %s ...: %s", name:gsub("_probe_", ""), utils.ifelse(result, "ok", "no")) - return result - end - + utils.call( { prober._probe_vs_version + , prober._probe_vs_path} + , nil , global) end |
