Skip to content

Commit af7b674

Browse files
committed
Move core modules into main repository; drop submodules
As discussed numerous times, get rid of the submodule approach for core modules and just included the sources directly in the main repository. I have no idea how this will play with existing working copies. It might be necessary to [manually clear out the existing submodules](http://stackoverflow.com/questions/1260748) first.
1 parent 71be275 commit af7b674

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+8015
-16
lines changed

.gitmodules

Lines changed: 0 additions & 12 deletions
This file was deleted.

modules/codelite

Lines changed: 0 additions & 1 deletion
This file was deleted.

modules/codelite/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Premake extension to support the [CodeLite](http://www.codelite.org/) IDE
2+
3+
### Features ###
4+
5+
* Support for C/C++ language projects
6+
7+
### Usage ###
8+
9+
Simply generate your project using the `codelite` action:
10+
```bash
11+
premake5 codelite
12+
```
13+
and open the generated project file in CodeLite.

modules/codelite/_manifest.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
return {
2+
"_preload.lua",
3+
"codelite.lua",
4+
"codelite_workspace.lua",
5+
"codelite_project.lua",
6+
}

modules/codelite/_preload.lua

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
--
2+
-- Name: codelite/_preload.lua
3+
-- Purpose: Define the CodeLite action.
4+
-- Author: Ryan Pusztai
5+
-- Modified by: Andrea Zanellato
6+
-- Andrew Gough
7+
-- Manu Evans
8+
-- Created: 2013/05/06
9+
-- Copyright: (c) 2008-2015 Jason Perkins and the Premake project
10+
--
11+
12+
local p = premake
13+
14+
newaction
15+
{
16+
-- Metadata for the command line and help system
17+
18+
trigger = "codelite",
19+
shortname = "CodeLite",
20+
description = "Generate CodeLite project files",
21+
22+
-- The capabilities of this action
23+
24+
valid_kinds = { "ConsoleApp", "WindowedApp", "Makefile", "SharedLib", "StaticLib", "Utility" },
25+
valid_languages = { "C", "C++" },
26+
valid_tools = {
27+
cc = { "gcc", "clang", "msc" }
28+
},
29+
30+
-- Workspace and project generation logic
31+
32+
onWorkspace = function(wks)
33+
p.modules.codelite.generateWorkspace(wks)
34+
end,
35+
onProject = function(prj)
36+
p.modules.codelite.generateProject(prj)
37+
end,
38+
39+
onCleanWorkspace = function(wks)
40+
p.modules.codelite.cleanWorkspace(wks)
41+
end,
42+
onCleanProject = function(prj)
43+
p.modules.codelite.cleanProject(prj)
44+
end,
45+
onCleanTarget = function(prj)
46+
p.modules.codelite.cleanTarget(prj)
47+
end,
48+
}
49+
50+
51+
--
52+
-- Decide when the full module should be loaded.
53+
--
54+
55+
return function(cfg)
56+
return (_ACTION == "codelite")
57+
end

modules/codelite/codelite.lua

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
--
2+
-- Name: codelite/codelite.lua
3+
-- Purpose: Define the CodeLite action(s).
4+
-- Author: Ryan Pusztai
5+
-- Modified by: Andrea Zanellato
6+
-- Andrew Gough
7+
-- Manu Evans
8+
-- Created: 2013/05/06
9+
-- Copyright: (c) 2008-2015 Jason Perkins and the Premake project
10+
--
11+
12+
local p = premake
13+
14+
p.modules.codelite = {}
15+
p.modules.codelite._VERSION = p._VERSION
16+
17+
local codelite = p.modules.codelite
18+
local project = p.project
19+
20+
21+
function codelite.cfgname(cfg)
22+
local cfgname = cfg.buildcfg
23+
if codelite.workspace.multiplePlatforms then
24+
cfgname = string.format("%s|%s", cfg.platform, cfg.buildcfg)
25+
end
26+
return cfgname
27+
end
28+
29+
function codelite.esc(value)
30+
local result = value:gsub('"', '\\"')
31+
result = result:gsub('<', '&lt;')
32+
result = result:gsub('>', '&gt;')
33+
return result
34+
end
35+
36+
function codelite.generateWorkspace(wks)
37+
p.eol("\r\n")
38+
p.indent(" ")
39+
p.escaper(codelite.esc)
40+
41+
p.generate(wks, ".workspace", codelite.workspace.generate)
42+
end
43+
44+
function codelite.generateProject(prj)
45+
p.eol("\r\n")
46+
p.indent(" ")
47+
p.escaper(codelite.esc)
48+
49+
if project.iscpp(prj) then
50+
p.generate(prj, ".project", codelite.project.generate)
51+
end
52+
end
53+
54+
function codelite.cleanWorkspace(wks)
55+
p.clean.file(wks, wks.name .. ".workspace")
56+
p.clean.file(wks, wks.name .. "_wsp.mk")
57+
p.clean.file(wks, wks.name .. ".tags")
58+
p.clean.file(wks, ".clang")
59+
end
60+
61+
function codelite.cleanProject(prj)
62+
p.clean.file(prj, prj.name .. ".project")
63+
p.clean.file(prj, prj.name .. ".mk")
64+
p.clean.file(prj, prj.name .. ".list")
65+
p.clean.file(prj, prj.name .. ".out")
66+
end
67+
68+
function codelite.cleanTarget(prj)
69+
-- TODO..
70+
end
71+
72+
include("codelite_workspace.lua")
73+
include("codelite_project.lua")
74+
75+
return codelite

0 commit comments

Comments
 (0)