groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

delete the --with-doc option of the configure script


From: Ingo Schwarze
Subject: delete the --with-doc option of the configure script
Date: Tue, 12 Apr 2022 15:53:38 +0200

Hello,

i intend to delete the --with-doc option of the configure script,
with no replacement.  At the end of this posting, i'm appending
the complete commit including ChangeLog and NEWS entries and commit
messages.  Even though gbranden@ already OK'ed this patch, given that
it is a user-visible change of significant size, i post it here before
pushing such that you get a chance to comment.

Regarding the rationale and Branden's opinion on it, i'm including
his reply to my latest private message, with his explicit permission.
My message explains in detail why i think this change is needed.

I do not think that providing any replacement for this option would
make sense.  More or less every free operating system that does
not already include groff in its base system provides a package
and/or port of groff, and the maintainer of that package or port can
easily exclude any documentation or example files they do not want
from their package using their operating-system specific porting
or packaging framework, without needing such a configuration option
(but usually, excluding documentation or examples provided upstream
would be a disservice to users rather than helping them, anyway).
For the likely small number of end-users who compile and install
groff directly from source without using any porting or packaging
framework, keeping the configuration and build system simple and robust
matters even more than for package maintainers.  On top of that,
any replacement would likely once again cause the same maintenance
and testing issues and the bitrot that the --with-doc option caused
in the past.

In addition to comments and opinions of any kind, explicit statements
by groff developers that you agree with or do not object to the
general direction and/or wish to OK the specific patch are welcome.

Yours,
  Ingo

----- Forwarded message from G. Branden Robinson -----

From: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Date: Tue, 12 Apr 2022 07:23:03 +1000
To: Ingo Schwarze <schwarze@usta.de>
Subject: Re: kill --with-doc

Hi, Ingo!

At 2022-04-10T17:04:21+0200, Ingo Schwarze wrote:
> Hi Branden,
> 
> here is my patch to delete the --with-doc option of the configure script.
> 
> The rationale is as follows:
> 
>  1. Its syntax and sematics are illogical.
>     It is advertised to select documentation by format, but "examples"
>     is not a format.  Classification as "examples" is still not fully
>     consistent even though i improved some aspects of it some time ago.
>     Some examples are controlled by the "examples" argument, some by
>     the respective format arguments, some require both, and there are
>     even files where one output format is controlled by the "examples"
>     argument while another output format is controlled by the respective
>     format argument.
> 
>  2. The concept of selecting output formats is also ill-advised
>     because not all input documents are available in all output
>     formats, so users selecting particular *formats* unknowingly
>     make implicit choices which *content* they will get.
> 
>     Here is a table showing the input files in the left column,
>     the arguments in the top row, and the file types created
>     in the body of the table:
> 
>                     html other      pdf examples
>     automake                        PDF PDF
>     chem                                txt
>     pic             HTML PostScript
>     grnexmpl                            PostScript
>     groff-man-pages      PDF+txt
>     hdtbl                               roff+PostScript
>     meintro              PostScript
>     meref                PostScript
>     mom                             PDF
>     ms                   PostScript
>     msboxes                         PDF
>     pdfmark                         PDF
>     webpage         HTML                HTML+PostScript
> 
>     Additionally, groff.html and groff.info are always built.
> 
>     To summarize, every format appears in at least two different
>     columns, PDF even in three.  If you remove any one of the
>     formats "html", "other", or "pdf" from the --with-doc option,
>     there is always at least one file that you no longer get at
>     all, in no format whatsoever.
> 
>  3. The option still doesn't work as intended, even after all the
>     repairs that were recently done, as it is typical for features
>     that are illogical and ill-conceived in the first place.
>     For example, if you remove "other", you also miss one PDF file,
>     even if you explicitly ask for "pdf".  If you remove "info",
>     the build does not even finish at all but crashes instead.
> 
>     In spite of all theses design issues and implementation bugs,
>     i don't recall anyone ever complaining.  Consequently, it seems
>     that nobody ever uses the option for any real-world purpose.
> 
>  4. Deleting the apparently unused option permits significant
>     simplification of the build system, including deleting
>     thirty-four variables and seventeen "if"-statements from
>     the configuration scripts and makefiles.  This matters because
>     it simplifies maintenance and testing for developers and release
>     managers, who are all short on working time.
> 
>  5. Neither the --with-doc options nor its syntax using a
>     comma-separated list appears to be any kind of a GNU standard,
>     so it's certainly not expected of us to provide configurability
>     in this way.
>     At least most of the relevant results that a web search
>     turned up (not counting noise and false positives) were
>     directly related to GNU troff.
> 
> My patch is appended at the end.
> Its size is -194 +12 lines.
> 
> Here are some additional comments regarding individual bugs.
> 
>  6. In m4/groff.m4, removing "info" from "--with-doc" disables setting
>     the MAKEINFO environment variable, causing the build to fail with:
> 
>       [...]
>       GROFF    doc/meref.me
>       GEN      doc/groff.info
>     /bin/sh: -o: not found
>     *** Error 127 in . (Makefile:12353 'doc/groff.info':
>       @echo "  GEN     " doc/groff.info;LANG=C  LC_ALL=C   -o doc/groff.info
>       --enable-encodin...)
> 
>  7. If Ghostscript is not available, pdfmark.pdf is not built
>     during the "make all" stage (which is probably correct),
>     but then built during the "make dist" stage (which may
>     be a bug).  To stay focussed, i do not yet attempt to fix
>     that bug with this patch.

Yes, it sounds like a bug that "make dist" attempts to create
pdfmark.pdf; that file is not in EXTRA_DIST, does not appear in the
distribution archives we're creating now, and there is no reason it
should.

>  8. If Ghostscript is not available, the "make all" stage
>     builds doc/groff-man-pages.pdf and contrib/sboxes/msboxes.pdf
>     anyway.  That may be another bug.  Again, i do not yet attempt
>     to fix that bug with this patch.

Yes, those sounds like bugs too, and probably both my fault to boot.

> Here is the list of deleted variables:
> 
>   doc
>   docadd_examples
>   docadd_html
>   docadd_info
>   docadd_other
>   docadd_pdf
>   doc_dist_target_ok
>   install_otherdoc
>   install_shipped_htmldoc
>   make_examples
>   make_htmlexamples
>   make_infodoc
>   make_install_examples
>   make_install_htmlexamples
>   make_install_infodoc
>   make_install_otherdoc
>   make_install_pdfexamples
>   make_install_shipped_htmldoc
>   make_otherdoc
>   make_pdfexamples
>   make_uninstall_examples
>   make_uninstall_htmlexamples
>   make_uninstall_infodoc
>   make_uninstall_otherdoc
>   make_uninstall_pdfexamples
>   make_uninstall_shipped_htmldoc
>   uninstall_otherdoc
>   uninstall_shipped_htmldoc
>   BUILD_EXAMPLES
>   BUILD_HTMLEXAMPLES
>   BUILD_OTHERDOC
>   BUILD_PDFEXAMPLES
>   GROFF_DOC_CHECK
>   INSTALL_SHIPPED_HTML

What a breath of fresh air to get rid of all these.

> The following variables remain because they are needed to skip
> building and installing some non-critical HTML and PDF files if the
> system lacks the necessary tools:
> 
>   make_htmldoc
>   make_install_htmldoc
>   make_uninstall_htmldoc
>   BUILD_HTML
>   make_pdfdoc
>   make_install_pdfdoc
>   make_uninstall_pdfdoc
>   BUILD_PDFDOC

This seems much more manageable.

> After this patch, it is likely that some additional cleanup and
> simplification become feasible, but the patch is large enough as it
> stands and i want it to remain focussed.

Yes; apart from the bugs you identified in items 7 and 8, I think we
agreed that --with-examples also doesn't justify its cost.

> What do you think?  If you agree with both the idea and the
> implementation, i intend to send it to the list for comments,
> incoporating all the improvements resulting from your feedback.

Please proceed.  Feel free to copy my reply to the list.

> Branden, i expect this will conflict with some of the patches you
> still have in your tree, maybe even quite badly.  So feel free to
> tell me to wait posting to the list until you feel ready to push
> those patches that conflict and until you have done so.

I have no pending conflicts.  I mean to address the
generated-font-and-desc-file stamp issue, but haven't gotten to it yet.
(And even if I had, it might not conflict.)

We will want a NEWS item reporting the disappearance of this
configuration option.  A quick scan suggests that it's not mentioned
anywhere apart from old ChangeLog files.

Thank you very much for your work on this.

Best regards,
Branden

----- End forwarded message -----


commit 578b00ede93dd38b7279d52b5dddebc32885f18b
Author: Ingo Schwarze <schwarze@openbsd.org>
Date:   Tue Apr 12 14:36:12 2022 +0200

    [configure] Delete the --with-doc option.
    
    This option was harmful, ill-designed, buggy, and essentially
    unmaintained and untested.  For more details on the rationale,
    see the NEWS file.
    
    OK gbranden@

diff --git a/ChangeLog b/ChangeLog
index bf5e5a42f..316dd8901 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2022-04-12  Ingo Schwarze <schwarze@openbsd.org>
+
+       Delete the harmful, ill-designed, buggy, and essentially
+       unmaintained and untested --with-doc option of the configure
+       script.
+
+       * configure.ac: Delete five AM_CONDITIONAL variables, one
+       autoconf(1) macro call, and some related diagnostic output.
+       * doc/doc.am: Delete two BUILD_EXAMPLES and one BUILD_OTHERDOC
+       conditional and use BUILD_HTML instead of BUILD_HTMLEXAMPLES.
+       * m4/groff.m4: Delete the GROFF_DOC_CHECK macro and simplify the
+       macros GROFF_HTML_PROGRAMS, GROFF_INSTALL_INFO, GROFF_MAKEINFO,
+       and GROFF_PDFDOC_PROGRAMS.  This also deletes more than thirty
+       configuration variables.
+       * Makefile.am: Delete comments about 16 variables that are no
+       longer set.
+       * NEWS: Add details regarding the rationale.
+
 2022-04-09  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [localization]: Define hyphenation mode registers for Japanese
diff --git a/Makefile.am b/Makefile.am
index b96015687..76fb26d4a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -308,47 +308,18 @@ man5dir=$(manroot)/man$(man5ext)
 man7ext=7
 man7dir=$(manroot)/man$(man7ext)
 
-# doc_dist_target_ok
-# `dist' target is disallowed in some `configure' combinations.
-
-# The configure script checks whether the user wants the info documentation.
-# For the repo version this mechanism also suppresses building via `makeinfo'.
-# make_infodoc
-# make_install_infodoc
-# make_uninstall_infodoc
-
 # The configure script checks whether all necessary utility programs for
 # grohtml are available -- only then can we build the HTML documentation.
 # make_htmldoc
 # make_install_htmldoc
 # make_uninstall_htmldoc
 
-# make_htmlexamples
-# make_install_htmlexamples
-# make_uninstall_htmlexamples
-
 # The configure script also checks whether all necessary utility programs
 # for pdfroff are available -- only then can we build PDF documentation.
 # make_pdfdoc
 # make_install_pdfdoc
 # make_uninstall_pdfdoc
 
-# make_pdfexamples
-# make_install_pdfexamples
-# make_uninstall_pdfexamples
-
-# `other' documentation, e.g., `meref.me' and `pic.ms', as well as their
-# generated counterparts..
-# make_otherdoc
-# make_install_otherdoc
-# make_uninstall_otherdoc
-
-# `examples' -- a generic switch, but the generated examples are further
-# subdivided to catch HTML and PDF production availability.
-# make_examples
-# make_install_examples
-# make_uninstall_examples
-
 # Windows `.cmd' files
 # make_winscripts
 # make_install_winscripts
diff --git a/NEWS b/NEWS
index 33085833b..db9870469 100644
--- a/NEWS
+++ b/NEWS
@@ -420,6 +420,26 @@ o The semantics of the environment variable 
SOURCE_DATE_EPOCH (support
 o xtotroff now supports a "-d" option to specify the directory in which
   to generate font description files.
 
+o The 'configure' option --with-doc that was introduced in version
+  1.22.3 has been deleted again.  Its basic idea was misguided because
+  each of the documents is only available in a subset of the output
+  formats, so in contrast to the documentation, the option not only
+  affected which output formats were generated, but also restricted the
+  documentation content the user would get in erratic and surprising
+  ways.  The option was also ill-designed in so far as the "examples"
+  keyword did not represent an output format.  Some example files were
+  controlled by the "examples" keyword alone, some by the respective
+  format keywords alone, and some by a combination of both.  The
+  implementation of the option was full of bugs, but few, if any, of
+  these bugs were ever reported by users, giving the impression that
+  few, if any, users ever attempted to use the option, and those who
+  did likely remained unaware that doing so deprived them of parts of
+  the content of the documentation.  Experience has demonstrated that
+  properly maintaining and testing the option exceeds the amount of
+  effort the GNU troff team is able to invest.  Finally, GNU standards
+  contain no recommendation to support this option, and indeed, few, if
+  any, GNU packages apart from groff support it.
+
 o groffer has been deleted from the distribution.
 
 o grog no longer supports the "--warnings" option; the one diagnostic
diff --git a/configure.ac b/configure.ac
index e205fca78..1ea4c377a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,7 +65,6 @@ GROFF_PRINT
 GROFF_REFERDIR_DEFAULT
 AC_PROG_EGREP
 GROFF_PROG_YACC
-GROFF_DOC_CHECK
 GROFF_MAKEINFO
 GROFF_TEXI2DVI
 AC_PROG_RANLIB
@@ -198,13 +197,8 @@ AM_CONDITIONAL([MAKE_DONT_HAVE_RM], [test 
"x$groff_is_rm_defined" = "xno"])
 AM_CONDITIONAL([USEPROGRAMPREFIX], [test x$g = xg])
 
 AM_CONDITIONAL([BUILD_HTML], [test -n "$make_htmldoc"])
-AM_CONDITIONAL([BUILD_HTMLEXAMPLES], [test -n "$make_htmlexamples"])
 AM_CONDITIONAL([BUILD_PDFDOC], [test -n "$make_pdfdoc"])
-AM_CONDITIONAL([BUILD_PDFEXAMPLES], [test -n "$make_pdfexamples"])
-AM_CONDITIONAL([BUILD_OTHERDOC], [test -n "$make_otherdoc"])
-AM_CONDITIONAL([BUILD_EXAMPLES], [test -n "$make_examples"])
 AM_CONDITIONAL([USE_GROFF_ALLOCATOR], [test "x$use_groff_allocator" = "xyes"])
-AM_CONDITIONAL([INSTALL_SHIPPED_HTML], [test -n 
"$make_install_shipped_htmldoc"])
 AM_CONDITIONAL([HAVE_PDFTOOLS], [test "x$groff_have_pdftools" = "xyes" ])
 AM_CONDITIONAL([HAVE_TEXI2DVI], [test "x$groff_have_texi2dvi" = "xyes" ])
 
@@ -232,13 +226,6 @@ echo "\
  X11 support                     : yes
  X11 resources dir               : $appresdir"
 fi
-if test "x$doc" = x; then
-echo "\
- Doc build                       : no"
-else
-echo "\
- Doc build                       : ${doc} "
-fi
 echo "\
  URW fonts for pdf               : $groff_have_urw_fonts
  Use uchardet library for preconv: $groff_have_uchardet
diff --git a/contrib/chem/ChangeLog b/contrib/chem/ChangeLog
index 7f857757a..e40f5dfa7 100644
--- a/contrib/chem/ChangeLog
+++ b/contrib/chem/ChangeLog
@@ -1,3 +1,11 @@
+2022-04-12  Ingo Schwarze <schwarze@openbsd.org>
+
+       Delete the harmful, ill-designed, buggy, and essentially
+       unmaintained and untested --with-doc option of the configure
+       script.  See the NEWS file for more details on the rationale.
+
+       * chem.am: Delete three BUILD_EXAMPLES conditionals.
+
 2020-04-22  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * chem.1.man:
diff --git a/contrib/chem/chem.am b/contrib/chem/chem.am
index 148ae171c..01d82db41 100644
--- a/contrib/chem/chem.am
+++ b/contrib/chem/chem.am
@@ -38,7 +38,6 @@ CHEM_EXAMPLES =  \
   contrib/chem/examples/penicillin.chem \
   contrib/chem/examples/reserpine.chem
 
-if BUILD_EXAMPLES
 # Files installed in $(exampledir)/chem
 chemexampledir = $(exampledir)/chem
 nodist_chemexample_DATA = $(CHEM_GENEXAMPLES)
@@ -48,7 +47,6 @@ dist_chemexample_DATA = $(CHEM_EXAMPLES)
 # lazily installed by the local install target
 chemexample122dir = $(chemexampledir)/122
 nodist_chemexample122_DATA = contrib/chem/examples/122/README
-endif
 EXTRA_DIST += \
   contrib/chem/ChangeLog \
   contrib/chem/chem.1.man \
@@ -92,23 +90,19 @@ chem: $(chem_srcdir)/chem.pl $(SH_DEPS_SED_SCRIPT)
 
 install-data-local: install_chem_extra
 install_chem_extra:
-if BUILD_EXAMPLES
        -test -d $(DESTDIR)$(chemexample122dir) \
           || $(mkinstalldirs) $(DESTDIR)$(chemexample122dir);
        for i in $(chem_srcdir)/examples/122/*.chem; do \
          n=`echo $$i | sed 's|$(chem_srcdir)/examples/122/||g'`; \
          $(INSTALL_DATA) $$i $(DESTDIR)$(chemexample122dir)/$$n; \
        done
-endif
 
 uninstall-local: uninstall_chem_extra
 uninstall_chem_extra:
-if BUILD_EXAMPLES
        $(RM) $(DESTDIR)$(exampledir)/chem/122/*
        -rmdir $(DESTDIR)$(exampledir)/chem/122
        $(RM) $(DESTDIR)$(exampledir)/chem/*
        -rmdir $(DESTDIR)$(exampledir)/chem
-endif
        -rmdir $(DESTDIR)$(datasubdir)/pic
 
 dist-hook: dist_chem
diff --git a/contrib/hdtbl/ChangeLog b/contrib/hdtbl/ChangeLog
index 12de4fecf..a66ef7617 100644
--- a/contrib/hdtbl/ChangeLog
+++ b/contrib/hdtbl/ChangeLog
@@ -1,3 +1,11 @@
+2022-04-12  Ingo Schwarze <schwarze@openbsd.org>
+
+       Delete the harmful, ill-designed, buggy, and essentially
+       unmaintained and untested --with-doc option of the configure
+       script.  See the NEWS file for more details on the rationale.
+
+       * hdtbl.am: Delete two BUILD_EXAMPLES conditionals.
+
 2022-03-30  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * hdtbl.am: Eliminate `HDTBL_TFLAG` and `HDTBL_PFLAG` Make
diff --git a/contrib/hdtbl/hdtbl.am b/contrib/hdtbl/hdtbl.am
index 2c10dc6a6..19af0ea2b 100644
--- a/contrib/hdtbl/hdtbl.am
+++ b/contrib/hdtbl/hdtbl.am
@@ -75,16 +75,12 @@ HDTBLPROCESSEDEXAMPLEFILES = \
   contrib/hdtbl/examples/short_reference.ps
 
 hdtblexampledir = $(exampledir)/hdtbl
-
-if BUILD_EXAMPLES
 dist_hdtblexample_DATA = $(HDTBLEXAMPLEFILES)
 nodist_hdtblexample_DATA = \
   $(HDTBLGENFILES) \
   $(HDTBLPROCESSEDEXAMPLEFILES) \
   $(DOC_GNU_EPS)
-else
-EXTRA_DIST += $(HDTBLEXAMPLEFILES)
-endif
+
 $(hdtblexample_DATA): $(HDTBLTMACFILES)
 
 MOSTLYCLEANFILES += $(HDTBLGENFILES) $(HDTBLPROCESSEDEXAMPLEFILES)
@@ -94,7 +90,6 @@ EXTRA_DIST += \
   contrib/hdtbl/TODO \
   contrib/hdtbl/groff_hdtbl.7.man
 
-if BUILD_EXAMPLES
 hdtbl_TESTS = contrib/hdtbl/examples/test-hdtbl.sh
 TESTS += $(hdtbl_TESTS)
 contrib/hdtbl/examples/test-hdtbl.sh: \
@@ -107,7 +102,6 @@ contrib/hdtbl/examples/test-hdtbl.sh: \
          $(top_srcdir)/$(hdtbl_test_template) > $@ \
        && chmod +x $@
 MOSTLYCLEANFILES += $(hdtbl_TESTS)
-endif
 
 # Rule to generate ps and roff files
 SUFFIXES += .roff .in .ps
diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog
index f50b60f4f..3750bf758 100644
--- a/contrib/mom/ChangeLog
+++ b/contrib/mom/ChangeLog
@@ -1,3 +1,12 @@
+2022-04-12  Ingo Schwarze <schwarze@openbsd.org>
+
+       Delete the harmful, ill-designed, buggy, and essentially
+       unmaintained and untested --with-doc option of the configure
+       script.  See the NEWS file for more details on the rationale.
+
+       * mom.am: Delete one INSTALL_SHIPPED_HTML and one BUILD_EXAMPLES
+       conditional and use BUILD_PDFDOC instead of BUILD_PDFEXAMPLES.
+
 2021-03-29  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * mom.am: Eliminate `MOM_TFLAG` and `MOM_PFLAG` Make macros;
diff --git a/contrib/mom/mom.am b/contrib/mom/mom.am
index d566c1ce2..0689df8ca 100644
--- a/contrib/mom/mom.am
+++ b/contrib/mom/mom.am
@@ -38,7 +38,6 @@ momtmacdir = $(tmacdir)
 dist_momtmac_DATA = $(MOMNORMALFILES)
 
 # Files installed in htmldocdir/mom
-if INSTALL_SHIPPED_HTML
 MOMHTMLDOCFILES=\
   contrib/mom/momdoc/stylesheet.css \
   contrib/mom/momdoc/appendices.html \
@@ -65,7 +64,6 @@ MOMHTMLDOCFILES=\
   contrib/mom/momdoc/version-2.html
 momhtmldir = $(htmldocdir)/mom
 momhtml_DATA = $(MOMHTMLDOCFILES)
-endif
 
 # Files installed in $(examplesdir)/mom.  MOMEXAMPLEFILES are located
 # in the source tree, while MOMPROCESSEDEXAMPLEFILES are generated in
@@ -86,14 +84,10 @@ MOMEXAMPLEFILES=\
   contrib/mom/examples/slide-demo.mom \
   contrib/mom/examples/copyright-default.mom \
   contrib/mom/examples/copyright-chapter.mom
-if BUILD_EXAMPLES
 momexampledir = $(exampledir)/mom
 dist_momexample_DATA = $(MOMEXAMPLEFILES)
-else
-EXTRA_DIST += $(MOMEXAMPLEFILES)
-endif
 
-if BUILD_PDFEXAMPLES
+if BUILD_PDFDOC
 MOMPROCESSEDEXAMPLEFILES = \
   contrib/mom/examples/letter.pdf \
   contrib/mom/examples/mom-pdf.pdf \
@@ -159,7 +153,7 @@ penguin.pdf:
 
 install-data-hook: install_mom
 install_mom:
-if BUILD_PDFEXAMPLES
+if BUILD_PDFDOC
        for f in $(PDFDOCFILE); do \
          $(RM) $(DESTDIR)$(pdfdocdir)/$$f; \
          ln -s $(exampledir)/mom/$$f $(DESTDIR)$(pdfdocdir)/$$f; \
diff --git a/doc/doc.am b/doc/doc.am
index f55fe1eda..934367837 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -42,7 +42,6 @@ DOC_GROFF=\
 DOC_GNU_EPS=doc/gnu.eps
 
 # Other doc, installed in $(docdir)
-if BUILD_OTHERDOC
 # Files located in the source tree
 DOCFILES_INST= \
   doc/me-revisions \
@@ -73,9 +72,6 @@ otherdocdir = $(docdir)
 dist_otherdoc_DATA = $(DOCFILES_INST) $(GENERATEDDOCFILES)
 nodist_otherdoc_DATA = $(PROCESSEDDOCFILES)
 MOSTLYCLEANFILES += $(GENERATEDDOCFILES) $(PROCESSEDDOCFILES)
-else
-EXTRA_DIST += $(DOCFILES_INST) $(GENERATEDDOCFILES)
-endif
 EXTRA_DIST += $(DOCFILES_NOINST)
 
 # pdf doc, written in mom and therefore using contrib/mom/mom.am
@@ -110,7 +106,6 @@ EXAMPLEFILES = \
   doc/grnexmpl.g \
   doc/grnexmpl.me
 
-if BUILD_EXAMPLES
 # Generated in the build tree
 PROCESSEDEXAMPLEFILES = \
   doc/webpage.ps \
@@ -119,11 +114,8 @@ docexamplesdir = $(exampledir)
 dist_docexamples_DATA = $(EXAMPLEFILES)
 nodist_docexamples_DATA = $(PROCESSEDEXAMPLEFILES)
 MOSTLYCLEANFILES += $(PROCESSEDEXAMPLEFILES)
-else
-EXTRA_DIST += $(EXAMPLEFILES)
-endif
 
-if BUILD_HTMLEXAMPLES
+if BUILD_HTML
 # webpage.html is generated; webpage*.html files are installed by the
 # local rule.
 HTMLEXAMPLEFILES = doc/webpage.html
@@ -383,7 +375,7 @@ endif
        if test $(top_builddir) != $(top_srcdir); then \
          $(RM) $(top_builddir)/doc/groff.css; \
        fi
-if BUILD_HTMLEXAMPLES
+if BUILD_HTML
        if test -d $(doc_builddir); then \
          cd $(doc_builddir) \
          && for f in $(HTMLEXAMPLEFILESALL); do \
@@ -427,7 +419,7 @@ install_doc_gnu_eps: $(DOC_GNU_EPS)
        done
 
 install_doc_examples: $(DOC_GNU_EPS)
-if BUILD_HTMLEXAMPLES
+if BUILD_HTML
        cd $(doc_builddir) \
        && for f in `ls $(HTMLEXAMPLEFILESALL)`; do \
          $(RM) $(DESTDIR)$(exampledir)/$$f; \
@@ -444,10 +436,8 @@ endif
 uninstall-hook: \
   uninstall_doc_examples uninstall_doc_htmldoc uninstall_mom
 uninstall_doc_examples:
-if BUILD_EXAMPLES
        $(RM) $(DESTDIR)$(exampledir)/gnu.eps
-endif
-if BUILD_HTMLEXAMPLES
+if BUILD_HTML
        -test -d $(DESTDIR)$(docexamplesdir) \
        && cd $(DESTDIR)$(docexamplesdir) \
        && for f in $(HTMLEXAMPLEFILESALL); do \
diff --git a/m4/groff.m4 b/m4/groff.m4
index 50077e714..f33736cbe 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -75,83 +75,6 @@ AC_DEFUN([GROFF_PERL],
      AC_MSG_ERROR([perl version is too old], 1))])
 
 
-# It is possible to fine-tune generation of documentation.
-
-AC_DEFUN([GROFF_DOC_CHECK],
-  [AC_ARG_WITH([doc],
-    [AS_HELP_STRING([--with-doc[[=TYPE]]],
-      [choose which manuals (beside man pages) are desirable. \
-       TYPE can be 'yes' or 'no', or a comma-separated list of \
-       one or multiple of 'html', 'info', 'other', 'pdf', and \
-       'examples', to restrict what is produced])],
-    [doc="$withval"],
-    [doc=yes])
-  test "$doc" = no && doc=''
-  if test "$doc" = yes; then
-    doc_dist_target_ok=yes
-    docadd_html=yes
-    docadd_info=yes
-    docadd_other=yes
-    docadd_pdf=yes
-    docadd_examples=yes
-  else
-    # Don't use case/esac, verify input.
-    doc_dist_target_ok=no
-    docadd_html=no
-    docadd_info=no
-    docadd_other=no
-    docadd_pdf=no
-    docadd_examples=no
-    OFS=$IFS
-    IFS=','
-    set -- $doc
-    IFS=$OFS
-    for i
-    do
-      test "$i" = html     && { docadd_html=yes; continue; }
-      test "$i" = info     && { docadd_info=yes; continue; }
-      test "$i" = other    && { docadd_other=yes; continue; }
-      test "$i" = pdf      && { docadd_pdf=yes; continue; }
-      test "$i" = examples && { docadd_examples=yes; continue; }
-      AC_MSG_WARN([Invalid '--with-doc' argument:] $i)
-    done
-  fi
-  if test $docadd_html = yes; then
-    make_install_shipped_htmldoc=install_shipped_htmldoc
-    make_uninstall_shipped_htmldoc=uninstall_shipped_htmldoc
-  else
-    make_install_shipped_htmldoc=
-    make_uninstall_shipped_htmldoc=
-  fi
-  if test $docadd_other = yes; then
-    make_otherdoc=otherdoc
-    make_install_otherdoc=install_otherdoc
-    make_uninstall_otherdoc=uninstall_otherdoc
-  else
-    make_otherdoc=
-    make_install_otherdoc=
-    make_uninstall_otherdoc=
-  fi
-  if test "$docadd_examples" = yes; then
-    make_examples=examples
-    make_install_examples=install_examples
-    make_uninstall_examples=uninstall_examples
-  else
-    make_examples=
-    make_install_examples=
-    make_uninstall_examples=
-  fi
-  AC_SUBST([doc_dist_target_ok])
-  AC_SUBST([make_install_shipped_htmldoc])
-  AC_SUBST([make_uninstall_shipped_htmldoc])
-  AC_SUBST([make_otherdoc])
-  AC_SUBST([make_install_otherdoc])
-  AC_SUBST([make_uninstall_otherdoc])
-  AC_SUBST([make_examples])
-  AC_SUBST([make_install_examples])
-  AC_SUBST([make_uninstall_examples])])
-
-
 # We need makeinfo from Texinfo 5.0 or newer, for @codequoteundirected.
 # The minor version checking logic is present for future needs.
 
@@ -160,7 +83,6 @@ AC_DEFUN([GROFF_MAKEINFO],
   # src dir>/build-aux/missing makeinfo.  As we need a more precise
   # check of makeinfo version, we don't use it.
   [MAKEINFO=
-   if test "$docadd_info" = yes; then
      missing=
      AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo])
      if test -z "$MAKEINFO"; then
@@ -192,19 +114,7 @@ AC_DEFUN([GROFF_MAKEINFO],
 [Get the 'texinfo' package version 5.0 or newer.])
        fi
      fi
-
-     make_infodoc=infodoc
-     make_install_infodoc=install_infodoc
-     make_uninstall_infodoc=uninstall_infodoc
-   else
-     make_infodoc=
-     make_install_infodoc=
-     make_uninstall_infodoc=
-   fi
-   AC_SUBST([MAKEINFO])
-   AC_SUBST([make_infodoc])
-   AC_SUBST([make_install_infodoc])
-   AC_SUBST([make_uninstall_infodoc])])
+   AC_SUBST([MAKEINFO])])
 
 # 'makeinfo' and 'texi2dvi' are distributed together, so if the former
 # is too old, the latter is too.
@@ -223,9 +133,6 @@ AC_DEFUN([GROFF_HTML_PROGRAMS],
   [make_htmldoc=
    make_install_htmldoc=
    make_uninstall_htmldoc=
-   make_htmlexamples=
-   make_install_htmlexamples=
-   make_uninstall_htmlexamples=
    AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH])
 
    missing=
@@ -239,16 +146,9 @@ AC_DEFUN([GROFF_HTML_PROGRAMS],
    test "$GHOSTSCRIPT" = "missing" && missing="$missing 'gs'"
 
    if test -z "$missing"; then
-     if test $docadd_html = yes; then
        make_htmldoc=htmldoc
        make_install_htmldoc=install_htmldoc
        make_uninstall_htmldoc=uninstall_htmldoc
-       if test "$docadd_examples" = yes; then
-         make_htmlexamples=html_examples
-         make_install_htmlexamples=install_htmlexamples
-         make_uninstall_htmlexamples=uninstall_htmlexamples
-       fi
-     fi
    else
      plural=`set $missing; test $[#] -gt 1 && echo s`
      missing=`set $missing
@@ -264,8 +164,7 @@ AC_DEFUN([GROFF_HTML_PROGRAMS],
         done
         echo $missing`
 
-     docnote=.
-     test $docadd_html = yes && docnote=';
+     docnote=';
   therefore, it will be possible neither to prepare, nor to install,
   groff-generated documentation in HTML format.'
 
@@ -275,14 +174,10 @@ AC_DEFUN([GROFF_HTML_PROGRAMS],
 
   Consequently, groff's HTML backend (grohtml) will not work properly$docnote
      ])
-     doc_dist_target_ok=no
    fi
    AC_SUBST([make_htmldoc])
    AC_SUBST([make_install_htmldoc])
-   AC_SUBST([make_uninstall_htmldoc])
-   AC_SUBST([make_htmlexamples])
-   AC_SUBST([make_install_htmlexamples])
-   AC_SUBST([make_uninstall_htmlexamples])])
+   AC_SUBST([make_uninstall_htmldoc])])
 
 
 # To produce PDF docs, we need both awk and ghostscript.
@@ -291,9 +186,6 @@ AC_DEFUN([GROFF_PDFDOC_PROGRAMS],
   [make_pdfdoc=
    make_install_pdfdoc=
    make_uninstall_pdfdoc=
-   make_pdfexamples=
-   make_install_pdfexamples=
-   make_uninstall_pdfexamples=
    AC_REQUIRE([GROFF_AWK_PATH])
    AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH])
 
@@ -301,24 +193,16 @@ AC_DEFUN([GROFF_PDFDOC_PROGRAMS],
    test "$AWK" = missing && missing="'awk'"
    test "$GHOSTSCRIPT" = missing && missing="$missing 'gs'"
    if test -z "$missing"; then
-     if test $docadd_pdf = yes; then
        make_pdfdoc=pdfdoc
        make_install_pdfdoc=install_pdfdoc
        make_uninstall_pdfdoc=uninstall_pdfdoc
-       if test "$docadd_examples" = yes; then
-         make_pdfexamples=pdfexamples
-         make_install_pdfexamples=install_pdfexamples
-         make_uninstall_pdfexamples=uninstall_pdfexamples
-       fi
-     fi
    else
      plural=`set $missing; test $[#] -eq 2 && echo s`
      test "$plural" = s \
        && missing=`set $missing; echo "$[1] and $[2]"` \
        || missing=`echo $missing`
 
-     docnote=.
-     test $docadd_pdf = yes && docnote=';
+     docnote=';
   therefore, it will neither be possible to prepare, nor to install,
   documentation and most of the examples in PDF format.'
 
@@ -328,14 +212,10 @@ AC_DEFUN([GROFF_PDFDOC_PROGRAMS],
 
   Consequently, groff's PDF formatter (pdfroff) will not work properly$docnote
      ])
-     doc_dist_target_ok=no
    fi
    AC_SUBST([make_pdfdoc])
    AC_SUBST([make_install_pdfdoc])
-   AC_SUBST([make_uninstall_pdfdoc])
-   AC_SUBST([make_pdfexamples])
-   AC_SUBST([make_install_pdfexamples])
-   AC_SUBST([make_uninstall_pdfexamples])])
+   AC_SUBST([make_uninstall_pdfdoc])])
 
 # Option to configure path to URW fonts
 AC_DEFUN([GROFF_URW_FONTS_PATH],
@@ -1276,9 +1156,7 @@ AC_DEFUN([GROFF_INSTALL_SH],
 # Test whether install-info is available.
 
 AC_DEFUN([GROFF_INSTALL_INFO],
-  [if test $docadd_info = yes; then
-     AC_CHECK_PROGS([INSTALL_INFO], [install-info], [:])
-   fi])
+  [AC_CHECK_PROGS([INSTALL_INFO], [install-info], [:])])
 
 
 # At least one Unix system, Apple Macintosh Rhapsody 5.5,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]