aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/markdown/Reference-manual.md8
-rw-r--r--docs/markdown/snippets/configure_file_copy.md10
2 files changed, 17 insertions, 1 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 2498b98..d875098 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.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
diff --git a/docs/markdown/snippets/configure_file_copy.md b/docs/markdown/snippets/configure_file_copy.md
new file mode 100644
index 0000000..fee04e4
--- /dev/null
+++ b/docs/markdown/snippets/configure_file_copy.md
@@ -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.