aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-05-22 21:09:19 +0300
committerGitHub <noreply@github.com>2018-05-22 21:09:19 +0300
commit55a0831bc3d00d642197bc0755191c9fe1ef2ac7 (patch)
tree777e890608ff9422700c4679587c7e2dc0b7dc21 /docs/markdown
parent9ecd92c6fedd052f4115683726a5cc6ebaa33e85 (diff)
parent4b9393e165c4521351f6fdfd8179997016bd84a8 (diff)
downloadmeson-55a0831bc3d00d642197bc0755191c9fe1ef2ac7.zip
meson-55a0831bc3d00d642197bc0755191c9fe1ef2ac7.tar.gz
meson-55a0831bc3d00d642197bc0755191c9fe1ef2ac7.tar.bz2
Merge pull request #3383 from mesonbuild/nirbheek/configure-file-nodata
configure_file: Add a new action 'copy'
Diffstat (limited to 'docs/markdown')
-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 6c20221..804ca0f 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.