From: Fejfighter <fejfighter@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] Add epub output for documentation
Date: Wed, 9 Nov 2022 18:54:51 +1100 [thread overview]
Message-ID: <CALohuRBj5E32New=qCQVw0n2+kqcpWe442NROV994ZbbMTZ-KA@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 485 bytes --]
Hi,
Attached is a patch that uses the newly added support for producing epub in
Texinfo.
TESTING:
I have built and viewed the epub on calibre and everything appears to work
well.
I have also tested building with an older version of texinfo and it does
not interfere with normal docs building.
FSF COPYRIGHT:
I'm not sure if this is over the threshold for exemption, but I have
completed paperwork for emacs and I am happy to do so again for GDB if
needed
Thanks,
Jeff Walsh
[-- Attachment #2: 0001-Add-support-for-epub-documentation-output.patch --]
[-- Type: text/x-patch, Size: 3229 bytes --]
From 44fdc332ff8f41258bd6d7dd5dc520af71ca770f Mon Sep 17 00:00:00 2001
From: Jeff Walsh <fejfighter@gmail.com>
Date: Wed, 9 Nov 2022 16:59:43 +1100
Subject: [PATCH] Add support for epub documentation output
Texinfo 7.0 added support for outputting texinfo documentation as an
epub, a popular format for e-readers. Add epub targets for the manuals
and relevent cleanup targets.
---
gdb/doc/Makefile.in | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index 741da0eb812..d7d03274d43 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -60,6 +60,9 @@ MAKEINFO_CMD = $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
MAKEHTML = $(MAKEINFO_CMD) --html
MAKEHTMLFLAGS =
+MAKEEPUB = $(MAKEINFO_CMD) --epub
+MAKEEPUBFLAGS =
+
# where to find texi2roff, ditto
TEXI2ROFF=texi2roff
@@ -92,6 +95,9 @@ PDFFILES = gdb.pdf stabs.pdf refcard.pdf annotate.pdf
# Files which should be generated via 'html' and installed by 'install-html'
HTMLFILES = gdb/index.html stabs/index.html annotate/index.html
HTMLFILES_INSTALL = gdb stabs annotate
+# Files which should be generated via 'epub' and installed by 'install-epub'
+EPUBFILES = gdb.epub stabs.epub annotate.epub
+
# There may be alternate predefined collections of switches to configure
# the GDB manual. Normally this is not done in synch with the software
@@ -190,6 +196,7 @@ info: $(INFO_DEPS)
dvi: gdb.dvi stabs.dvi refcard.dvi annotate.dvi
ps: gdb.ps stabs.ps refcard.ps annotate.ps
html: $(HTMLFILES)
+epub: $(EPUBFILES)
pdf: $(PDFFILES)
man: $(MANS)
@@ -566,6 +573,10 @@ gdb.mm: $(GDB_DOC_FILES) links2roff
gdb/index.html: ${GDB_DOC_FILES}
$(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
+# GDB MANUAL: EPUB file
+gdb.epub: ${GDB_DOC_FILES}
+ $(MAKEEPUB) $(MAKEEPUBFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
+
stabs.info: $(STABS_DOC_FILES)
$(MAKEINFO_CMD) -I $(srcdir) -o stabs.info $(srcdir)/stabs.texinfo
@@ -574,6 +585,11 @@ stabs.info: $(STABS_DOC_FILES)
stabs/index.html: $(STABS_DOC_FILES)
$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/stabs.texinfo
+# STABS DOCUMENTATION: EPUB file
+
+stabs.epub: $(STABS_DOC_FILES)
+ $(MAKEEPUB) $(MAKEEPUBFLAGS) -I $(srcdir) $(srcdir)/stabs.texinfo
+
# Clean these up before each run. Avoids a catch 22 with not being
# able to re-generate these files (to fix a corruption) because these
# files contain a corruption.
@@ -616,6 +632,9 @@ annotate.info: $(ANNOTATE_DOC_FILES)
annotate/index.html: $(ANNOTATE_DOC_FILES)
$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo
+annotate.epub: $(ANNOTATE_DOC_FILES)
+ $(MAKEEPUB) $(MAKEEPUBFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo
+
# Man pages
gdb.1: $(GDB_DOC_FILES)
touch $@
@@ -679,7 +698,7 @@ distclean: clean
# "clean" or "distclean". Use maintainer-clean to remove them.
maintainer-clean realclean: distclean
- rm -f GDBvn.texi version.subst *.info* *.dvi *.ps *.html *.pdf $(MANS)
+ rm -f GDBvn.texi version.subst *.info* *.dvi *.ps *.html *.pdf *.epub $(MANS)
install: install-info install-man
--
2.38.1
next reply other threads:[~2022-11-09 7:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 7:54 Fejfighter [this message]
2022-11-09 12:38 ` Eli Zaretskii
2022-11-09 13:21 ` Simon Marchi
2022-11-09 13:22 ` Eli Zaretskii
2022-11-09 13:41 ` Simon Marchi
2022-11-09 13:44 ` Eli Zaretskii
2022-11-09 13:48 ` Simon Marchi
2022-11-09 15:48 ` Tom Tromey
2022-11-09 16:15 ` Simon Marchi
2022-11-09 16:53 ` Mike Frysinger
2022-11-09 17:09 ` Eli Zaretskii
2022-11-09 16:48 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CALohuRBj5E32New=qCQVw0n2+kqcpWe442NROV994ZbbMTZ-KA@mail.gmail.com' \
--to=fejfighter@gmail.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).