]> git.ipfire.org Git - thirdparty/systemd.git/commit
meson: Remove unneeded include directories
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 9 May 2025 18:48:51 +0000 (20:48 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 12 May 2025 11:35:50 +0000 (13:35 +0200)
commit30d20907bddfe064cc3437a888dd8f00d14929e4
tree1811179231b271296d5edc8b627a4f0de2c5684e
parent6350d2dbd97746440b9c8303ddc140ffda568732
meson: Remove unneeded include directories

meson by default adds the current source and build directory as include
directories. Because we structure our meson code by gathering a giant dict
of everything we want to do and then doing all the actual target generation
in the top level meson.build, this behavior does not make sense at all because
we end up adding the top level repository directory as an include directory
which is never what we want.

At the same time, let's also make sure the top level directory of the build
directory is not an include directory, by moving the version.h generation
into the src/version subdirectory and then adding the src/version subdirectory
of the build directory as an include directory instead of the top level
repository directory.

Making this change means that language servers such as clangd can't get
confused when they automatically insert an #include line and insert
"#include "src/basic/fs-util.h" instead of "#include "fs-util.h".
meson.build
src/basic/meson.build
src/boot/meson.build
src/core/meson.build
src/cryptsetup/cryptsetup-tokens/meson.build
src/libsystemd-network/meson.build
src/libsystemd/meson.build
src/libsystemd/sd-journal/meson.build [new file with mode: 0644]
src/libudev/meson.build
src/shared/meson.build
src/version/meson.build [new file with mode: 0644]