diff options
| author | ruki <[email protected]> | 2016-02-24 16:55:27 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-02-24 16:55:27 +0800 |
| commit | 00958c7b39c53a7e597ff6705ae9b1e2baeece4b (patch) | |
| tree | 4951b66e8fdcbdd35bd102740bda2dea21b571b8 | |
| parent | dae473cb200c72b9cd94fcfe04c431e59837012f (diff) | |
add some common options
| -rw-r--r-- | xmake/core/base/task.lua | 9 | ||||
| -rwxr-xr-x | xmake/core/tasks/build.lua | 5 | ||||
| -rwxr-xr-x | xmake/core/tasks/config.lua | 5 | ||||
| -rwxr-xr-x | xmake/core/tasks/lua.lua | 5 | ||||
| -rwxr-xr-x | xmake/plugins/doxygen.lua | 5 |
5 files changed, 10 insertions, 19 deletions
diff --git a/xmake/core/base/task.lua b/xmake/core/base/task.lua index 333f58edc..0237d62ee 100644 --- a/xmake/core/base/task.lua +++ b/xmake/core/base/task.lua @@ -137,6 +137,15 @@ function task.menu() -- has menu? if taskinfo.menu then + -- 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, 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, {}) + end + -- main? if taskinfo.category == "main" then menu.main = taskinfo.menu diff --git a/xmake/core/tasks/build.lua b/xmake/core/tasks/build.lua index 43ea3f7e8..7c18028d3 100755 --- a/xmake/core/tasks/build.lua +++ b/xmake/core/tasks/build.lua @@ -33,10 +33,7 @@ task("build") , {} , {'j', "jobs", "kv", nil, "Specifies the number of jobs to build simultaneously" } - , {'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, "target", "v", "all", "Build the given target." } } diff --git a/xmake/core/tasks/config.lua b/xmake/core/tasks/config.lua index add0a3c59..6921c1c81 100755 --- a/xmake/core/tasks/config.lua +++ b/xmake/core/tasks/config.lua @@ -114,11 +114,6 @@ task("config") , {} - , {'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, "target", "v", "all", "Configure for the given target." } } }) diff --git a/xmake/core/tasks/lua.lua b/xmake/core/tasks/lua.lua index 8258e5033..22aac6eea 100755 --- a/xmake/core/tasks/lua.lua +++ b/xmake/core/tasks/lua.lua @@ -29,11 +29,6 @@ task("lua") , {'s', "string", "k", nil, "Run the lua string script." } , {} - , {'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, "script", "v", nil, "Run the given lua script." , " - The script name from the xmake tool directory" , " - The script file" diff --git a/xmake/plugins/doxygen.lua b/xmake/plugins/doxygen.lua index 14e4a9b14..2388efbd8 100755 --- a/xmake/plugins/doxygen.lua +++ b/xmake/plugins/doxygen.lua @@ -23,11 +23,6 @@ task("doxygen") , " 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", "all", "Configure for the given document name." } } |
