diff options
| author | ruki <[email protected]> | 2016-06-30 21:23:21 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-06-30 21:23:21 +0800 |
| commit | 49d53bf1f5463704db09d8921e9ed89b814c7a42 (patch) | |
| tree | 6a49d2631dbcab508b28aecc734eadaec2a5036e | |
| parent | 0910e8ce0ad2bffc1e5c9b2c28ee7c845a339521 (diff) | |
improve to check target deps
| -rwxr-xr-x | xmake/actions/config/main.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua index 9943a1528..9b7790f0c 100755 --- a/xmake/actions/config/main.lua +++ b/xmake/actions/config/main.lua @@ -80,11 +80,14 @@ function _check_target_deps(target) -- check for _, depname in ipairs(target:get("deps")) do + -- check dependent target name + assert(depname ~= target:name(), "the target(%s) cannot depend self!", depname) + -- get dependent target local deptarget = project.target(depname) - -- check target name - assert(deptarget, "unknown target: %s for %s.deps!", depname, target:name()) + -- check dependent target name + assert(deptarget, "unknown target(%s) for %s.deps!", depname, target:name()) -- check the dependent targets _check_target_deps(deptarget) |
