diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-01-30 13:20:59 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-01-30 16:19:59 +0000 |
commit | f72ee8e742a171db74ed32b54b85953b8dfe1d77 (patch) | |
tree | 80e015f57b8bfc3c0a0fccb6b0d4ef4d602c0a0d /docs/markdown/Generating-sources.md | |
parent | 4f8cecca9733588b083dba8488143fa1ffb0e495 (diff) | |
download | meson-f72ee8e742a171db74ed32b54b85953b8dfe1d77.zip meson-f72ee8e742a171db74ed32b54b85953b8dfe1d77.tar.gz meson-f72ee8e742a171db74ed32b54b85953b8dfe1d77.tar.bz2 |
Rewrap long text lines in docs. [skip ci]
Diffstat (limited to 'docs/markdown/Generating-sources.md')
-rw-r--r-- | docs/markdown/Generating-sources.md | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/docs/markdown/Generating-sources.md b/docs/markdown/Generating-sources.md index e22112f..44e36b7 100644 --- a/docs/markdown/Generating-sources.md +++ b/docs/markdown/Generating-sources.md @@ -48,8 +48,9 @@ Then you just put that in your program and you're done. ### Generating headers -Adding a generated header to a source list will ensure that the header is -generated and that the proper include paths are created for the target: +Adding a generated header to a source list will ensure that the header +is generated and that the proper include paths are created for the +target: ```meson prog_python = import('python').find_installation('python3') @@ -73,18 +74,19 @@ libfoo = static_library('foo', [foo_c, foo_h]) executable('myexe', ['main.c', foo_h], link_with : libfoo) ``` -Each target that depends on a generated header should add that header to it's sources, -as seen above with `libfoo` and `myexe`. This is because there is no way for -meson or the backend to know that `myexe` depends on `foo.h` just because -`libfoo` does, it could be a private header. +Each target that depends on a generated header should add that header +to it's sources, as seen above with `libfoo` and `myexe`. This is +because there is no way for meson or the backend to know that `myexe` +depends on `foo.h` just because `libfoo` does, it could be a private +header. ### Generating multiple files at a time -Sometimes it makes sense for a single generator to create two or more files at -a time, (perhaps a header and source file), meson has this case covered as -well. `custom_target`s can be indexed like a list to get each output file -separately. The order is the same as the order of the output argument to -`custom_target` +Sometimes it makes sense for a single generator to create two or more +files at a time, (perhaps a header and source file), meson has this +case covered as well. `custom_target`s can be indexed like a list to +get each output file separately. The order is the same as the order of +the output argument to `custom_target` ```meson prog_python = import('python').find_installation('python3') @@ -101,13 +103,14 @@ libfoo = static_library('foo', [foo_ch]) executable('myexe', ['main.c', foo_ch[1]], link_with : libfoo) ``` -In this case `libfoo` depends on both `foo.c` and `foo.h` but `myexe` only -depends on `foo.h`, the second output. +In this case `libfoo` depends on both `foo.c` and `foo.h` but `myexe` +only depends on `foo.h`, the second output. ### Using dependencies to manage generated resources -In some cases it might be easier to use `declare_dependency` to "bundle" the header -and library dependency, especially if there are many generated headers: +In some cases it might be easier to use `declare_dependency` to +"bundle" the header and library dependency, especially if there are +many generated headers: ```meson idep_foo = declare_dependency( @@ -117,7 +120,8 @@ idep_foo = declare_dependency( ``` See [dependencies](Dependencies.md#declaring-your-own), and -[reference](Reference-manual.md#declare_dependency) for more information. +[reference](Reference-manual.md#declare_dependency) for more +information. ## Using generator() |