summaryrefslogtreecommitdiff
path: root/doc/Makefile.am
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2022-01-04 09:06:21 +0100
committerDaiki Ueno <ueno@gnu.org>2022-01-15 09:25:56 +0100
commitbf78b2258ea8c3392a85014bc828739b0a32e2c8 (patch)
tree8526de001ca2317791e7e822f8f7a212be1e2c93 /doc/Makefile.am
parent26578b7d02c269ff1d34ff782d84c7667734d03d (diff)
downloadgnutls-bf78b2258ea8c3392a85014bc828739b0a32e2c8.tar.gz
doc: generate texinfo files from JSON
This replaces texinfo generation previously provided by the autogen -Tagtexi.tpl command with a Python script (gen-cmd-texi.py). Signed-off-by: Daiki Ueno <ueno@gnu.org>
Diffstat (limited to 'doc/Makefile.am')
-rw-r--r--doc/Makefile.am219
1 files changed, 117 insertions, 102 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index ab414add8b..833c75ef6e 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -40,108 +40,121 @@ endif
-include $(top_srcdir)/doc/doc.mk
-invoke-gnutls-cli.texi: $(top_srcdir)/src/cli-args.def
- PATH="$(top_builddir)/src/$(PATH_SEPARATOR)$${PATH}$(PATH_SEPARATOR)" $(AUTOGEN) -L$(top_builddir)/src -Tagtexi-cmd.tpl $<; \
- if [ ! -e $@ ]; then \
- cp $(srcdir)/$@ .; \
- fi; \
- $(srcdir)/scripts/cleanup-autogen.pl < $@ > $@.tmp && \
- mv -f $@.tmp $@
-
-invoke-gnutls-cli-debug.texi: $(top_srcdir)/src/cli-debug-args.def invoke-gnutls-cli.texi
- PATH="$(top_builddir)/src/$(PATH_SEPARATOR)$${PATH}$(PATH_SEPARATOR)" $(AUTOGEN) -L$(top_builddir)/src -Tagtexi-cmd.tpl $<; \
- if [ ! -e $@ ]; then \
- cp $(srcdir)/$@ .; \
- fi; \
- $(srcdir)/scripts/cleanup-autogen.pl < $@ > $@.tmp && \
- mv -f $@.tmp $@
-
-invoke-gnutls-serv.texi: $(top_srcdir)/src/serv-args.def invoke-gnutls-cli-debug.texi
- PATH="$(top_builddir)/src/$(PATH_SEPARATOR)$${PATH}$(PATH_SEPARATOR)" $(AUTOGEN) -L$(top_builddir)/src -Tagtexi-cmd.tpl $<; \
- if [ ! -e $@ ]; then \
- cp $(srcdir)/$@ .; \
- fi; \
- $(srcdir)/scripts/cleanup-autogen.pl < $@ > $@.tmp && \
- mv -f $@.tmp $@
-
-invoke-certtool.texi: $(top_srcdir)/src/certtool-args.def invoke-gnutls-serv.texi
- PATH="$(top_builddir)/src/$(PATH_SEPARATOR)$${PATH}$(PATH_SEPARATOR)" $(AUTOGEN) -L$(top_builddir)/src -Tagtexi-cmd.tpl $<; \
- if [ ! -e $@ ]; then \
- cp $(srcdir)/$@ .; \
- fi; \
- $(srcdir)/scripts/cleanup-autogen.pl < $@ > $@.tmp && \
- rm -f $@ && \
- $(SED) -e 's/@subheading/@subsubheading/g' \
- -e 's/@section/@subsection/g' $@.tmp > $@ && \
- rm -f $@.tmp
-
-invoke-ocsptool.texi: $(top_srcdir)/src/ocsptool-args.def invoke-certtool.texi
- PATH="$(top_builddir)/src/$(PATH_SEPARATOR)$${PATH}$(PATH_SEPARATOR)" $(AUTOGEN) -L$(top_builddir)/src -Tagtexi-cmd.tpl $<; \
- if [ ! -e $@ ]; then \
- cp $(srcdir)/$@ .; \
- fi; \
- $(srcdir)/scripts/cleanup-autogen.pl < $@ > $@.tmp && \
- rm -f $@ && \
- $(SED) -e 's/@subheading/@subsubheading/g' \
- -e 's/@section/@subsection/g' $@.tmp > $@ && \
- rm -f $@.tmp
-
-invoke-danetool.texi: $(top_srcdir)/src/danetool-args.def invoke-ocsptool.texi
- PATH="$(top_builddir)/src/$(PATH_SEPARATOR)$${PATH}$(PATH_SEPARATOR)" $(AUTOGEN) -L$(top_builddir)/src -Tagtexi-cmd.tpl $<; \
- if [ ! -e $@ ]; then \
- cp $(srcdir)/$@ .; \
- fi; \
- $(srcdir)/scripts/cleanup-autogen.pl < $@ > $@.tmp && \
- rm -f $@ && \
- $(SED) -e 's/@subheading/@subsubheading/g' \
- -e 's/@section/@subsection/g' $@.tmp > $@ && \
- rm -f $@.tmp
-
-invoke-srptool.texi: $(top_srcdir)/src/srptool-args.def invoke-danetool.texi
- PATH="$(top_builddir)/src/$(PATH_SEPARATOR)$${PATH}$(PATH_SEPARATOR)" $(AUTOGEN) -L$(top_builddir)/src -Tagtexi-cmd.tpl $<; \
- if [ ! -e $@ ]; then \
- cp $(srcdir)/$@ .; \
- fi; \
- $(srcdir)/scripts/cleanup-autogen.pl < $@ > $@.tmp && \
- rm -f $@ && \
- $(SED) -e 's/@subheading/@subsubheading/g' \
- -e 's/@section/@subsubsection/g' $@.tmp > $@ && \
- rm -f $@.tmp
-
-invoke-psktool.texi: $(top_srcdir)/src/psktool-args.def invoke-srptool.texi
- PATH="$(top_builddir)/src/$(PATH_SEPARATOR)$${PATH}$(PATH_SEPARATOR)" $(AUTOGEN) -L$(top_builddir)/src -Tagtexi-cmd.tpl $<; \
- if [ ! -e $@ ]; then \
- cp $(srcdir)/$@ .; \
- fi; \
- $(srcdir)/scripts/cleanup-autogen.pl < $@ > $@.tmp && \
- rm -f $@ && \
- $(SED) -e 's/@subheading/@subsubheading/g' \
- -e 's/@section/@subsubsection/g' $@.tmp > $@ && \
- rm -f $@.tmp
-
-invoke-p11tool.texi: $(top_srcdir)/src/p11tool-args.def invoke-psktool.texi
- PATH="$(top_builddir)/src/$(PATH_SEPARATOR)$${PATH}$(PATH_SEPARATOR)" $(AUTOGEN) -L$(top_builddir)/src -Tagtexi-cmd.tpl $<; \
- if [ ! -e $@ ]; then \
- cp $(srcdir)/$@ .; \
- fi; \
- $(srcdir)/scripts/cleanup-autogen.pl < $@ > $@.tmp && \
- rm -f $@ && \
- $(SED) \
- -e 's/@subsection/@subsubheading/g' \
- -e 's/@section/@subsection/g' $@.tmp > $@ && \
- rm -f $@.tmp
-
-invoke-tpmtool.texi: $(top_srcdir)/src/tpmtool-args.def invoke-p11tool.texi
- PATH="$(top_builddir)/src/$(PATH_SEPARATOR)$${PATH}$(PATH_SEPARATOR)" $(AUTOGEN) -L$(top_builddir)/src -Tagtexi-cmd.tpl $<; \
- if [ ! -e $@ ]; then \
- cp $(srcdir)/$@ .; \
- fi; \
- $(srcdir)/scripts/cleanup-autogen.pl < $@ > $@.tmp && \
- rm -f $@ && \
- $(SED) \
- -e 's/@subsection/@subsubheading/g' \
- -e 's/@section/@subsection/g' $@.tmp > $@ && \
- rm -f $@.tmp
+INVOKE_GNUTLS_CLI_TEXI_DEPS = gnutls-cli-see-also.texi gnutls-cli-examples.texi
+EXTRA_DIST += $(INVOKE_GNUTLS_CLI_TEXI_DEPS)
+invoke-gnutls-cli.texi: $(INVOKE_GNUTLS_CLI_TEXI_DEPS)
+invoke-gnutls-cli.texi: $(top_srcdir)/src/gnutls-cli-options.json
+ $(AM_V_GEN) PYTHONPATH='$(top_srcdir)/python' \
+ $(PYTHON) $(srcdir)/scripts/gen-cmd-texi.py \
+ --see-also $(srcdir)/gnutls-cli-see-also.texi \
+ --examples $(srcdir)/gnutls-cli-examples.texi \
+ $< $@
+
+INVOKE_GNUTLS_CLI_DEBUG_TEXI_DEPS = gnutls-cli-debug-see-also.texi gnutls-cli-debug-examples.texi
+EXTRA_DIST += $(INVOKE_GNUTLS_CLI_DEBUG_TEXI_DEPS)
+invoke-gnutls-cli-debug.texi: $(INVOKE_GNUTLS_CLI_DEBUG_TEXI_DEPS)
+invoke-gnutls-cli-debug.texi: $(top_srcdir)/src/gnutls-cli-debug-options.json
+ $(AM_V_GEN) PYTHONPATH='$(top_srcdir)/python' \
+ $(PYTHON) $(srcdir)/scripts/gen-cmd-texi.py \
+ --see-also $(srcdir)/gnutls-cli-debug-see-also.texi \
+ --examples $(srcdir)/gnutls-cli-debug-examples.texi \
+ $< $@
+
+INVOKE_GNUTLS_SERV_TEXI_DEPS = gnutls-serv-see-also.texi gnutls-serv-examples.texi
+EXTRA_DIST += $(INVOKE_GNUTLS_SERV_TEXI_DEPS)
+invoke-gnutls-serv.texi: $(INVOKE_GNUTLS_SERV_TEXI_DEPS)
+invoke-gnutls-serv.texi: $(top_srcdir)/src/gnutls-serv-options.json
+ $(AM_V_GEN) PYTHONPATH='$(top_srcdir)/python' \
+ $(PYTHON) $(srcdir)/scripts/gen-cmd-texi.py \
+ --see-also $(srcdir)/gnutls-serv-see-also.texi \
+ --examples $(srcdir)/gnutls-serv-examples.texi \
+ $< $@
+
+INVOKE_CERTTOOL_TEXI_DEPS = certtool-see-also.texi certtool-examples.texi certtool-files.texi
+EXTRA_DIST += $(INVOKE_CERTTOOL_TEXI_DEPS)
+invoke-certtool.texi: $(INVOKE_CERTTOOL_TEXI_DEPS)
+invoke-certtool.texi: $(top_srcdir)/src/certtool-options.json
+ $(AM_V_GEN) PYTHONPATH='$(top_srcdir)/python' \
+ $(PYTHON) $(srcdir)/scripts/gen-cmd-texi.py \
+ --see-also $(srcdir)/certtool-see-also.texi \
+ --examples $(srcdir)/certtool-examples.texi \
+ --files $(srcdir)/certtool-files.texi \
+ --level 1 \
+ --section-node \
+ $< $@
+
+INVOKE_OCSPTOOL_TEXI_DEPS = ocsptool-see-also.texi ocsptool-examples.texi ocsptool-description.texi
+EXTRA_DIST += $(INVOKE_OCSPTOOL_TEXI_DEPS)
+invoke-ocsptool.texi: $(INVOKE_OCSPTOOL_TEXI_DEPS)
+invoke-ocsptool.texi: $(top_srcdir)/src/ocsptool-options.json
+ $(AM_V_GEN) PYTHONPATH='$(top_srcdir)/python' \
+ $(PYTHON) $(srcdir)/scripts/gen-cmd-texi.py \
+ --see-also $(srcdir)/ocsptool-see-also.texi \
+ --examples $(srcdir)/ocsptool-examples.texi \
+ --description $(srcdir)/ocsptool-description.texi \
+ --level 1 \
+ --section-node \
+ $< $@
+
+INVOKE_DANETOOL_TEXI_DEPS = danetool-see-also.texi danetool-examples.texi
+EXTRA_DIST += $(INVOKE_DANETOOL_TEXI_DEPS)
+invoke-danetool.texi: $(INVOKE_DANETOOL_TEXI_DEPS)
+invoke-danetool.texi: $(top_srcdir)/src/danetool-options.json
+ $(AM_V_GEN) PYTHONPATH='$(top_srcdir)/python' \
+ $(PYTHON) $(srcdir)/scripts/gen-cmd-texi.py \
+ --see-also $(srcdir)/danetool-see-also.texi \
+ --examples $(srcdir)/danetool-examples.texi \
+ --level 1 \
+ --section-node \
+ $< $@
+
+INVOKE_SRPTOOL_TEXI_DEPS = srptool-see-also.texi srptool-examples.texi
+EXTRA_DIST += $(INVOKE_SRPTOOL_TEXI_DEPS)
+invoke-srptool.texi: $(INVOKE_SRPTOOL_TEXI_DEPS)
+invoke-srptool.texi: $(top_srcdir)/src/srptool-options.json
+ $(AM_V_GEN) PYTHONPATH='$(top_srcdir)/python' \
+ $(PYTHON) $(srcdir)/scripts/gen-cmd-texi.py \
+ --see-also $(srcdir)/srptool-see-also.texi \
+ --examples $(srcdir)/srptool-examples.texi \
+ --level 2 \
+ --section-node \
+ $< $@
+
+INVOKE_PSKTOOL_TEXI_DEPS = psktool-see-also.texi psktool-examples.texi
+EXTRA_DIST += $(INVOKE_PSKTOOL_TEXI_DEPS)
+invoke-psktool.texi: $(INVOKE_PSKTOOL_TEXI_DEPS)
+invoke-psktool.texi: $(top_srcdir)/src/psktool-options.json
+ $(AM_V_GEN) PYTHONPATH='$(top_srcdir)/python' \
+ $(PYTHON) $(srcdir)/scripts/gen-cmd-texi.py \
+ --see-also $(srcdir)/psktool-see-also.texi \
+ --examples $(srcdir)/psktool-examples.texi \
+ --level 2 \
+ --section-node \
+ $< $@
+
+INVOKE_P11TOOL_TEXI_DEPS = p11tool-see-also.texi p11tool-examples.texi
+EXTRA_DIST += $(INVOKE_P11TOOL_TEXI_DEPS)
+invoke-p11tool.texi: $(INVOKE_P11TOOL_TEXI_DEPS)
+invoke-p11tool.texi: $(top_srcdir)/src/p11tool-options.json
+ $(AM_V_GEN) PYTHONPATH='$(top_srcdir)/python' \
+ $(PYTHON) $(srcdir)/scripts/gen-cmd-texi.py \
+ --see-also $(srcdir)/p11tool-see-also.texi \
+ --examples $(srcdir)/p11tool-examples.texi \
+ --level 1 \
+ --section-node \
+ $< $@
+
+INVOKE_TPMTOOL_TEXI_DEPS = tpmtool-see-also.texi tpmtool-examples.texi
+EXTRA_DIST += $(INVOKE_TPMTOOL_TEXI_DEPS)
+invoke-tpmtool.texi: $(INVOKE_TPMTOOL_TEXI_DEPS)
+invoke-tpmtool.texi: $(top_srcdir)/src/tpmtool-options.json
+ $(AM_V_GEN) PYTHONPATH='$(top_srcdir)/python' \
+ $(PYTHON) $(srcdir)/scripts/gen-cmd-texi.py \
+ --see-also $(srcdir)/tpmtool-see-also.texi \
+ --examples $(srcdir)/tpmtool-examples.texi \
+ --level 1 \
+ --section-node \
+ $< $@
info_TEXINFOS = gnutls.texi gnutls-guile.texi
@@ -159,6 +172,8 @@ AUTOGENED_DOC = invoke-gnutls-cli.texi invoke-gnutls-cli-debug.texi \
invoke-ocsptool.texi invoke-psktool.texi invoke-p11tool.texi \
invoke-tpmtool.texi invoke-danetool.texi
+$(AUTOGENED_DOC): $(srcdir)/scripts/gen-cmd-texi.py
+
gnutls_TEXINFOS += stamp_functions
# Examples.