docs: Add manual entry for configure_file copy kwarg

pull/3383/head
Nirbheek Chauhan 7 years ago
parent f5af0f9b5a
commit 4b9393e165
  1. 8
      docs/markdown/Reference-manual.md
  2. 10
      docs/markdown/snippets/configure_file_copy.md

@ -166,7 +166,7 @@ finally use it in a call to `configure_file`.
generated_file = configure_file(...)
```
This function can run in two modes depending on the keyword arguments
This function can run in three modes depending on the keyword arguments
passed to it.
When a [`configuration_data()`](#configuration_data) object is passed
@ -179,6 +179,10 @@ When a list of strings is passed to the `command:` keyword argument,
it takes any source or configured file as the `input:` and assumes
that the `output:` is produced when the specified command is run.
Since *0.47.0*, when the `copy:` keyword argument is set to `true`,
this function will copy the file provided in `input:` to a file in the
build directory with the name `output:` in the current directory.
These are all the supported keyword arguments:
- `capture` when this argument is set to true, Meson captures `stdout`
@ -187,6 +191,8 @@ These are all the supported keyword arguments:
- `command` as explained above, if specified, Meson does not create
the file itself but rather runs the specified command, which allows
you to do fully custom file generation.
- `copy` *(added 0.47.0)* as explained above, if specified Meson only
copies the file from input to output.
- `format` *(added 0.46.0)* the format of defines. It defaults to `meson`, and so substitutes
`#mesondefine` statements and variables surrounded by `@` characters, you can also use `cmake`
to replace `#cmakedefine` statements and variables with the `${variable}` syntax. Finally you can use

@ -0,0 +1,10 @@
## New action 'copy' for configure_file()
In addition to `configuration:` and `command:`,
[`configure_file()`](#Reference-manual.md#configure_file) now accepts a keyword
argument `copy:` which specifies a new action: copying the file specified with
the `input:` keyword argument to a file in the build directory with the name
specified with the `output:` keyword argument.
These three keyword arguments are, as before, mutually exclusive. You can only
do one action at a time.
Loading…
Cancel
Save