Skip to contentSkip to conversation

Fix some issues with DOCS_CSS and DOCS_THEME

PATCH In review Mauro Carvalho Chehab 3 participants 6 messages Dec 11, 2021 – Dec 16, 2021 Documentation

lore
Share & tools
lore
#0 lore raw

cover Fix some issues with DOCS_CSS and DOCS_THEME

Hi Jon,

Randy pointed a couple of issues with the DOCS_CSS and DOCS_THEME patchset. The two patches in this series address them.

Patch 1 fix the usage of "make O=<dir>".
Patch 2 fix some documentation issues (a typo and whitespace issues).

Randy, thanks for reporting those!

Regards,
Mauro

Mauro Carvalho Chehab (2):
docs: Makefile: use the right path for DOCS_CSS
docs: address some text issues with css/theme support

 Documentation/Makefile             | 6 +++---
 Documentation/doc-guide/sphinx.rst | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.33.1
#1 lore raw

PATCH 1/2 docs: Makefile: use the right path for DOCS_CSS

When make is used with O=<dir>, the location of the css file won't be get right:

	$ make DOCS_THEME=nature DOCS_CSS=my_css.css    O=DOCS SPHINXDIRS=x86 -j9 htmldocs
	make[1]: Entering directory '/work/lnx/next/next-2021-1210/DOCS'
	...
	cp: cannot stat 'my_css.css': No such file or directory

Fix it in a way that both relative and absolute paths will be handled.

---

See [PATCH 0/2] at: https://lore.kernel.org/all/[email protected]/

 Documentation/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/Makefile +1 -1
index 9f0f53db2f10..c9543b63dc6a 100644
@@ -88,7 +88,7 @@ quiet_cmd_sphinx = SPHINX  $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
 	$(abspath $(srctree)/$(src)/$5) \
 	$(abspath $(BUILDDIR)/$3/$4) && \
 	if [ "x$(DOCS_CSS)" != "x" ]; then \
-		cp $(DOCS_CSS) $(BUILDDIR)/$3/_static/; \
+		cp $(if $(patsubst /%,,$(DOCS_CSS)),$(abspath $(srctree)/$(DOCS_CSS)),$(DOCS_CSS)) $(BUILDDIR)/$3/_static/; \
 	fi
 
 htmldocs:
Signature · 1 line
2.33.1
reviewer Reviewed-by Tested-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] docs: Makefile: use the right path for DOCS_CSS

Quoted 8 lines · Mauro Carvalho Chehab

When make is used with O=<dir>, the location of the css file won't be get right:

	$ make DOCS_THEME=nature DOCS_CSS=my_css.css    O=DOCS SPHINXDIRS=x86 -j9 htmldocs
	make[1]: Entering directory '/work/lnx/next/next-2021-1210/DOCS'
	...
	cp: cannot stat 'my_css.css': No such file or directory
Quoted 5 lines

Fix it in a way that both relative and absolute paths will be handled.

Thanks.

Quoted 21 lines

---

See [PATCH 0/2] at: https://lore.kernel.org/all/[email protected]/

 Documentation/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/Makefile +1 -1
index 9f0f53db2f10..c9543b63dc6a 100644
@@ -88,7 +88,7 @@ quiet_cmd_sphinx = SPHINX  $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
 	$(abspath $(srctree)/$(src)/$5) \
 	$(abspath $(BUILDDIR)/$3/$4) && \
 	if [ "x$(DOCS_CSS)" != "x" ]; then \
-		cp $(DOCS_CSS) $(BUILDDIR)/$3/_static/; \
+		cp $(if $(patsubst /%,,$(DOCS_CSS)),$(abspath $(srctree)/$(DOCS_CSS)),$(DOCS_CSS)) $(BUILDDIR)/$3/_static/; \
 	fi
 
 htmldocs:
Signature · 1 line
~Randy
#3 lore raw

PATCH 2/2 docs: address some text issues with css/theme support

In reply to Mauro Carvalho Chehab

Fix:
- overriden ->overridden
- some whitespace issues introduced at the css/theme Makefile help.

---

See [PATCH 0/2] at: https://lore.kernel.org/all/[email protected]/

 Documentation/Makefile             | 4 ++--
 Documentation/doc-guide/sphinx.rst | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Documentation/Makefile +2 -2
index c9543b63dc6a..9f4bd42cef18 100644
@@ -159,8 +159,8 @@ dochelp:
 	@echo  '  make SPHINX_CONF={conf-file} [target] use *additional* sphinx-build'
 	@echo  '  configuration. This is e.g. useful to build with nit-picking config.'
 	@echo
-	@echo '   make DOCS_THEME={sphinx-theme} selects a different Sphinx theme.'
+	@echo  '  make DOCS_THEME={sphinx-theme} selects a different Sphinx theme.'
 	@echo
-	@echo '   make DOCS_CSS={a .css file} adds a DOCS_CSS override file for html/epub output.'
+	@echo  '  make DOCS_CSS={a .css file} adds a DOCS_CSS override file for html/epub output.'
 	@echo
 	@echo  '  Default location for the generated documents is Documentation/output'
Documentation/doc-guide/sphinx.rst +1 -1
index 7fb6e6168bbb..673cbb769c08 100644
@@ -147,7 +147,7 @@ By default, the build will try to use the Read the Docs sphinx theme:
 
 If the theme is not available, it will fall-back to the classic one.
 
-The Sphinx theme can be overriden by using the ``DOCS_THEME`` make variable.
+The Sphinx theme can be overridden by using the ``DOCS_THEME`` make variable.
 
 To remove the generated documentation, run ``make cleandocs``.
 
Signature · 1 line
2.33.1
reviewer Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] docs: address some text issues with css/theme support

Quoted 7 lines · Mauro Carvalho Chehab

Fix:
- overriden ->overridden
- some whitespace issues introduced at the css/theme Makefile help.

Thanks.

Quoted 37 lines

---

See [PATCH 0/2] at: https://lore.kernel.org/all/[email protected]/

 Documentation/Makefile             | 4 ++--
 Documentation/doc-guide/sphinx.rst | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Documentation/Makefile +2 -2
index c9543b63dc6a..9f4bd42cef18 100644
@@ -159,8 +159,8 @@ dochelp:
 	@echo  '  make SPHINX_CONF={conf-file} [target] use *additional* sphinx-build'
 	@echo  '  configuration. This is e.g. useful to build with nit-picking config.'
 	@echo
-	@echo '   make DOCS_THEME={sphinx-theme} selects a different Sphinx theme.'
+	@echo  '  make DOCS_THEME={sphinx-theme} selects a different Sphinx theme.'
 	@echo
-	@echo '   make DOCS_CSS={a .css file} adds a DOCS_CSS override file for html/epub output.'
+	@echo  '  make DOCS_CSS={a .css file} adds a DOCS_CSS override file for html/epub output.'
 	@echo
 	@echo  '  Default location for the generated documents is Documentation/output'
Documentation/doc-guide/sphinx.rst +1 -1
index 7fb6e6168bbb..673cbb769c08 100644
@@ -147,7 +147,7 @@ By default, the build will try to use the Read the Docs sphinx theme:
 
 If the theme is not available, it will fall-back to the classic one.
 
-The Sphinx theme can be overriden by using the ``DOCS_THEME`` make variable.
+The Sphinx theme can be overridden by using the ``DOCS_THEME`` make variable.
 
 To remove the generated documentation, run ``make cleandocs``.
 
Signature · 1 line
~Randy
maintainer
#5 lore raw
In reply to Mauro Carvalho Chehab
Quoted 13 lines · Mauro Carvalho Chehab

Hi Jon,

Randy pointed a couple of issues with the DOCS_CSS and DOCS_THEME patchset. The two patches in this series address them.

Patch 1 fix the usage of "make O=<dir>".
Patch 2 fix some documentation issues (a typo and whitespace issues).

Randy, thanks for reporting those!

Regards,
Mauro

Quoted 7 lines

Mauro Carvalho Chehab (2):
docs: Makefile: use the right path for DOCS_CSS
docs: address some text issues with css/theme support

 Documentation/Makefile             | 6 +++---
 Documentation/doc-guide/sphinx.rst | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

Set applied, thanks.

jon