Skip to content
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

Rename gmake2 to gmake #2408

Merged
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/report-a-bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Please provide a [minimal, reproducible example](https://stackoverflow.com/help/
- [ ] Visual Studio 2008 (vs2008)
- [ ] Visual Studio 2005 (vs2005)
- [ ] GNU Makefile (gmake)
- [ ] GNU Makefile 2 (gmake2)
- [ ] GNU Makefile Legacy (gmakelegacy)
- [ ] XCode (xcode)
- [ ] Codelite
- [ ] Other (Please list below)
Expand Down
6 changes: 3 additions & 3 deletions BUILD.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ BUILDING FROM A SOURCE PACKAGE
officially supported toolsets in the build/ folder. Build the release
configuration and you will be ready to go. For makefiles:

$ cd build/gmake2.unix
$ cd build/gmake.unix
$ make config=release

The binaries will be placed in the ./bin/release directory.
Expand Down Expand Up @@ -64,7 +64,7 @@ Alternatively, you may call the Makefile directly:
files for your toolset by running a command like the following in the
top-level Premake directory:

$ premake5 gmake2 # for makefiles
$ premake5 gmake # for makefiles
$ premake5 vs2012 # for a Visual Studio 2012 solution
$ premake --help # to see a list of supported toolsets

Expand Down Expand Up @@ -114,7 +114,7 @@ BUILDING deb BINARY PACKAGE

0. sudo apt install devscripts
1. bootstrap the premake
2. ./bin/release/premake5 gmake2
2. ./bin/release/premake5 gmake
3. cp ./packages/debian ./debian
4. debuild --no-lintian --no-sign
5. the built package should appear in the parent dir.
14 changes: 7 additions & 7 deletions Bootstrap.mak
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ mingw: mingw-clean
mkdir -p build/bootstrap
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_STATICLIB -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $(SRC) -lole32 -lversion
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --arch=$(PLATFORM) --os=windows --to=build/bootstrap --cc=mingw $(PREMAKE_OPTS) gmake2
./build/bootstrap/premake_bootstrap --arch=$(PLATFORM) --os=windows --to=build/bootstrap --cc=mingw $(PREMAKE_OPTS) gmake
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)_$(PLATFORM:x86=win32)

macosx: osx
Expand All @@ -102,7 +102,7 @@ osx: osx-clean
mkdir -p build/bootstrap
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_STATICLIB -DLUA_USE_MACOSX -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" -framework CoreServices -framework Foundation -framework Security -lreadline $(SRC)
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --arch=$(PLATFORM) --to=build/bootstrap $(PREMAKE_OPTS) gmake2
./build/bootstrap/premake_bootstrap --arch=$(PLATFORM) --to=build/bootstrap $(PREMAKE_OPTS) gmake
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)

linux-clean: nix-clean
Expand All @@ -111,7 +111,7 @@ linux: linux-clean
mkdir -p build/bootstrap
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_STATICLIB -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $(SRC) -lm -ldl -lrt -luuid
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --to=build/bootstrap $(PREMAKE_OPTS) gmake2
./build/bootstrap/premake_bootstrap --to=build/bootstrap $(PREMAKE_OPTS) gmake
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)

bsd-clean: nix-clean
Expand All @@ -120,7 +120,7 @@ bsd: bsd-clean
mkdir -p build/bootstrap
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_STATICLIB -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $(SRC) -lm
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --to=build/bootstrap $(PREMAKE_OPTS) gmake2
./build/bootstrap/premake_bootstrap --to=build/bootstrap $(PREMAKE_OPTS) gmake
$(MAKE) -C build/bootstrap -j`getconf NPROCESSORS_ONLN` config=$(CONFIG)

solaris-clean: nix-clean
Expand All @@ -129,7 +129,7 @@ solaris: solaris-clean
mkdir -p build/bootstrap
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_STATICLIB -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $(SRC) -lm
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --to=build/bootstrap $(PREMAKE_OPTS) gmake2
./build/bootstrap/premake_bootstrap --to=build/bootstrap $(PREMAKE_OPTS) gmake
$(MAKE) -C build/bootstrap -j`getconf NPROCESSORS_ONLN` config=$(CONFIG)

haiku-clean: nix-clean
Expand All @@ -138,7 +138,7 @@ haiku: haiku-clean
mkdir -p build/bootstrap
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_STATICLIB -DLUA_USE_POSIX -DLUA_USE_DLOPEN -D_BSD_SOURCE -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $(SRC) -lbsd
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --to=build/bootstrap $(PREMAKE_OPTS) gmake2
./build/bootstrap/premake_bootstrap --to=build/bootstrap $(PREMAKE_OPTS) gmake
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)

windows-base: windows-clean
Expand All @@ -160,5 +160,5 @@ cosmo: cosmo-clean
mkdir -p build/bootstrap
cosmocc -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_STATICLIB -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $(SRC) -lm -ldl -lrt
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --to=build/bootstrap --cc=cosmocc gmake2
./build/bootstrap/premake_bootstrap --to=build/bootstrap --cc=cosmocc gmake
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)
9 changes: 9 additions & 0 deletions modules/gmake/_manifest.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
return {
"_preload.lua",
"gmake.lua",
"gmake_cpp.lua",
"gmake_csharp.lua",
"gmake_makefile.lua",
"gmake_utility.lua",
"gmake_workspace.lua",
}
49 changes: 30 additions & 19 deletions modules/gmake2/_preload.lua → modules/gmake/_preload.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--
-- Name: gmake2/_preload.lua
-- Purpose: Define the gmake2 action.
-- Name: gmake/_preload.lua
-- Purpose: Define the gmake action.
-- Author: Blizzard Entertainment (Tom van Dijck)
-- Modified by: Aleksi Juvani
-- Vlad Ivanov
-- Created: 2016/01/01
-- Copyright: (c) 2016-2017 Jess Perkins, Blizzard Entertainment and the Premake project
-- Copyright: (c) 2016-2025 Jess Perkins, Blizzard Entertainment and the Premake project
--

local p = premake
Expand All @@ -23,8 +23,8 @@
end

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

Expand All @@ -38,45 +38,56 @@
},

aliases = {
"gmake",
"gmake2"
},

deprecatedaliases = {
["gmake2"] = {
["action"] = function()
p.warnOnce("gmake2 has been renamed to gmake. Use gmake to generate makefiles instead.")
end,
["filter"] = function()
p.warnOnce("gmake2 has been renamed to gmake. Update your filters to use gmake instead.")
end
}
},

onInitialize = function()
require("gmake2")
p.modules.gmake2.cpp.initialize()
require("gmake")
p.modules.gmake.cpp.initialize()
end,

onWorkspace = function(wks)
p.escaper(p.modules.gmake2.esc)
p.escaper(p.modules.gmake.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.modules.gmake2.getmakefilename(wks, false), p.modules.gmake2.generate_workspace)
p.generate(wks, p.modules.gmake.getmakefilename(wks, false), p.modules.gmake.generate_workspace)
end,

onProject = function(prj)
p.escaper(p.modules.gmake2.esc)
local makefile = p.modules.gmake2.getmakefilename(prj, true)
p.escaper(p.modules.gmake.esc)
local makefile = p.modules.gmake.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.modules.gmake2.utility.generate)
p.generate(prj, makefile, p.modules.gmake.utility.generate)
elseif prj.kind == p.MAKEFILE then
p.generate(prj, makefile, p.modules.gmake2.makefile.generate)
p.generate(prj, makefile, p.modules.gmake.makefile.generate)
else
if project.isdotnet(prj) then
p.generate(prj, makefile, p.modules.gmake2.cs.generate)
p.generate(prj, makefile, p.modules.gmake.cs.generate)
elseif project.isc(prj) or project.iscpp(prj) then
p.generate(prj, makefile, p.modules.gmake2.cpp.generate)
p.generate(prj, makefile, p.modules.gmake.cpp.generate)
end
end
end,

onCleanWorkspace = function(wks)
p.clean.file(wks, p.modules.gmake2.getmakefilename(wks, false))
p.clean.file(wks, p.modules.gmake.getmakefilename(wks, false))
end,

onCleanProject = function(prj)
p.clean.file(prj, p.modules.gmake2.getmakefilename(prj, true))
p.clean.file(prj, p.modules.gmake.getmakefilename(prj, true))
end
}

Expand All @@ -85,5 +96,5 @@
--

return function(cfg)
return (_ACTION == "gmake2")
return (_ACTION == "gmake")
end
Loading
Loading