From 09551a3f540c1ec7758e837640947489101e0338 Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Mon, 10 May 2021 17:57:45 +0200 Subject: [PATCH] doc: automake: Add support for sphinx 4.0. File layout for man pages in sphinx 4 by default changed [1] from: Documentation/_ref/man/page.section to: Documentation/_ref/man/section/page.section Ajusting our build scripts so they will be able to locate files in new places. This fixes our CI build. [1] https://github.com/sphinx-doc/sphinx/issues/7996 Signed-off-by: Ilya Maximets Acked-by: Ben Pfaff Reviewed-by: David Marchand Reviewed-by: Aaron Conole --- Documentation/automake.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/automake.mk b/Documentation/automake.mk index f85c4320ee7..7e30d4ce606 100644 --- a/Documentation/automake.mk +++ b/Documentation/automake.mk @@ -215,8 +215,13 @@ install-man-rst: docs-check $(extract_stem_and_section); \ echo " $(MKDIR_P) '$(DESTDIR)'\"$$mandir\""; \ $(MKDIR_P) '$(DESTDIR)'"$$mandir"; \ - echo " $(INSTALL_DATA) $(SPHINXBUILDDIR)/man/$$stem.$$section '$(DESTDIR)'\"$$mandir/$$stem.$$section\""; \ - $(INSTALL_DATA) $(SPHINXBUILDDIR)/man/$$stem.$$section '$(DESTDIR)'"$$mandir/$$stem.$$section"; \ + if test -f $(SPHINXBUILDDIR)/man/$$stem.$$section; then \ + filepath=$(SPHINXBUILDDIR)/man/$$stem.$$section; \ + else \ + filepath=$(SPHINXBUILDDIR)/man/$$section/$$stem.$$section; \ + fi; \ + echo " $(INSTALL_DATA) $$filepath '$(DESTDIR)'\"$$mandir/$$stem.$$section\""; \ + $(INSTALL_DATA) $$filepath '$(DESTDIR)'"$$mandir/$$stem.$$section"; \ done else install-man-rst: