summaryrefslogtreecommitdiff
path: root/xmake/plugins/macro/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-05-31 20:18:34 +0800
committerruki <[email protected]>2016-05-31 20:18:34 +0800
commita976651039f008aa7e0e7ec6cfee57bfb2aea6fa (patch)
treeee79d06f607042c95c11e84bad519677be414ddb /xmake/plugins/macro/xmake.lua
parent5769dba5932aad3a97c8db36c80a15064b71f556 (diff)
impl macro plugin
Diffstat (limited to 'xmake/plugins/macro/xmake.lua')
-rwxr-xr-xxmake/plugins/macro/xmake.lua31
1 files changed, 30 insertions, 1 deletions
diff --git a/xmake/plugins/macro/xmake.lua b/xmake/plugins/macro/xmake.lua
index d0148bddc..dc4f9ca1a 100755
--- a/xmake/plugins/macro/xmake.lua
+++ b/xmake/plugins/macro/xmake.lua
@@ -26,6 +26,9 @@ task("macro")
-- set category
set_category("plugin")
+ -- on run
+ on_run("main")
+
-- set menu
set_menu({
-- usage
@@ -40,6 +43,32 @@ task("macro")
-- options
, options =
{
- {nil, "name", "v", nil, "Configure for the given macro name." }
+ {'b', "begin", "k", nil, "Start to record macro."
+ , ".e.g"
+ , "Record macro with name: test"
+ , " xmake macro --begin"
+ , " xmake config --plat=macosx"
+ , " xmake clean"
+ , " xmake -r"
+ , " xmake package"
+ , " xmake macro --end test" }
+ , {'e', "end", "k", nil, "Stop to record macro." }
+ , {}
+ , {nil, "show", "k", nil, "Show the content of the given macro." }
+ , {'l', "list", "k", nil, "List all macros." }
+ , {'d', "delete", "k", nil, "Delete the given macro." }
+ , {}
+ , {nil, "import", "kv", nil, "Import the given macro file."
+ , ".e.g"
+ , " xmake macro --import=/xxx/macro.lua test" }
+ , {nil, "export", "kv", nil, "Export the given macro to file."
+ , ".e.g"
+ , " xmake macro --export=/xxx/macro.lua test" }
+ , {}
+ , {'a', "argv", "kv", nil, "Set the macro arguments." }
+ , {nil, "name", "v", ".", "The given macro name."
+ , ".e.g"
+ , " Run the given macro: xmake macro test"
+ , " Run the anonymous macro: xmake macro ." }
}
})