summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2016-02-25 08:37:01 +0800
committerruki <[email protected]>2016-02-25 08:38:24 +0800
commit3456f0e1f8fb59aed918075250b2f112b91a2255 (patch)
treefe60cd34b068aa1fd49c755b38675794a3150800
parent01ab81520540901f97fe3581bc4a3d7c3bb21e30 (diff)
optimizate the menu of task
-rw-r--r--xmake/core/base/task.lua9
-rwxr-xr-xxmake/core/tasks/build.lua9
-rwxr-xr-xxmake/core/tasks/config.lua7
-rwxr-xr-xxmake/core/tasks/create.lua6
-rwxr-xr-xxmake/core/tasks/install.lua8
-rwxr-xr-xxmake/core/tasks/lua.lua10
-rwxr-xr-xxmake/core/tasks/package.lua9
-rwxr-xr-xxmake/core/tasks/run.lua7
-rwxr-xr-xxmake/core/tasks/uninstall.lua10
-rwxr-xr-xxmake/plugins/doxygen.lua10
-rwxr-xr-xxmake/plugins/macro.lua16
11 files changed, 14 insertions, 87 deletions
diff --git a/xmake/core/base/task.lua b/xmake/core/base/task.lua
index 14caf1741..d7893d674 100644
--- a/xmake/core/base/task.lua
+++ b/xmake/core/base/task.lua
@@ -140,10 +140,17 @@ function task.menu()
-- add common options
local options = taskinfo.menu.options
if options then
- table.insert(options, 1, {'v', "verbose", "k", nil, "Print lots of verbose information." })
+ table.insert(options, 1, {'v', "verbose", "k", nil, "Print lots of verbose information." })
table.insert(options, 2, {nil, "version", "k", nil, "Print the version number and exit." })
table.insert(options, 3, {'h', "help", "k", nil, "Print this help message and exit." })
table.insert(options, 4, {})
+ table.insert(options, 5, {'f', "file", "kv", nil, "Read a given xmake.lua file." })
+ table.insert(options, 6, {'P', "project", "kv", nil, "Change to the given project directory."
+ , "Search priority:"
+ , " 1. The Given Command Argument"
+ , " 2. The Envirnoment Variable: XMAKE_PROJECT_DIR"
+ , " 3. The Current Directory" })
+ table.insert(options, 7, {})
end
-- main?
diff --git a/xmake/core/tasks/build.lua b/xmake/core/tasks/build.lua
index abe643e93..82d2a2352 100755
--- a/xmake/core/tasks/build.lua
+++ b/xmake/core/tasks/build.lua
@@ -20,15 +20,6 @@ task("build")
, {'r', "rebuild", "k", nil, "Rebuild the project." }
, {}
- , {'f', "file", "kv", "xmake.lua", "Read a given xmake.lua file." }
- , {'P', "project", "kv", nil, "Change to the given project directory."
- , "Search priority:"
- , " 1. The Given Command Argument"
- , " 2. The Envirnoment Variable: XMAKE_PROJECT_DIR"
- , " 3. The Current Directory" }
-
-
- , {}
, {'j', "jobs", "kv", nil, "Specifies the number of jobs to build simultaneously" }
, {}
diff --git a/xmake/core/tasks/config.lua b/xmake/core/tasks/config.lua
index 75aa332b1..29426bef9 100755
--- a/xmake/core/tasks/config.lua
+++ b/xmake/core/tasks/config.lua
@@ -125,13 +125,6 @@ task("config")
-- the options for all platforms
-- , function () return platform.menu("config") end
- , {}
- , {'f', "file", "kv", "xmake.lua", "Read a given xmake.lua file." }
- , {'P', "project", "kv", nil, "Change to the given project directory."
- , "Search priority:"
- , " 1. The Given Command Argument"
- , " 2. The Envirnoment Variable: XMAKE_PROJECT_DIR"
- , " 3. The Current Directory" }
, {'o', "buildir", "kv", "build", "Set the build directory." }
diff --git a/xmake/core/tasks/create.lua b/xmake/core/tasks/create.lua
index ab106add4..a38989de0 100755
--- a/xmake/core/tasks/create.lua
+++ b/xmake/core/tasks/create.lua
@@ -38,12 +38,6 @@ task("create")
, options =
{
{'n', "name", "kv", nil, "The project name." }
- , {'f', "file", "kv", "xmake.lua", "Create a given xmake.lua file." }
- , {'P', "project", "kv", nil, "Create from the given project directory."
- , "Search priority:"
- , " 1. The Given Command Argument"
- , " 2. The Envirnoment Variable: XMAKE_PROJECT_DIR"
- , " 3. The Current Directory" }
--[[ , {'l', "language", "kv", "c", "The project language"
, function ()
local descriptions = {}
diff --git a/xmake/core/tasks/install.lua b/xmake/core/tasks/install.lua
index 13df7b4c3..db11df04a 100755
--- a/xmake/core/tasks/install.lua
+++ b/xmake/core/tasks/install.lua
@@ -40,13 +40,7 @@ task("install")
-- options
, options =
{
- {'f', "file", "kv", "xmake.lua", "Read a given xmake.lua file." }
- , {'P', "project", "kv", nil, "Change to the given project directory."
- , "Search priority:"
- , " 1. The Given Command Argument"
- , " 2. The Envirnoment Variable: XMAKE_PROJECT_DIR"
- , " 3. The Current Directory" }
- , {'o', "installdir", "kv", nil, "Set the install directory." }
+ {'o', "installdir", "kv", nil, "Set the install directory." }
, {}
, {nil, "target", "v", "all", "Install the given target." }
diff --git a/xmake/core/tasks/lua.lua b/xmake/core/tasks/lua.lua
index 8447bd6be..0a7b4b6fa 100755
--- a/xmake/core/tasks/lua.lua
+++ b/xmake/core/tasks/lua.lua
@@ -40,15 +40,7 @@ task("lua")
-- options
, options =
{
- {'f', "file", "kv", nil, "Read a given xmake.lua file." }
- , {'P', "project", "kv", nil, "Change to the given project directory."
- , "Search priority:"
- , " 1. The Given Command Argument"
- , " 2. The Envirnoment Variable: XMAKE_PROJECT_DIR"
- , " 3. The Current Directory" }
-
- , {}
- , {'s', "string", "k", nil, "Run the lua string script." }
+ {'s', "string", "k", nil, "Run the lua string script." }
, {}
, {nil, "script", "v", nil, "Run the given lua script."
diff --git a/xmake/core/tasks/package.lua b/xmake/core/tasks/package.lua
index 1fad0ac65..ef2db6cd1 100755
--- a/xmake/core/tasks/package.lua
+++ b/xmake/core/tasks/package.lua
@@ -60,14 +60,7 @@ task("package")
return descriptions
end }]]
- , {}
- , {'f', "file", "kv", "xmake.lua", "Create a given xmake.lua file." }
- , {'P', "project", "kv", nil, "Create from the given project directory."
- , "Search priority:"
- , " 1. The Given Command Argument"
- , " 2. The Envirnoment Variable: XMAKE_PROJECT_DIR"
- , " 3. The Current Directory" }
- , {'o', "outputdir", "kv", nil, "Set the output directory." }
+ {'o', "outputdir", "kv", nil, "Set the output directory." }
, {}
, {nil, "target", "v", "all", "Package a given target" }
diff --git a/xmake/core/tasks/run.lua b/xmake/core/tasks/run.lua
index 459e54856..6353c8511 100755
--- a/xmake/core/tasks/run.lua
+++ b/xmake/core/tasks/run.lua
@@ -44,13 +44,6 @@ task("run")
, {nil, "debugger", "kv", "auto", "Set the debugger path." }
, {}
- , {'f', "file", "kv", "xmake.lua", "Read a given xmake.lua file." }
- , {'P', "project", "kv", nil, "Change to the given project directory."
- , "Search priority:"
- , " 1. The Given Command Argument"
- , " 2. The Envirnoment Variable: XMAKE_PROJECT_DIR"
- , " 3. The Current Directory" }
- , {}
, {nil, "target", "v", nil, "Run the given target." }
, {nil, "arguments", "vs", nil, "The target arguments" }
}
diff --git a/xmake/core/tasks/uninstall.lua b/xmake/core/tasks/uninstall.lua
index 4ae188adb..992cf3a91 100755
--- a/xmake/core/tasks/uninstall.lua
+++ b/xmake/core/tasks/uninstall.lua
@@ -40,15 +40,7 @@ task("uninstall")
-- options
, options =
{
- {'f', "file", "kv", "xmake.lua", "Read a given xmake.lua file." }
- , {'P', "project", "kv", nil, "Change to the given project directory."
- , "Search priority:"
- , " 1. The Given Command Argument"
- , " 2. The Envirnoment Variable: XMAKE_PROJECT_DIR"
- , " 3. The Current Directory" }
-
- , {}
- , {nil, "target", "v", "all", "Install the given target." }
+ {nil, "target", "v", "all", "Install the given target." }
}
})
diff --git a/xmake/plugins/doxygen.lua b/xmake/plugins/doxygen.lua
index 431735067..e66072732 100755
--- a/xmake/plugins/doxygen.lua
+++ b/xmake/plugins/doxygen.lua
@@ -37,15 +37,7 @@ task("doxygen")
-- options
, options =
{
- {'f', "file", "kv", nil, "Read a given xmake.lua file." }
- , {'P', "project", "kv", nil, "Change to the given project directory."
- , "Search priority:"
- , " 1. The Given Command Argument"
- , " 2. The Envirnoment Variable: XMAKE_PROJECT_DIR"
- , " 3. The Current Directory" }
-
- , {}
- , {nil, "name", "v", "all", "Configure for the given document name." }
+ {nil, "name", "v", "all", "Configure for the given document name." }
}
})
diff --git a/xmake/plugins/macro.lua b/xmake/plugins/macro.lua
index 4edcccc79..53d2dd82e 100755
--- a/xmake/plugins/macro.lua
+++ b/xmake/plugins/macro.lua
@@ -40,20 +40,6 @@ task("macro")
-- options
, options =
{
- {'f', "file", "kv", nil, "Read a given xmake.lua file." }
- , {'P', "project", "kv", nil, "Change to the given project directory."
- , "Search priority:"
- , " 1. The Given Command Argument"
- , " 2. The Envirnoment Variable: XMAKE_PROJECT_DIR"
- , " 3. The Current Directory" }
-
- , {}
- , {'v', "verbose", "k", nil, "Print lots of verbose information." }
- , {nil, "version", "k", nil, "Print the version number and exit." }
- , {'h', "help", "k", nil, "Print this help message and exit." }
-
- , {}
- , {nil, "name", "v", nil, "Configure for the given macro name." }
-
+ {nil, "name", "v", nil, "Configure for the given macro name." }
}
})