diff options
| -rw-r--r-- | xmake/actions/build/xmake.lua | 3 | ||||
| -rw-r--r-- | xmake/core/base/task.lua | 12 |
2 files changed, 3 insertions, 12 deletions
diff --git a/xmake/actions/build/xmake.lua b/xmake/actions/build/xmake.lua index 5fdfe4522..8cdbb953b 100644 --- a/xmake/actions/build/xmake.lua +++ b/xmake/actions/build/xmake.lua @@ -27,7 +27,8 @@ task("build") , shortname = 'b' , options = { - {'b', "build", "k", nil , "Build target. This is default building mode and optional." } + {nil, "version", "k", nil , "Print the version number and exit." } + , {'b', "build", "k", nil , "Build target. This is default building mode and optional." } , {'r', "rebuild", "k", nil , "Rebuild the target." } , {'a', "all", "k", nil , "Build all targets." } , {nil, "shallow", "k", nil , "Only re-build the given targets without dependencies." } diff --git a/xmake/core/base/task.lua b/xmake/core/base/task.lua index 8c361463b..deea228aa 100644 --- a/xmake/core/base/task.lua +++ b/xmake/core/base/task.lua @@ -46,7 +46,6 @@ function task.common_options() , {'D', "diagnosis", "k", nil, "Print lots of diagnosis information (backtrace, check info ..) only for developers." , "And we can append -v to get more whole information." , " e.g. $ xmake -vD" } - , {nil, "version", "k", nil, "Print the version number and exit." } , {'h', "help", "k", nil, "Print this help message and exit." } , {} , {'F', "file", "kv", nil, "Read a given xmake.lua file." } @@ -424,8 +423,6 @@ function task.menu(tasks) -- has task menu? local taskmenu = taskinst:get("menu") if taskmenu then - - -- main? if taskinst:get("category") == "main" then -- delay to load main menu @@ -440,22 +437,15 @@ function task.menu(tasks) -- make tasks for the main menu mainmenu.tasks = {} for name, inst in pairs(tasks) do - - -- has menu? local m = inst:get("menu") if m then - - -- add task - mainmenu.tasks[name] = - { + mainmenu.tasks[name] = { category = inst:get("category") , shortname = m.shortname , description = m.description } end end - - -- ok return mainmenu end end |
