meson: fix broken build when using custom build directory

Fixes path resolution issue with meson-embedded bash script when
`build` is a symlink, or a custom build directory is passed as a
argument to `just` or `meson`.

Change-Id: I67b13c524d196241bb9a8a3b8ad2c17c2c094ed8
This commit is contained in:
vczf
2026-02-20 23:32:33 +00:00
parent c040a9d8e4
commit 86268bd618
+7 -4
View File
@@ -41,10 +41,13 @@ manual = custom_target(
'-euo', 'pipefail',
'-c',
'''
@0@ @INPUT0@ @CURRENT_SOURCE_DIR@ > @DEPFILE@
cd @3@
@1@ build . -d @2@ | { grep -Fv "because fragment resolution isn't implemented" || :; }
cd @SOURCE_ROOT@
@0@ @INPUT0@ @3@ > @DEPFILE@
# Needs to be in lix/doc/manual for e.g. substitute.py
pushd @3@
@1@ build . -d @2@
popd
rm -rf @2@/manual
mv @2@/html @2@/manual
find @2@/manual -iname meson.build -delete