Skip to content

Commit c5f4336

Browse files
committed
Deprecate gmake action, add onDeprecate hook to actions
1 parent 7f2a0c8 commit c5f4336

File tree

13 files changed

+21
-11
lines changed

13 files changed

+21
-11
lines changed

modules/gmake/_preload.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
dotnet = { "mono", "msnet", "pnet" }
2525
},
2626

27+
onDeprecate = function()
28+
p.warnOnce("gmake-deprecate", "The gmake action has been deprecated in favor of gmake2. Please update your scripts to use the new action.")
29+
end,
30+
2731
onWorkspace = function(wks)
2832
p.escaper(p.make.esc)
2933
wks.projects = table.filter(wks.projects, function(prj) return p.action.supports(prj.kind) and prj.kind ~= p.NONE end)

src/base/action.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@
9898
function action.call(name)
9999
local a = action._list[name]
100100

101+
if a.onDeprecate then
102+
term.pushColor(term.yellow)
103+
a.onDeprecate()
104+
term.popColor()
105+
end
106+
101107
if a.onStart then
102108
a.onStart()
103109
end

website/docs/Building-Premake.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ On other platforms, if the bootstrap fails to build, you will need to have a wor
3636
Once you have a working Premake available, you can generate the project files for your toolset by running a command like the following in the top-level Premake directory:
3737

3838
```bash
39-
premake5 gmake # for makefiles
39+
premake5 gmake2 # for makefiles
4040
premake5 vs2012 # for a Visual Studio 2012 solution
4141
premake --help # to see a list of supported toolsets
4242
```

website/docs/Your-First-Script.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ This particular command will generate `HelloWorld.sln` and `HelloWorld.vcxproj`
4848
If you happened to be on Linux, you could generate and build a makefile like so:
4949

5050
```bash
51-
$ premake5 gmake
51+
$ premake5 gmake2
5252
$ make # build default (Debug) configuration
5353
$ make config=release # build release configuration
5454
$ make help # show available configurations

website/docs/buildoptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ Premake 4.0 or later.
2323
Use `pkg-config` style configuration when building on Linux with GCC. Build options are always compiler specific and should be targeted to a particular toolset.
2424

2525
```lua
26-
filter { "system:linux", "action:gmake" }
26+
filter { "system:linux", "action:gmake*" }
2727
buildoptions { "`wx-config --cxxflags`", "-ansi", "-pedantic" }
2828
```

website/docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The available sources for keywords. Keywords are not case-sensitive.
1616

1717
* **Configuration names.** Any of the configuration names supplied to the **[configurations](configurations.md)** or **[platforms](platforms.md)** functions.
1818

19-
* **Action names** such as **vs2010** or **gmake**. See the [Using Premake](Using-Premake.md) for a complete list.
19+
* **Action names** such as **vs2010** or **gmake2**. See the [Using Premake](Using-Premake.md) for a complete list.
2020

2121
* **Command line options**.
2222

website/docs/globals/premake_OS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Stores the name of the operating system currently being targeted; see [system()]
1111
The current OS may be overridden on the command line with the `--os` option.
1212

1313
```
14-
$ premake5 --os=linux gmake
14+
$ premake5 --os=linux gmake2
1515
```
1616

1717
### Availability ###

website/docs/globals/premake_TARGET_ARCH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Stores the name of the architecture currently being targeted; see [architecture(
77
The current architecture may be overridden on the command line with the `--arch` option.
88

99
```
10-
$ premake5 --arch=x86 gmake
10+
$ premake5 --arch=x86 gmake2
1111
```
1212

1313
### Availability ###

website/docs/globals/premake_TARGET_OS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Stores the name of the operating system currently being targeted; see [system()]
77
The current OS may be overridden on the command line with the `--os` option.
88

99
```
10-
$ premake5 --os=linux gmake
10+
$ premake5 --os=linux gmake2
1111
```
1212

1313
### Availability ###

website/docs/linkgroups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Turns on/off linkgroups for gcc/clang in the gmake backend.
1+
Turns on/off linkgroups for gcc/clang in the gmake and gmake2 backend.
22

33
```lua
44
linkgroups ("value")

0 commit comments

Comments
 (0)