From be39ab9fdbaba118ece1dcc3e064c8452fcdd277 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 16 Nov 2016 16:30:46 +0100 Subject: the manual generator (generator-docs.tes) has been cleaned up and is now called tedoc.tes * some code simplifications * it now supports command line arguments via getopt.tes. * the -C flag enabled C/C++ mode. By default tedoc parses SciTECO code which means it can be used to document macro packages as well. * Therefore it is installed as a separate tool now. It may be used as a Groff preprocessor for third-party macro authors to generate (wo)man pages. * there's a man page tedoc.tes(1) * The troff placeholder macro is now called ".TEDOC". * Help topics can now be specified after the starting comment /*$ or !*$. Topics have been defined for all built-in commands. --- doc/Makefile.am | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) (limited to 'doc/Makefile.am') diff --git a/doc/Makefile.am b/doc/Makefile.am index fed0ebb..97619b2 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -2,10 +2,21 @@ # substitutor is available. include $(top_srcdir)/bootstrap.am +# tedoc is a code documentation tool for SciTECO commands +# and macros, extracting comments from SciTECO and C/C++ +# code. +# It generates Troff manpage markup and acts as a Troff +# preprocessor to manpage templates. +dist_bin_SCRIPTS = tedoc.tes + +%.in : %.template tedoc.tes $(SOURCES) + $(SCITECO_FULL) -m -- @srcdir@/tedoc.tes \ + -C $@ $< $(SOURCES) + # grosciteco is a troff postprocessor similar to grotty # which can be used to produce SciTECO-friendly output # (woman pages). -dist_bin_SCRIPTS = grosciteco.tes +dist_bin_SCRIPTS += grosciteco.tes # grosciteco, like many other postprocessors, works # best with its own macro package. # Unfortunately, there is no way to query the built-in @@ -16,18 +27,23 @@ dist_bin_SCRIPTS = grosciteco.tes # the directory via `groff -M`. dist_pkgdata_DATA = sciteco.tmac -# Fix up the hash-bang line of grosciteco upon installation -# to refer to the installed sciteco binary. +# Fix up the hash-bang line of installed SciTECO scripts upon +# installation to refer to the installed sciteco binary. # This takes --program-prefix into account. install-exec-hook: - @SED@ -i "1s,#!.*sciteco,#!$(bindir)/`echo sciteco | @SED@ '$(transform)'`$(EXEEXT)," \ - $(DESTDIR)$(bindir)/grosciteco.tes + for script in $(DESTDIR)$(bindir)/*.tes; do \ + @SED@ -i "1s,#!.*sciteco,#!$(libexecdir)/`echo sciteco-wrapper | @SED@ '$(transform)'`$(EXEEXT)," \ + $$script; \ + done womendir = $(scitecolibdir)/women women_DATA = grosciteco.tes.1.woman grosciteco.tes.1.woman.tec CLEANFILES = grosciteco.tes.1.intermediate +women_DATA += tedoc.tes.1.woman tedoc.tes.1.woman.tec +CLEANFILES += tedoc.tes.1.intermediate + women_DATA += sciteco.1.woman sciteco.1.woman.tec CLEANFILES += sciteco.1.intermediate @@ -49,6 +65,9 @@ CLEANFILES += $(women_DATA) man_MANS = grosciteco.tes.1 EXTRA_DIST = grosciteco.tes.1.in +man_MANS += tedoc.tes.1 +EXTRA_DIST += tedoc.tes.1.in + man_MANS += sciteco.1 EXTRA_DIST += sciteco.1.in @@ -59,21 +78,18 @@ SOURCES = $(wildcard @top_srcdir@/src/*.cpp) CLEANFILES += $(man_MANS) -dist_noinst_SCRIPTS = generate-docs.tes htbl.tes - -%.in : %.template generate-docs.tes $(SOURCES) - $(SCITECO_FULL) -m @srcdir@/generate-docs.tes \ - $@ $< $(SOURCES) +dist_noinst_SCRIPTS = htbl.tes if BUILD_HTMLMAN -html_DATA = grosciteco.1.html sciteco.1.html sciteco.7.html +html_DATA = grosciteco.tes.1.html tedoc.tes.1.html \ + sciteco.1.html sciteco.7.html CLEANFILES += $(html_DATA) endif # NOTE: The *.htbl files are only generated since SciTECO # scripts cannot be integrated into pipelines easily yet. %.htbl : % htbl.tes - $(SCITECO_FULL) -m @srcdir@/htbl.tes $< $@ + $(SCITECO_FULL) -m -- @srcdir@/htbl.tes $< $@ %.html : %.htbl @GROFF@ -Thtml -man $< >$@ -- cgit v1.2.3