Skip to contentSkip to conversation

doc: Makefile: publish pdf and epub versions too

PATCH Michael Opdenacker 2 participants 3 messages Jun 15, 2022 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 15 lines · Michael Opdenacker via lists.yoctoproject.org

From: Michael Opdenacker <[email protected]>

[YOCTO #14357]

---
  documentation/Makefile | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
documentation/Makefile +0 -0
index 9fb6814c8f..e013f68e7f 100644
@@ -22,10 +22,10 @@ help:
 

documentation/Makefile help: · line 30

Quoted 10 lines
documentation/Makefile +2 -2
  .PHONY: all help Makefile clean publish epub latexpdf
 
-publish: Makefile html singlehtml
+publish: Makefile html singlehtml epub latexpdf
  	rm -rf $(BUILDDIR)/$(DESTDIR)/
  	mkdir -p $(BUILDDIR)/$(DESTDIR)/
-	cp -r $(BUILDDIR)/html/* $(BUILDDIR)/$(DESTDIR)/
+	cp -r $(BUILDDIR)/html/* $(BUILDDIR)/epub/TheYoctoProject.epub $(BUILDDIR)/latex/theyoctoproject.pdf $(BUILDDIR)/$(DESTDIR)/
  	cp $(BUILDDIR)/singlehtml/index.html $(BUILDDIR)/$(DESTDIR)/singleindex.html
  	sed -i -e '[email protected]#@singleindex.html#@g' $(BUILDDIR)/$(DESTDIR)/singleindex.html

Note that a possible issue with this patch is that the current autobuilder for docs may be missing packages (LaTeX in particular) to generate the new epub and pdf outputs. How shall we proceed?
Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw
Quoted 18 lines · Michael Opdenacker via lists.yoctoproject.org
Quoted 17 lines · Michael Opdenacker via lists.yoctoproject.org

From: Michael Opdenacker <[email protected]>

[YOCTO #14357]

---
  documentation/Makefile | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
documentation/Makefile +0 -0
index 9fb6814c8f..e013f68e7f 100644
@@ -22,10 +22,10 @@ help:
 
  .PHONY: all help Makefile clean publish epub latexpdf
 
Quoted 14 lines

documentation/Makefile help: · line 30

Quoted 8 lines
documentation/Makefile +2 -2
-publish: Makefile html singlehtml
+publish: Makefile html singlehtml epub latexpdf
  	rm -rf $(BUILDDIR)/$(DESTDIR)/
  	mkdir -p $(BUILDDIR)/$(DESTDIR)/
-	cp -r $(BUILDDIR)/html/* $(BUILDDIR)/$(DESTDIR)/
+	cp -r $(BUILDDIR)/html/* $(BUILDDIR)/epub/TheYoctoProject.epub $(BUILDDIR)/latex/theyoctoproject.pdf $(BUILDDIR)/$(DESTDIR)/
  	cp $(BUILDDIR)/singlehtml/index.html $(BUILDDIR)/$(DESTDIR)/singleindex.html
  	sed -i -e '[email protected]#@singleindex.html#@g' $(BUILDDIR)/$(DESTDIR)/singleindex.html

Note that a possible issue with this patch is that the current autobuilder for docs may be missing packages (LaTeX in particular) to generate the new epub and pdf outputs.
How shall we proceed?

Do we know exactly what is needed? Could we add it to the buildtools- docs-tarball?

We could quickly hack the docs target in a test branch for -helper to check whether we have what we need (which we likely won't right now)? This might fit in with the other sphinx version issues?

Cheers,

Richard

#3 lore raw

Hi Richard,

Thanks for the feedback!

Quoted 33 lines · Richard Purdie
Quoted 18 lines · Michael Opdenacker via lists.yoctoproject.org
Quoted 17 lines · Michael Opdenacker via lists.yoctoproject.org

From: Michael Opdenacker <[email protected]>

[YOCTO #14357]

---
   documentation/Makefile | 4 ++--
   1 file changed, 2 insertions(+), 2 deletions(-)
documentation/Makefile +0 -0
index 9fb6814c8f..e013f68e7f 100644
@@ -22,10 +22,10 @@ help:
 
   .PHONY: all help Makefile clean publish epub latexpdf
 
Quoted 13 lines

documentation/Makefile help: · line 30

Quoted 8 lines
documentation/Makefile +2 -2
-publish: Makefile html singlehtml
+publish: Makefile html singlehtml epub latexpdf
   	rm -rf $(BUILDDIR)/$(DESTDIR)/
   	mkdir -p $(BUILDDIR)/$(DESTDIR)/
-	cp -r $(BUILDDIR)/html/* $(BUILDDIR)/$(DESTDIR)/
+	cp -r $(BUILDDIR)/html/* $(BUILDDIR)/epub/TheYoctoProject.epub $(BUILDDIR)/latex/theyoctoproject.pdf $(BUILDDIR)/$(DESTDIR)/
   	cp $(BUILDDIR)/singlehtml/index.html $(BUILDDIR)/$(DESTDIR)/singleindex.html
   	sed -i -e '[email protected]#@singleindex.html#@g' $(BUILDDIR)/$(DESTDIR)/singleindex.html

Note that a possible issue with this patch is that the current autobuilder for docs may be missing packages (LaTeX in particular) to generate the new epub and pdf outputs.
How shall we proceed?

Quoted 6 lines

Do we know exactly what is needed? Could we add it to the buildtools- docs-tarball?

We could quickly hack the docs target in a test branch for -helper to check whether we have what we need (which we likely won't right now)? This might fit in with the other sphinx version issues?

Right. This sounds like a good idea as the best way to know what we're missing is to make tests. Indeed, this would help to update the Sphinx version too.

Could you or someone else set it up? Should I create a special branch of yocto-docs for this change?

Thanks for your support
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com