summaryrefslogtreecommitdiff
path: root/xmake/scripts/action
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-16 11:38:50 +0800
committerruki <[email protected]>2015-06-16 11:38:50 +0800
commitb02e5fc9da96945b0be2452bdbbf5b9801e68b69 (patch)
tree5e0826167d0b63eea1721fbb17f4fca89525bde1 /xmake/scripts/action
parent60bd22effb5664fefafabe69f5023301b6970e7b (diff)
modify the compiler and linker command
Diffstat (limited to 'xmake/scripts/action')
-rw-r--r--xmake/scripts/action/_build.lua6
-rw-r--r--xmake/scripts/action/_clean.lua6
-rw-r--r--xmake/scripts/action/_config.lua5
3 files changed, 17 insertions, 0 deletions
diff --git a/xmake/scripts/action/_build.lua b/xmake/scripts/action/_build.lua
index 748ed54e1..bb4cdf1de 100644
--- a/xmake/scripts/action/_build.lua
+++ b/xmake/scripts/action/_build.lua
@@ -28,6 +28,7 @@ local rule = require("base/rule")
local utils = require("base/utils")
local clean = require("base/clean")
local config = require("base/config")
+local project = require("base/project")
local makefile = require("base/makefile")
-- done the given config
@@ -40,6 +41,11 @@ function _build.done()
-- the target name
local target_name = options.target
+ -- check target
+ if not project.checktarget(target_name) then
+ return false
+ end
+
-- rebuild it?
if options.rebuild or config.get("__rebuild") then
clean.remove(target_name)
diff --git a/xmake/scripts/action/_clean.lua b/xmake/scripts/action/_clean.lua
index 2a479157f..31b5209d3 100644
--- a/xmake/scripts/action/_clean.lua
+++ b/xmake/scripts/action/_clean.lua
@@ -26,6 +26,7 @@ local _clean = _clean or {}
-- load modules
local clean = require("base/clean")
local config = require("base/config")
+local project = require("base/project")
local platform = require("platform/platform")
-- done the given config
@@ -35,6 +36,11 @@ function _clean.done()
local options = xmake._OPTIONS
assert(options)
+ -- check target
+ if not project.checktarget(options.target) then
+ return false
+ end
+
-- clean the current target
if not clean.remove(options.target) then
return false
diff --git a/xmake/scripts/action/_config.lua b/xmake/scripts/action/_config.lua
index 13916114a..851f866a0 100644
--- a/xmake/scripts/action/_config.lua
+++ b/xmake/scripts/action/_config.lua
@@ -37,6 +37,11 @@ function _config.done()
local options = xmake._OPTIONS
assert(options)
+ -- check target
+ if not project.checktarget(options.target) then
+ return false
+ end
+
-- save the configure
if not config.save() then
-- error