diff mbox series

[1/5] Makefile: Allow for subdirectories in Sphinx manual dependencies

Message ID 20200309215818.2021-2-peter.maydell@linaro.org
State Superseded
Headers show
Series docs/system: Split target-arm.rst | expand

Commit Message

Peter Maydell March 9, 2020, 9:58 p.m. UTC
Currently we put 'docs/foo/*.rst' in the Make list of dependencies
for the Sphinx 'foo' manual, which means all the files must be
in the top level of that manual's directory. We'd like to be
able to have subdirectories inside some of the manuals, so add
'docs/foo/*/*.rst' to the dependencies too.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.20.1

Comments

Alex Bennée March 10, 2020, 2:29 p.m. UTC | #1
Peter Maydell <peter.maydell@linaro.org> writes:

> Currently we put 'docs/foo/*.rst' in the Make list of dependencies

> for the Sphinx 'foo' manual, which means all the files must be

> in the top level of that manual's directory. We'd like to be

> able to have subdirectories inside some of the manuals, so add

> 'docs/foo/*/*.rst' to the dependencies too.

>

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Reviewed-by: Alex Bennée <alex.bennee@linaro.org>


> ---

>  Makefile | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/Makefile b/Makefile

> index 2e930688942..5dba949947a 100644

> --- a/Makefile

> +++ b/Makefile

> @@ -1081,7 +1081,7 @@ sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html \

>  # a single doctree: https://github.com/sphinx-doc/sphinx/issues/2946

>  build-manual = $(call quiet-command,CONFDIR="$(qemu_confdir)" $(SPHINX_BUILD) $(if $(V),,-q) -W -b $2 -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1")

>  # We assume all RST files in the manual's directory are used in it

> -manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst) \

> +manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst $(SRC_PATH)/docs/$1/*/*.rst) \

>                $(SRC_PATH)/docs/defs.rst.inc \

>                $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py

>  # Macro to write out the rule and dependencies for building manpages



-- 
Alex Bennée
Niek Linnenbank March 10, 2020, 8:37 p.m. UTC | #2
Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com>


On Mon, Mar 9, 2020 at 10:58 PM Peter Maydell <peter.maydell@linaro.org>
wrote:

> Currently we put 'docs/foo/*.rst' in the Make list of dependencies

> for the Sphinx 'foo' manual, which means all the files must be

> in the top level of that manual's directory. We'd like to be

> able to have subdirectories inside some of the manuals, so add

> 'docs/foo/*/*.rst' to the dependencies too.

>

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

> ---

>  Makefile | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/Makefile b/Makefile

> index 2e930688942..5dba949947a 100644

> --- a/Makefile

> +++ b/Makefile

> @@ -1081,7 +1081,7 @@ sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html \

>  # a single doctree: https://github.com/sphinx-doc/sphinx/issues/2946

>  build-manual = $(call quiet-command,CONFDIR="$(qemu_confdir)"

> $(SPHINX_BUILD) $(if $(V),,-q) -W -b $2 -D version=$(VERSION) -D

> release="$(FULL_VERSION)" -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1

> $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1")

>  # We assume all RST files in the manual's directory are used in it

> -manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst) \

> +manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst

> $(SRC_PATH)/docs/$1/*/*.rst) \

>                $(SRC_PATH)/docs/defs.rst.inc \

>                $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py

>  # Macro to write out the rule and dependencies for building manpages

> --

> 2.20.1

>

>


-- 
Niek Linnenbank
<div dir="ltr">Reviewed-by: Niek Linnenbank &lt;<a href="mailto:nieklinnenbank@gmail.com">nieklinnenbank@gmail.com</a>&gt;<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 9, 2020 at 10:58 PM Peter Maydell &lt;<a href="mailto:peter.maydell@linaro.org">peter.maydell@linaro.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Currently we put &#39;docs/foo/*.rst&#39; in the Make list of dependencies<br>
for the Sphinx &#39;foo&#39; manual, which means all the files must be<br>
in the top level of that manual&#39;s directory. We&#39;d like to be<br>
able to have subdirectories inside some of the manuals, so add<br>
&#39;docs/foo/*/*.rst&#39; to the dependencies too.<br>
<br>
Signed-off-by: Peter Maydell &lt;<a href="mailto:peter.maydell@linaro.org" target="_blank">peter.maydell@linaro.org</a>&gt;<br>

---<br>
 Makefile | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/Makefile b/Makefile<br>
index 2e930688942..5dba949947a 100644<br>
--- a/Makefile<br>
+++ b/Makefile<br>
@@ -1081,7 +1081,7 @@ sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html \<br>
 # a single doctree: <a href="https://github.com/sphinx-doc/sphinx/issues/2946" rel="noreferrer" target="_blank">https://github.com/sphinx-doc/sphinx/issues/2946</a><br>
 build-manual = $(call quiet-command,CONFDIR=&quot;$(qemu_confdir)&quot; $(SPHINX_BUILD) $(if $(V),,-q) -W -b $2 -D version=$(VERSION) -D release=&quot;$(FULL_VERSION)&quot; -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,&quot;SPHINX&quot;,&quot;$(MANUAL_BUILDDIR)/$1&quot;)<br>
 # We assume all RST files in the manual&#39;s directory are used in it<br>
-manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst) \<br>
+manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst $(SRC_PATH)/docs/$1/*/*.rst) \<br>
               $(SRC_PATH)/docs/defs.rst.inc \<br>
               $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py<br>
 # Macro to write out the rule and dependencies for building manpages<br>
-- <br>
2.20.1<br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Niek Linnenbank<br><br></div></div></div>
Richard Henderson March 11, 2020, 6:36 a.m. UTC | #3
On 3/9/20 2:58 PM, Peter Maydell wrote:
> Currently we put 'docs/foo/*.rst' in the Make list of dependencies

> for the Sphinx 'foo' manual, which means all the files must be

> in the top level of that manual's directory. We'd like to be

> able to have subdirectories inside some of the manuals, so add

> 'docs/foo/*/*.rst' to the dependencies too.

> 

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

> ---

>  Makefile | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)


Reviewed-by: Richard Henderson <richard.henderson@linaro.org>



r~
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 2e930688942..5dba949947a 100644
--- a/Makefile
+++ b/Makefile
@@ -1081,7 +1081,7 @@  sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html \
 # a single doctree: https://github.com/sphinx-doc/sphinx/issues/2946
 build-manual = $(call quiet-command,CONFDIR="$(qemu_confdir)" $(SPHINX_BUILD) $(if $(V),,-q) -W -b $2 -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1")
 # We assume all RST files in the manual's directory are used in it
-manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst) \
+manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst $(SRC_PATH)/docs/$1/*/*.rst) \
               $(SRC_PATH)/docs/defs.rst.inc \
               $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py
 # Macro to write out the rule and dependencies for building manpages