Skip to content

Improve some doc #2413

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 22, 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
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General thought: We have a mix between "on"/"off" and "On"/"Off" throughout the docs. Should we normalize the documentation to one or the other?


### 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)
Loading