summaryrefslogtreecommitdiff
path: root/xmake/core/base/deprecated.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-01-17 00:50:31 +0800
committerruki <[email protected]>2019-01-16 23:03:06 +0800
commit8aca38678b43b9fbf96964ae6fd104ea9e5000a3 (patch)
treec187d3d8a0a01231208b9b547385361f1be771b8 /xmake/core/base/deprecated.lua
parent150e39c909434f0caa63ab453b92257bddde8794 (diff)
add add_headerfiles and mark add_headers/set_headerdir as deprecated
Diffstat (limited to 'xmake/core/base/deprecated.lua')
-rw-r--r--xmake/core/base/deprecated.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/core/base/deprecated.lua b/xmake/core/base/deprecated.lua
index 5279e81bc..89702a89a 100644
--- a/xmake/core/base/deprecated.lua
+++ b/xmake/core/base/deprecated.lua
@@ -39,7 +39,7 @@ function deprecated.add(newformat, oldformat, ...)
-- the old and new entries
local old = string.format(oldformat, ...)
- local new = string.format(newformat, ...)
+ local new = newformat and string.format(newformat, ...) or false
-- add it
deprecated._ENTRIES[old] = new
@@ -61,7 +61,11 @@ function deprecated.dump()
end
-- trace
- utils.cprint("${bright color.warning}deprecated: ${clear}please uses %s instead of %s", new, old)
+ if new then
+ utils.cprint("${bright color.warning}deprecated: ${clear}please uses %s instead of %s", new, old)
+ else
+ utils.cprint("${bright color.warning}deprecated: ${clear}please remove %s", old)
+ end
-- too much?
if index > 6 and not option.get("verbose") then