From 44fdc332ff8f41258bd6d7dd5dc520af71ca770f Mon Sep 17 00:00:00 2001 From: Jeff Walsh 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