Fix deprecated action message

This commit is contained in:
Jason Perkins 2012-11-29 10:23:52 -05:00
parent 3dd3166c14
commit 5f338b665f
2 changed files with 7 additions and 2 deletions

View File

@ -39,8 +39,7 @@
-- The "next-gen" actions have now replaced their deprecated counterparts.
-- Provide a warning for a little while before I remove them entirely.
if _ACTION:endswith("ng") then
_ACTION = _ACTION:sub(1, -3)
print(string.format("** Warning: '%sng' has been deprecated; use '%s' instead", _ACTION, _ACTION))
print(string.format("** Warning: '%s' has been deprecated; use '%s' instead", _ACTION, _ACTION:sub(1, -3)))
end
-- Set up the environment for the chosen action early, so side-effects

View File

@ -109,6 +109,11 @@
--
function premake.action.get(name)
-- "Next-gen" actions are deprecated
if name:endswith("ng") then
name = name:sub(1, -3)
end
return premake.action.list[name]
end
@ -142,6 +147,7 @@
function premake.action.set(name)
_ACTION = name
-- Some actions imply a particular operating system
local action = premake.action.get(name)
if action then