@@ -16,7 +16,6 @@ bash = find_program('bash', native : true)
1616# HTML manual dependencies (conditional)
1717if get_option (' html-manual' )
1818 mdbook = find_program (' mdbook' , native : true )
19- rsync = find_program (' rsync' , required : true , native : true )
2019endif
2120
2221pymod = import (' python' )
@@ -116,7 +115,12 @@ if get_option('html-manual')
116115 @0@ @INPUT0@ @CURRENT_SOURCE_DIR@ > @DEPFILE@
117116 @0@ @INPUT1@ summary @2@ < @CURRENT_SOURCE_DIR@/source/SUMMARY.md.in > @2@/source/SUMMARY.md
118117 sed -e 's|@version@|@3@|g' < @INPUT2@ > @2@/book.toml
119- @4@ -r -L --exclude='*.drv' --include='*.md' @CURRENT_SOURCE_DIR@/ @2@/
118+ # Copy source to build directory, excluding the build directory itself
119+ # (which is present when built as an individual component).
120+ # Use tar with --dereference to copy symlink targets (e.g., JSON examples from tests).
121+ (cd @CURRENT_SOURCE_DIR@ && find . -mindepth 1 -maxdepth 1 ! -name build | tar -c --dereference -T - -f -) | (cd @2@ && tar -xf -)
122+ chmod -R u+w @2@
123+ find @2@ -name '*.drv' -delete
120124 (cd @2@; RUST_LOG=warn @1@ build -d @2@ 3>&2 2>&1 1>&3) | { grep -Fv "because fragment resolution isn't implemented" || :; } 3>&2 2>&1 1>&3
121125 rm -rf @2@/manual
122126 mv @2@/html @2@/manual
@@ -128,7 +132,6 @@ if get_option('html-manual')
128132 mdbook.full_path(),
129133 meson .current_build_dir(),
130134 fs.read(' ../../.version-determinate' ).strip(),
131- rsync.full_path(),
132135 ),
133136 ],
134137 input : [
0 commit comments