Skip to content

Rename gmake to gmakelegacy #2404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions modules/gmake/_manifest.lua

This file was deleted.

4 changes: 4 additions & 0 deletions modules/gmake2/_preload.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
dotnet = { "mono", "msnet", "pnet" }
},

aliases = {
"gmake",
},

onInitialize = function()
require("gmake2")
p.modules.gmake2.cpp.initialize()
Expand Down
9 changes: 9 additions & 0 deletions modules/gmakelegacy/_manifest.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
return {
"_preload.lua",
"gmakelegacy.lua",
"gmakelegacy_cpp.lua",
"gmakelegacy_csharp.lua",
"gmakelegacy_makefile.lua",
"gmakelegacy_utility.lua",
"gmakelegacy_workspace.lua",
}
26 changes: 13 additions & 13 deletions modules/gmake/_preload.lua → modules/gmakelegacy/_preload.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
---

newaction {
trigger = "gmake",
shortname = "GNU Make",
trigger = "gmakelegacy",
shortname = "GNU Make (Legacy)",
description = "Generate GNU makefiles for POSIX, MinGW, and Cygwin",
toolset = defaultToolset(),

Expand All @@ -36,36 +36,36 @@
},

onWorkspace = function(wks)
p.escaper(p.make.esc)
p.escaper(p.makelegacy.esc)
wks.projects = table.filter(wks.projects, function(prj) return p.action.supports(prj.kind) and prj.kind ~= p.NONE end)
p.generate(wks, p.make.getmakefilename(wks, false), p.make.generate_workspace)
p.generate(wks, p.makelegacy.getmakefilename(wks, false), p.makelegacy.generate_workspace)
end,

onProject = function(prj)
p.escaper(p.make.esc)
local makefile = p.make.getmakefilename(prj, true)
p.escaper(p.makelegacy.esc)
local makefile = p.makelegacy.getmakefilename(prj, true)

if not p.action.supports(prj.kind) or prj.kind == p.NONE then
return
elseif prj.kind == p.UTILITY then
p.generate(prj, makefile, p.make.utility.generate)
p.generate(prj, makefile, p.makelegacy.utility.generate)
elseif prj.kind == p.MAKEFILE then
p.generate(prj, makefile, p.make.makefile.generate)
p.generate(prj, makefile, p.makelegacy.makefile.generate)
else
if project.isdotnet(prj) then
p.generate(prj, makefile, p.make.cs.generate)
p.generate(prj, makefile, p.makelegacy.cs.generate)
elseif project.isc(prj) or project.iscpp(prj) then
p.generate(prj, makefile, p.make.cpp.generate)
p.generate(prj, makefile, p.makelegacy.cpp.generate)
end
end
end,

onCleanWorkspace = function(wks)
p.clean.file(wks, p.make.getmakefilename(wks, false))
p.clean.file(wks, p.makelegacy.getmakefilename(wks, false))
end,

onCleanProject = function(prj)
p.clean.file(prj, p.make.getmakefilename(prj, true))
p.clean.file(prj, p.makelegacy.getmakefilename(prj, true))
end
}

Expand All @@ -75,5 +75,5 @@
--

return function(cfg)
return (_ACTION == "gmake")
return (_ACTION == "gmakelegacy")
end
20 changes: 10 additions & 10 deletions modules/gmake/gmake.lua → modules/gmakelegacy/gmakelegacy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

local p = premake

p.modules.gmake = {}
p.modules.gmake._VERSION = p._VERSION
p.modules.gmakelegacy = {}
p.modules.gmakelegacy._VERSION = p._VERSION

-- for backwards compatibility.
p.make = p.modules.gmake
p.makelegacy = p.modules.gmakelegacy

local make = p.make
local make = p.makelegacy
local project = p.project

--
Expand Down Expand Up @@ -293,10 +293,10 @@
end


include("gmake_cpp.lua")
include("gmake_csharp.lua")
include("gmake_makefile.lua")
include("gmake_utility.lua")
include("gmake_workspace.lua")
include("gmakelegacy_cpp.lua")
include("gmakelegacy_csharp.lua")
include("gmakelegacy_makefile.lua")
include("gmakelegacy_utility.lua")
include("gmakelegacy_workspace.lua")

return p.modules.gmake
return p.modules.gmakelegacy
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

local p = premake

p.make.cpp = {}
p.makelegacy.cpp = {}

local make = p.make
local cpp = p.make.cpp
local make = p.makelegacy
local cpp = p.makelegacy.cpp
local project = p.project
local config = p.config
local fileconfig = p.fileconfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
--

local p = premake
p.make.cs = {}
local make = p.make
local cs = p.make.cs
p.makelegacy.cs = {}
local make = p.makelegacy
local cs = p.makelegacy.cs
local project = p.project
local config = p.config
local fileconfig = p.fileconfig
Expand Down Expand Up @@ -236,15 +236,15 @@
for cfg in p.eachconfig(prj) do
_x('ifneq (,$(findstring %s,$(config)))', cfg.name:lower())
for target, source in pairs(cfgpairs[cfg]) do
p.make_copyrule(source, target)
p.makelegacy_copyrule(source, target)
end
_p('endif')
_p('')
end

_p('# Copied file rules')
for target, source in pairs(copypairs) do
p.make_copyrule(source, target)
p.makelegacy_copyrule(source, target)
end

_p('# Embedded file rules')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
--

local p = premake
p.make.makefile = {}
p.makelegacy.makefile = {}

local make = p.make
local makefile = p.make.makefile
local make = p.makelegacy
local makefile = p.makelegacy.makefile
local project = p.project
local config = p.config
local fileconfig = p.fileconfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
--

local p = premake
p.make.utility = {}
p.makelegacy.utility = {}

local make = p.make
local utility = p.make.utility
local make = p.makelegacy
local utility = p.makelegacy.utility
local project = p.project
local config = p.config
local fileconfig = p.fileconfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
--

local p = premake
local make = p.make
local make = p.makelegacy
local tree = p.tree
local project = p.project

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require ("gmake")
require ("gmakelegacy")

return {
-- Makefile tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

local p = premake
local suite = test.declare("make_clang")
local make = p.make
local cpp = p.make.cpp
local make = p.makelegacy
local cpp = p.makelegacy.cpp
local project = p.project


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

local p = premake
local suite = test.declare("make_cpp_file_rules")
local make = p.make
local make = p.makelegacy
local project = p.project


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

local p = premake
local suite = test.declare("make_flags")
local make = p.make
local make = p.makelegacy
local project = p.project


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

local p = premake
local suite = test.declare("make_ldflags")
local make = p.make
local make = p.makelegacy


--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

local p = premake
local suite = test.declare("make_linking")
local make = p.make
local make = p.makelegacy
local project = p.project


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

local p = premake
local suite = test.declare("make_pch")
local make = p.make
local make = p.makelegacy
local project = p.project


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

local function prepare()
prj = test.getproject(wks, 1)
p.make.cppObjects(prj)
p.makelegacy.cppObjects(prj)
end


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

local p = premake
local suite = test.declare("make_cpp_target_rules")
local make = p.make
local make = p.makelegacy
local project = p.project


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

local p = premake
local suite = test.declare("make_tools")
local make = p.make
local cpp = p.make.cpp
local make = p.makelegacy
local cpp = p.makelegacy.cpp
local project = p.project


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

local p = premake
local suite = test.declare("make_wiidev")
local make = p.make
local make = p.makelegacy
local project = p.project


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

local p = premake
local suite = test.declare("make_cs_embed_files")
local make = p.make
local cs = p.make.cs
local make = p.makelegacy
local cs = p.makelegacy.cs
local project = p.project


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

local p = premake
local suite = test.declare("make_cs_flags")
local make = p.make
local cs = p.make.cs
local make = p.makelegacy
local cs = p.makelegacy.cs
local project = p.project


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

local p = premake
local suite = test.declare("make_cs_links")
local make = p.make
local cs = p.make.cs
local make = p.makelegacy
local cs = p.makelegacy.cs
local project = p.project

--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

local p = premake
local suite = test.declare("make_cs_response")
local make = p.make
local make = p.makelegacy


--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

local p = premake
local suite = test.declare("make_cs_sources")
local make = p.make
local cs = p.make.cs
local make = p.makelegacy
local cs = p.makelegacy.cs
local project = p.project


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

local p = premake
local suite = test.declare("make_escaping")
local make = p.make
local make = p.makelegacy


function suite.Escapes_Spaces()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

local p = premake
local suite = test.declare("make_tovar")
local make = p.make
local make = p.makelegacy


--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

local p = premake
local suite = test.declare("make_config_maps")
local make = p.make
local make = p.makelegacy


--
Expand Down
Loading
Loading