From 35d80ebd7876fa3071c1a88c7ad0b9a0022dc418 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 19 Sep 2024 14:00:32 +0200 Subject: [PATCH] doc: Add support for generating HTML versions of the man pages. * doc/Makefile.am (yat2m-stamp): Also call yat2m with --html options. * doc/yat2m.c (main): Add dummy options. -- Note that the generated html versions of the man pages will only be correct if the external yat2m tool is installed - at least for the maintainers of the website this will be the case. --- doc/Makefile.am | 6 +++++- doc/yat2m.c | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 4d4feaf54..5d55767cd 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -143,7 +143,11 @@ yat2m-stamp: $(myman_sources) defs.inc for file in $(myman_sources); do \ $(YAT2M) $(YAT2M_OPTIONS) --store \ --date "`cat $$incd 2>/dev/null`" \ - `test -f '$$file' || echo '$(srcdir)/'`$$file ; done + `test -f '$$file' || echo '$(srcdir)/'`$$file ; \ + $(YAT2M) $(YAT2M_OPTIONS) --store --html --gnupgorg \ + --date "`cat $$incd 2>/dev/null`" \ + `test -f '$$file' || echo '$(srcdir)/'`$$file ;\ + done @mv -f yat2m-stamp.tmp $@ yat2m-stamp: $(YAT2M) diff --git a/doc/yat2m.c b/doc/yat2m.c index 9ba950dcf..4be9ef7f2 100644 --- a/doc/yat2m.c +++ b/doc/yat2m.c @@ -1583,6 +1583,13 @@ main (int argc, char **argv) opt_store = 1; argc--; argv++; } + else if (!strcmp (*argv, "--html") || !strcmp (*argv, "--gnupgorg")) + { + /* These are dummy options to keep the Makefile simple. It + * is not expected that the HTML files for upload are + * created with this included version of yat2m. */ + argc--; argv++; + } else if (!strcmp (*argv, "--select")) { argc--; argv++;