diff mbox series

[v2,1/2] Makefile: add nit-picky mode to sphinx-build

Message ID 20190422221714.7630-2-jsnow@redhat.com
State New
Headers show
Series docs/interop/bitmaps: rewrite and modernize doc | expand

Commit Message

John Snow April 22, 2019, 10:17 p.m. UTC
If we add references that don't resolve (or accidentally remove them),
it will be helpful to have an error message alerting us to that.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vladimir Sementsov-Ogievskiy April 23, 2019, 6:03 p.m. UTC | #1
23.04.2019 1:17, John Snow wrote:
> If we add references that don't resolve (or accidentally remove them),
> it will be helpful to have an error message alerting us to that.

accordingly to docs I've found, not error but warning.

> 
> Signed-off-by: John Snow <jsnow@redhat.com>

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

> ---
>   Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 04a0d45050..ff9ce2ed4c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -899,7 +899,7 @@ docs/version.texi: $(SRC_PATH)/VERSION
>   sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html $(MANUAL_BUILDDIR)/interop/index.html
>   
>   # Canned command to build a single manual
> -build-manual = $(call quiet-command,sphinx-build $(if $(V),,-q) -b html -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1")
> +build-manual = $(call quiet-command,sphinx-build $(if $(V),,-q) -n -b html -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1 $(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) $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py
>   
>
John Snow April 23, 2019, 6:06 p.m. UTC | #2
On 4/23/19 2:03 PM, Vladimir Sementsov-Ogievskiy wrote:
> 23.04.2019 1:17, John Snow wrote:
>> If we add references that don't resolve (or accidentally remove them),
>> it will be helpful to have an error message alerting us to that.
> 
> accordingly to docs I've found, not error but warning.
> 
Oh, true. I have to revise the document anyway, so I'll change my
phrasing here -- it won't cause the build to fail, but you will be able
to see the error when you build. I think it's helpful to have as a
mechanical check -- especially if we succeed in building generated ReST
documentation (eventually?...)

>>
>> Signed-off-by: John Snow <jsnow@redhat.com>
> 
> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> 
>> ---
>>   Makefile | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 04a0d45050..ff9ce2ed4c 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -899,7 +899,7 @@ docs/version.texi: $(SRC_PATH)/VERSION
>>   sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html $(MANUAL_BUILDDIR)/interop/index.html
>>   
>>   # Canned command to build a single manual
>> -build-manual = $(call quiet-command,sphinx-build $(if $(V),,-q) -b html -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1")
>> +build-manual = $(call quiet-command,sphinx-build $(if $(V),,-q) -n -b html -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1 $(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) $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py
>>   
>>
> 
>
Vladimir Sementsov-Ogievskiy April 23, 2019, 6:10 p.m. UTC | #3
23.04.2019 21:06, John Snow wrote:
> 
> 
> On 4/23/19 2:03 PM, Vladimir Sementsov-Ogievskiy wrote:
>> 23.04.2019 1:17, John Snow wrote:
>>> If we add references that don't resolve (or accidentally remove them),
>>> it will be helpful to have an error message alerting us to that.
>>
>> accordingly to docs I've found, not error but warning.
>>
> Oh, true. I have to revise the document anyway, so I'll change my
> phrasing here -- it won't cause the build to fail, but you will be able
> to see the error when you build. I think it's helpful to have as a
> mechanical check -- especially if we succeed in building generated ReST
> documentation (eventually?...)

Hm, if we now don't have other warnings, we may also enable -W, to be strict.

> 
>>>
>>> Signed-off-by: John Snow <jsnow@redhat.com>
>>
>> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>>
>>> ---
>>>    Makefile | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/Makefile b/Makefile
>>> index 04a0d45050..ff9ce2ed4c 100644
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -899,7 +899,7 @@ docs/version.texi: $(SRC_PATH)/VERSION
>>>    sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html $(MANUAL_BUILDDIR)/interop/index.html
>>>    
>>>    # Canned command to build a single manual
>>> -build-manual = $(call quiet-command,sphinx-build $(if $(V),,-q) -b html -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1")
>>> +build-manual = $(call quiet-command,sphinx-build $(if $(V),,-q) -n -b html -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1 $(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) $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py
>>>    
>>>
>>
>>
>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 04a0d45050..ff9ce2ed4c 100644
--- a/Makefile
+++ b/Makefile
@@ -899,7 +899,7 @@  docs/version.texi: $(SRC_PATH)/VERSION
 sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html $(MANUAL_BUILDDIR)/interop/index.html
 
 # Canned command to build a single manual
-build-manual = $(call quiet-command,sphinx-build $(if $(V),,-q) -b html -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1")
+build-manual = $(call quiet-command,sphinx-build $(if $(V),,-q) -n -b html -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1 $(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) $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py