summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-04 16:36:10 +0800
committerruki <[email protected]>2015-06-04 16:36:10 +0800
commitc17f9ed42c8529f3ff724e0d0614b99eac6374c0 (patch)
tree2e4524e89ec73e492e09e682bf2c3274aee73833
parent6c5fbedfe26db54b0bbb95fa9154ed759c7ad98f (diff)
fix global prober bug
-rw-r--r--xmake/scripts/platform/android/prober.lua4
-rw-r--r--xmake/scripts/platform/iphoneos/prober.lua12
-rw-r--r--xmake/scripts/platform/iphonesimulator/prober.lua14
-rw-r--r--xmake/scripts/platform/linux/prober.lua4
-rw-r--r--xmake/scripts/platform/macosx/prober.lua16
-rw-r--r--xmake/scripts/platform/msvc/prober.lua15
-rw-r--r--xmake/scripts/platform/platform.lua8
7 files changed, 54 insertions, 19 deletions
diff --git a/xmake/scripts/platform/android/prober.lua b/xmake/scripts/platform/android/prober.lua
index 67078f244..891023387 100644
--- a/xmake/scripts/platform/android/prober.lua
+++ b/xmake/scripts/platform/android/prober.lua
@@ -45,8 +45,8 @@ function prober._probe_arch(configs)
return true
end
--- probe the configure
-function prober.done(configs, is_global)
+-- probe the project configure
+function prober.config(configs)
-- probe the architecture
if not prober._probe_arch(configs) then return end
diff --git a/xmake/scripts/platform/iphoneos/prober.lua b/xmake/scripts/platform/iphoneos/prober.lua
index d8a1c5330..589e3a4b1 100644
--- a/xmake/scripts/platform/iphoneos/prober.lua
+++ b/xmake/scripts/platform/iphoneos/prober.lua
@@ -125,8 +125,8 @@ function prober._probe_xcode_sdkver(configs)
return true
end
--- probe the configure
-function prober.done(configs, is_global)
+-- probe the project configure
+function prober.config(configs)
-- probe the architecture
if not prober._probe_arch(configs) then return end
@@ -139,5 +139,13 @@ function prober.done(configs, is_global)
end
+-- probe the global configure
+function prober.config(configs)
+
+ -- probe the xcode application directory
+ if not prober._probe_xcode(configs) then return end
+
+end
+
-- return module: prober
return prober
diff --git a/xmake/scripts/platform/iphonesimulator/prober.lua b/xmake/scripts/platform/iphonesimulator/prober.lua
index 5b2321e4e..6b81f88f7 100644
--- a/xmake/scripts/platform/iphonesimulator/prober.lua
+++ b/xmake/scripts/platform/iphonesimulator/prober.lua
@@ -125,8 +125,8 @@ function prober._probe_xcode_sdkver(configs)
return true
end
--- probe the configure
-function prober.done(configs, is_global)
+-- probe the project configure
+function prober.config(configs)
-- probe the architecture
if not prober._probe_arch(configs) then return end
@@ -135,7 +135,15 @@ function prober.done(configs, is_global)
if not prober._probe_xcode(configs) then return end
-- probe the xcode sdk version
- if not is_global and not prober._probe_xcode_sdkver(configs) then return end
+ if not prober._probe_xcode_sdkver(configs) then return end
+
+end
+
+-- probe the global configure
+function prober.global(configs)
+
+ -- probe the xcode application directory
+ if not prober._probe_xcode(configs) then return end
end
diff --git a/xmake/scripts/platform/linux/prober.lua b/xmake/scripts/platform/linux/prober.lua
index f8418ff12..5e382e5e4 100644
--- a/xmake/scripts/platform/linux/prober.lua
+++ b/xmake/scripts/platform/linux/prober.lua
@@ -45,8 +45,8 @@ function prober._probe_arch(configs)
return true
end
--- probe the configure
-function prober.done(configs, is_global)
+-- probe the project configure
+function prober.config(configs)
-- probe the architecture
if not prober._probe_arch(configs) then return end
diff --git a/xmake/scripts/platform/macosx/prober.lua b/xmake/scripts/platform/macosx/prober.lua
index 0c6aa4a67..e917d6817 100644
--- a/xmake/scripts/platform/macosx/prober.lua
+++ b/xmake/scripts/platform/macosx/prober.lua
@@ -125,17 +125,25 @@ function prober._probe_xcode_sdkver(configs)
return true
end
--- probe the configure
-function prober.done(configs, is_global)
+-- probe the project configure
+function prober.config(configs)
-- probe the architecture
- if not prober._probe_arch(configs) then return end
+ if prober._probe_arch(configs) then return end
-- probe the xcode application directory
if not prober._probe_xcode(configs) then return end
-- probe the xcode sdk version
- if not is_global and not prober._probe_xcode_sdkver(configs) then return end
+ if not prober._probe_xcode_sdkver(configs) then return end
+
+end
+
+-- probe the global configure
+function prober.global(configs)
+
+ -- probe the xcode application directory
+ if not prober._probe_xcode(configs) then return end
end
diff --git a/xmake/scripts/platform/msvc/prober.lua b/xmake/scripts/platform/msvc/prober.lua
index b5d2947af..c730ad9f1 100644
--- a/xmake/scripts/platform/msvc/prober.lua
+++ b/xmake/scripts/platform/msvc/prober.lua
@@ -185,8 +185,8 @@ function prober._probe_vs_path(configs)
return true
end
--- probe the configure
-function prober.done(configs, is_global)
+-- probe the project configure
+function prober.config(configs)
-- probe the architecture
if not prober._probe_arch(configs) then return end
@@ -199,5 +199,16 @@ function prober.done(configs, is_global)
end
+-- probe the global configure
+function prober.global(configs)
+
+ -- probe the vs version
+ if not prober._probe_vs_version(configs) then return end
+
+ -- probe the vs path
+ if not prober._probe_vs_path(configs) then return end
+
+end
+
-- return module: prober
return prober
diff --git a/xmake/scripts/platform/platform.lua b/xmake/scripts/platform/platform.lua
index 3f9d2feec..35ce7f9f1 100644
--- a/xmake/scripts/platform/platform.lua
+++ b/xmake/scripts/platform/platform.lua
@@ -348,8 +348,8 @@ function platform.probe(configs, is_global)
-- probe all platforms with the current host
for _, plat in ipairs(plats) do
local module = platform._load(plat)
- if module and module._PROBER and module._PROBER.done and module._HOST and module._HOST == xmake._HOST then
- module._PROBER.done(configs, is_global)
+ if module and module._PROBER and module._PROBER.global and module._HOST and module._HOST == xmake._HOST then
+ module._PROBER.global(configs)
end
end
@@ -357,8 +357,8 @@ function platform.probe(configs, is_global)
else
-- probe it
local module = platform.module()
- if module and module._PROBER and module._PROBER.done then
- module._PROBER.done(configs, is_global)
+ if module and module._PROBER and module._PROBER.config then
+ module._PROBER.config(configs)
end
end
end