diff options
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') +``` |