summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-05-22 02:33:18 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-05-22 02:37:07 +0530
commit4b9393e165c4521351f6fdfd8179997016bd84a8 (patch)
tree44eda5c28c9d1c505b15b8033c147a3f224533fa
parentf5af0f9b5ab4b35a46ef2a700d4815d2aa4b8096 (diff)
downloadmeson-nirbheek/configure-file-nodata.tar.gz
docs: Add manual entry for configure_file copy kwargnirbheek/configure-file-nodata
-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 2498b9899..d8750989b 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 000000000..fee04e435
--- /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.