Skip to content

Commit

Permalink
Merge pull request #2413 from Jarod42/docs
Browse files Browse the repository at this point in the history
Improve some doc
  • Loading branch information
nickclark2016 authored Jan 22, 2025
2 parents 4804a89 + 7cd607b commit 20ee427
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 12 deletions.
2 changes: 1 addition & 1 deletion premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ if premake.action.supports("None") then
{
"website/blog/**",
"website/community/**",
"website/doc/**",
"website/docs/**",
"website/src/**",
"website/static/**",
"website/*"
Expand Down
8 changes: 4 additions & 4 deletions website/docs/bindirs.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
bindirs
Specifies extra paths to use when executing build commands

```lua
bindirs { "directory" }
bindirs { "directories" }
```

### Parameters ###

`directory` - needs documentation.
`directories` - paths containing executable to run when building command.

### Applies To ###

Expand All @@ -19,6 +19,6 @@ Premake 5.0.0 alpha 12 or later.
### Examples ###

```lua
bindirs { "directory" }
bindirs { "bin/", "scripts/" }
```

21 changes: 17 additions & 4 deletions website/docs/compilebuildoutputs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
compilebuildoutputs
Specify if generated file from [`buildcommands`](buildcommands.md) should be compiled or not.

```lua
compilebuildoutputs "value"
Expand All @@ -7,8 +7,8 @@ compilebuildoutputs "value"
### Parameters ###

`value` one of:
* `on` - needs documentation.
* `off` - needs documentation.
* `on` - generated file should be compiled.
* `off` - generated file should not be compiled.

### Applies To ###

Expand All @@ -21,6 +21,19 @@ Premake 5.0.0 alpha 12 or later.
### Examples ###

```lua
compilebuildoutputs "value"
filter "files:**.cpp.in"
buildmessage "generate %{file.basename} from %{file.relpath}"
buildoutputs { "%{cfg.objdir}/%{file.basename}") }
buildcommands { "MyScript %[%{!file.abspath}] %[%{!cfg.objdir}/%{file.basename}]" }
compilebuildoutputs "on"
filter "files:**.h.in"
buildmessage "generate %{file.basename} from %{file.relpath}"
buildoutputs { "%{cfg.objdir}/%{file.basename}") }
buildcommands { "MyScript %[%{!file.abspath}] %[%{!cfg.objdir}/%{file.basename}]" }
compilebuildoutputs "off"
filter {}
```

## See Also ##

* [Custom Build Commands](Custom-Build-Commands.md)
23 changes: 20 additions & 3 deletions website/docs/display.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
display
Text to display for rule or property definition

```lua
display "value"
```

### Parameters ###

`value` - needs documentation.
`value` - Text shown for the rule or property definition.

### Applies To ###

Expand All @@ -19,6 +19,23 @@ Premake 5.0.0 alpha 12 or later.
### Examples ###

```lua
display "value"
rule "myrule"
display "My custom rule"
fileextension ".in"

propertydefinition {
name = "myoption",
display = "My option",
description = "Select the option to use",
values = { [0] = "option1", [1] = "option2"},
value = 1
}

buildmessage 'custom rule: {copy} %{file.relpath} %{file.basename}'
buildoutputs { "%{sln.location}/%{file.basename}" }
buildcommands { "MyScript {myoption} %[%{!file.abspath}] %[%{!sln.location}/%{file.basename}]" }
```

## See Also ##

* [Custom Rules](Custom-Rules.md)

0 comments on commit 20ee427

Please sign in to comment.