diff mbox series

[19/12] docs: Fix install-man$(1)-pages if no manpages are generated

Message ID 20240713180939.3363273-1-andrew.cooper3@citrix.com (mailing list archive)
State New
Headers show
Series CI: part 3 (slimline, and PPC/RISCV fixes) | expand

Commit Message

Andrew Cooper July 13, 2024, 6:09 p.m. UTC
All tools to build manpages are optional, and if none of them happen to be
present, the intermediate working directory may not even be created.

Treat this as non-fatal, bringing the behaviour in line with install-html.
Like the html side, it needs to be not-or to avoid Make thinking the rule has
failed.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Anthony PERARD <anthony.perard@vates.tech>
CC: Juergen Gross <jgross@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <julien@xen.org>
CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 docs/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Anthony PERARD July 15, 2024, 12:05 p.m. UTC | #1
On Sat, Jul 13, 2024 at 07:09:39PM +0100, Andrew Cooper wrote:
> All tools to build manpages are optional, and if none of them happen to be
> present, the intermediate working directory may not even be created.
> 
> Treat this as non-fatal, bringing the behaviour in line with install-html.
> Like the html side, it needs to be not-or to avoid Make thinking the rule has
> failed.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>

Thanks,
diff mbox series

Patch

diff --git a/docs/Makefile b/docs/Makefile
index 966a104490ac..b30cc619f8dd 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -151,7 +151,7 @@  man$(1)-pages: $$(DOC_MAN$(1))
 .PHONY: install-man$(1)-pages
 install-man$(1)-pages: man$(1)-pages
 	$(INSTALL_DIR) $(DESTDIR)$(mandir)
-	cp -r man$(1) $(DESTDIR)$(mandir)
+	[ ! -d man$(1) ] || cp -r man$(1) $(DESTDIR)$(mandir)
 
 # Clean
 .PHONY: clean-man$(1)-pages