diff options
author | Mathieu Duponchelle <MathieuDuponchelle@users.noreply.github.com> | 2018-06-01 19:53:07 +0200 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-06-01 17:53:07 +0000 |
commit | 14750b50ea9c9f53237bed59a79365e1ebbdacda (patch) | |
tree | 9497bd107cc4889bdb6daf60094bf650c1315e82 /docs/markdown | |
parent | 17cb364046661c2d72193b4d8691070fd0fb276b (diff) | |
download | meson-14750b50ea9c9f53237bed59a79365e1ebbdacda.zip meson-14750b50ea9c9f53237bed59a79365e1ebbdacda.tar.gz meson-14750b50ea9c9f53237bed59a79365e1ebbdacda.tar.bz2 |
configure_file: Add output_format kwarg (#3636)
* configure_file: Add output_format kwarg
* docs: Reference-manual.md output_format was added in 0.47 [skip ci]
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Reference-manual.md | 4 | ||||
-rw-r--r-- | docs/markdown/snippets/configure_file_output_format.md | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 4e916fb..0c54de0 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -208,6 +208,10 @@ the `@variable@` syntax. `@PLAINNAME@` or `@BASENAME@` substitutions). In configuration mode, the permissions of the input file (if it is specified) are copied to the output file. +- `output_format` *(added 0.47.0)* the format of the output to generate when no input + was specified. It defaults to `c`, in which case preprocessor directives + will be prefixed with `#`, you can also use `nasm`, in which case the + prefix will be `%`. ### custom_target() diff --git a/docs/markdown/snippets/configure_file_output_format.md b/docs/markdown/snippets/configure_file_output_format.md new file mode 100644 index 0000000..e522885 --- /dev/null +++ b/docs/markdown/snippets/configure_file_output_format.md @@ -0,0 +1,14 @@ +## New keyword argument `output_format` for configure_file() + +When called without an input file, `configure_file` generates a +C header file by default. A keyword argument was added to allow +specifying the output format, for example for use with nasm or yasm: + +``` +conf = configuration_data() +conf.set('FOO', 1) + +configure_file('config.asm', + configuration: conf, + output_format: 'nasm') +``` |