[Buildroot] [git commit] package/doc-asciidoc.mk: unbreak docs logic after pkgdir change

Arnout Vandecappelle arnout at mind.be
Mon Mar 25 09:11:35 UTC 2024


commit: https://git.buildroot.net/buildroot/commit/?id=bb4371d0863a2714e81b81bb2d5bafe18b4b3110
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Commit 748fc4be21e (package/pkg-utils.mk: remove trailing slash in pkgdir
definition) broke the docs generation logic:

make manual-html
>>>   Preparing the manual sources...
>>>   Generating HTML manual...
a2x: ERROR: missing ASCIIDOC_FILE: /home/peko/source/buildroot/output/build/docs/manual/manual.adoc

make: *** [docs/manual/manual.mk:12: /home/peko/source/buildroot/output/docs/manual/manual.html] Error 1

As it now ends up with the .adoc file one level below
(../docs/manual/manual/manual.adoc).  The reason is that the pkgdir macro is
used to define $(2)_DOCDIR, which is passed to rsync:

rsync -a docs/manual /home/peko/source/buildroot/output/build/docs/manual

Fix it by appending a / to the rsync arguments like we do elsewhere.

Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
Signed-off-by: Arnout Vandecappelle <arnout at mind.be>
---
 package/doc-asciidoc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/doc-asciidoc.mk b/package/doc-asciidoc.mk
index 40c9a725d1..d6ecd1e30e 100644
--- a/package/doc-asciidoc.mk
+++ b/package/doc-asciidoc.mk
@@ -155,7 +155,7 @@ $(1)-check-dependencies: asciidoc-check-dependencies $$($(2)_DEPENDENCIES)
 $$(BUILD_DIR)/docs/$(1)/.stamp_doc_rsynced:
 	$$(Q)$$(call MESSAGE,"Preparing the $(1) sources...")
 	$$(Q)mkdir -p $$(@D)
-	$$(Q)rsync -a $$($(2)_DOCDIR) $$(@D)
+	$$(Q)rsync -a $$($(2)_DOCDIR)/ $$(@D)/
 	$$(Q)$$(foreach hook,$$($(2)_POST_RSYNC_HOOKS),$$(call $$(hook))$$(sep))
 
 .PHONY: $(1)-prepare-sources



More information about the buildroot mailing list