diff options
-rw-r--r-- | docs/markdown/FAQ.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/markdown/FAQ.md b/docs/markdown/FAQ.md index cd52f40..06379ae 100644 --- a/docs/markdown/FAQ.md +++ b/docs/markdown/FAQ.md @@ -403,6 +403,24 @@ kwarg to `''` and the [`name_suffix:`](https://mesonbuild.com/Reference-manual.h kwarg to `'lib'`. To get the default behaviour for each, you can either not specify the kwarg, or pass `[]` (an empty array) to it. +## Do I need to add my headers to the sources list like in Autotools? + +Autotools requires you to add private and public headers to the sources list so +that it knows what files to include in the tarball generated by `make dist`. +Meson's `dist` command simply gathers everything committed to your git/hg +repository and adds it to the tarball, so adding headers to the sources list is +pointless. + +Meson uses Ninja which uses compiler dependency information to automatically +figure out dependencies between C sources and headers, so it will rebuild +things correctly when a header changes. + +The only exception to this are generated headers, for which you must [declare +dependencies correctly](#how-do-i-tell-meson-that-my-sources-use-generated-headers). + +If, for whatever reason, you do add non-generated headers to the sources list +of a target, Meson will simply ignore them. + ## How do I tell Meson that my sources use generated headers? Let's say you use a [`custom_target()`](https://mesonbuild.com/Reference-manual.html#custom_target) |