diff options
| author | ruki <[email protected]> | 2016-08-06 13:02:28 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-08-06 13:02:28 +0800 |
| commit | ce3b9ada065d09d2d771061b20f07fc1d661c648 (patch) | |
| tree | 9add68684c5e7383f69db71d1903ee9352dd7537 | |
| parent | e4cb396b6c4b33932d5f953b9cf20fbf22231ce4 (diff) | |
add vs2005 and vs2008 empty plugin
| -rwxr-xr-x | xmake/plugins/project/main.lua | 15 | ||||
| -rwxr-xr-x | xmake/plugins/project/makefile/makefile.lua (renamed from xmake/plugins/project/makefile.lua) | 4 | ||||
| -rwxr-xr-x | xmake/plugins/project/vstudio/vs2005.lua | 35 | ||||
| -rwxr-xr-x | xmake/plugins/project/vstudio/vs2008.lua | 35 | ||||
| -rwxr-xr-x | xmake/plugins/project/xmake.lua | 4 |
5 files changed, 81 insertions, 12 deletions
diff --git a/xmake/plugins/project/main.lua b/xmake/plugins/project/main.lua index d65035c32..69ac16a8e 100755 --- a/xmake/plugins/project/main.lua +++ b/xmake/plugins/project/main.lua @@ -26,14 +26,9 @@ import("core.project.config") import("core.project.global") import("core.project.project") import("core.platform.platform") -import("makefile") - --- make makefile -function _make_makefile(outputdir) - - -- make makefile - makefile.make(path.join(outputdir, "makefile")) -end +import("makefile.makefile") +import("vstudio.vs2005") +import("vstudio.vs2008") -- make project function _make(kind) @@ -41,7 +36,9 @@ function _make(kind) -- the maps local maps = { - makefile = _make_makefile + makefile = makefile.make + , vs2005 = vs2005.make + , vs2008 = vs2008.make } assert(maps[kind], "the project kind(%s) is not supported!", kind) diff --git a/xmake/plugins/project/makefile.lua b/xmake/plugins/project/makefile/makefile.lua index 1068d49a9..38837490c 100755 --- a/xmake/plugins/project/makefile.lua +++ b/xmake/plugins/project/makefile/makefile.lua @@ -217,7 +217,7 @@ function _make_all(makefile) end -- make -function make(outputfile) +function make(outputdir) -- enter project directory local olddir = os.cd(project.directory()) @@ -226,7 +226,7 @@ function make(outputfile) os.rm(_logfile()) -- open the makefile - local makefile = io.open(outputfile, "w") + local makefile = io.open(path.join(outputdir, "makefile"), "w") -- make all _make_all(makefile) diff --git a/xmake/plugins/project/vstudio/vs2005.lua b/xmake/plugins/project/vstudio/vs2005.lua new file mode 100755 index 000000000..14a6808ad --- /dev/null +++ b/xmake/plugins/project/vstudio/vs2005.lua @@ -0,0 +1,35 @@ +--!The Make-like Build Utility based on Lua +-- +-- XMake is free software; you can redistribute it and/or modify +-- it under the terms of the GNU Lesser General Public License as published by +-- the Free Software Foundation; either version 2.1 of the License, or +-- (at your option) any later version. +-- +-- XMake is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public License +-- along with XMake; +-- If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a> +-- +-- Copyright (C) 2015 - 2016, ruki All rights reserved. +-- +-- @author ruki +-- @file vs2005.lua +-- + +-- imports +import("core.project.project") + +-- make +function make(outputdir) + + -- enter project directory + local olddir = os.cd(project.directory()) + + + -- leave project directory + os.cd(olddir) +end diff --git a/xmake/plugins/project/vstudio/vs2008.lua b/xmake/plugins/project/vstudio/vs2008.lua new file mode 100755 index 000000000..8c1804e36 --- /dev/null +++ b/xmake/plugins/project/vstudio/vs2008.lua @@ -0,0 +1,35 @@ +--!The Make-like Build Utility based on Lua +-- +-- XMake is free software; you can redistribute it and/or modify +-- it under the terms of the GNU Lesser General Public License as published by +-- the Free Software Foundation; either version 2.1 of the License, or +-- (at your option) any later version. +-- +-- XMake is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public License +-- along with XMake; +-- If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a> +-- +-- Copyright (C) 2015 - 2016, ruki All rights reserved. +-- +-- @author ruki +-- @file vs2008.lua +-- + +-- imports +import("core.project.project") + +-- make +function make(outputdir) + + -- enter project directory + local olddir = os.cd(project.directory()) + + + -- leave project directory + os.cd(olddir) +end diff --git a/xmake/plugins/project/xmake.lua b/xmake/plugins/project/xmake.lua index da041dbf5..b215a4b28 100755 --- a/xmake/plugins/project/xmake.lua +++ b/xmake/plugins/project/xmake.lua @@ -41,7 +41,9 @@ task("project") , options = { {'k', "kind", "kv", "makefile", "Set the project kind." - , " - makefile" } + , " - makefile" + , " - vs2005" + , " - vs2008" } , {nil, "outputdir", "v", ".", "Set the output directory." } } }) |
