groff-commit
[Top][All Lists]
Advanced

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

[groff] 36/46: Test and fix all the options --with-doc that can be passe


From: Bertrand Garrigues
Subject: [groff] 36/46: Test and fix all the options --with-doc that can be passed to configure
Date: Sun, 05 Oct 2014 22:31:08 +0000

bgarrigues pushed a commit to branch automake3
in repository groff.

commit 839d0c1fb32cf182b738686fbbc494e0b6cb7c26
Author: Bertrand Garrigues <address@hidden>
Date:   Sat Sep 13 00:44:01 2014 +0200

    Test and fix all the options --with-doc that can be passed to configure
---
 TESTS                      |   45 +++++++++++++++++++++++++++++++++++++++++
 contrib/chem/chem.am       |    2 +-
 contrib/gideal/gideal.am   |    7 ++++++
 contrib/hdtbl/hdtbl.am     |   11 +++++----
 contrib/mom/mom.am         |    6 ++++-
 contrib/pdfmark/pdfmark.am |    2 +
 doc/doc.am                 |   48 ++++++++++++++++++++++++++++++++-----------
 7 files changed, 101 insertions(+), 20 deletions(-)

diff --git a/TESTS b/TESTS
index 5c2571f..b2e9689 100644
--- a/TESTS
+++ b/TESTS
@@ -527,6 +527,51 @@ in the install tree).
   'make distcheck' passes correctly, and the tarball generated by
   'make dist' is identical to the one generated with X support.
 
+3.2 Options to build the doc
+
+  - Default behavour
+    -- By default all the documentation (except texinfo documents)
+       will be installed in:
+       $(DESTDIR)/usr/local/share/doc/groff-1.22.2/
+    -- The only texinfo documentation installed by default is:
+       $(DESTDIR)/usr/local/share/info/groff.info
+
+-> TODO: Check if the texinfo doc in other formats, if built, should
+   be installed.
+
+  - Passing to configure option: --with-doc=no
+
+    No doc is built nor installed, $(DESTDIR)/usr/local/share/doc
+    is not even created. groff.info is not installed.
+
+  - Passing to configure option: --with-doc=examples
+
+    Only $(DESTDIR)/usr/local/share/doc/groff-1.22.2/examples is
+    present, and contain files in format other than html and pdf
+    formats.
+
+  - Passing to configure option: --with-doc=html
+
+    Only $(DESTDIR)/usr/local/share/doc/groff-1.22.2/html/ is present.
+
+  - Passing to configure option: --with-doc=pdf
+    Only
+    $(DESTDIR)/usr/local/share/doc/groff-1.22.2/pdf/pdfmark.pdf
+    is present
+
+  - Passing to configure option: --with-doc=other
+
+    Only .me and .ps files are present in
+    $(DESTDIR)/usr/local/share/doc/groff-1.22.2/
+
+  - Passing to configure option: --with-doc=info
+    $(DESTDIR)/usr/local/share/doc is not created.
+    Only $(DESTDIR/usr/local/share/info/ is installed
+
+Diff with old build system: On the old build system,
+$(DESTDIR)/usr/local/share/doc/groff-1.22.2/examples/ideal/files is
+always installed, no matter which option is passed, which is a bug.
+   
 Notes
 -----
 
diff --git a/contrib/chem/chem.am b/contrib/chem/chem.am
index 608e704..442d1e6 100644
--- a/contrib/chem/chem.am
+++ b/contrib/chem/chem.am
@@ -110,8 +110,8 @@ if BUILD_EXAMPLES
        -rmdir $(DESTDIR)$(exampledir)/chem/122
        $(RM) $(DESTDIR)$(exampledir)/chem/*
        -rmdir $(DESTDIR)$(exampledir)/chem
-       -rmdir $(DESTDIR)$(datasubdir)/pic
 endif
+       -rmdir $(DESTDIR)$(datasubdir)/pic
 
 dist-hook: dist_chem
 dist_chem:
diff --git a/contrib/gideal/gideal.am b/contrib/gideal/gideal.am
index 5dd36bf..275fb08 100644
--- a/contrib/gideal/gideal.am
+++ b/contrib/gideal/gideal.am
@@ -33,10 +33,17 @@ gideallibfilesdir = $(datasubdir)/ideal/libfiles
 dist_gideallibfiles_DATA = \
   contrib/gideal/libfiles/README.txt
 
+if BUILD_EXAMPLES
 gidealfilesdir = $(exampledir)/ideal/files
 dist_gidealfiles_DATA = \
   contrib/gideal/files/README.txt \
   contrib/gideal/files/test.groff
+else
+EXTRA_DIST += \
+  contrib/gideal/files/README.txt \
+  contrib/gideal/files/opaque_MIT.ideal.ms \
+  contrib/gideal/files/test.groff
+endif
 
 EXTRA_DIST += \
   contrib/gideal/ChangeLog \
diff --git a/contrib/hdtbl/hdtbl.am b/contrib/hdtbl/hdtbl.am
index e1e9165..e54fb14 100644
--- a/contrib/hdtbl/hdtbl.am
+++ b/contrib/hdtbl/hdtbl.am
@@ -74,10 +74,12 @@ HDTBLPROCESSEDEXAMPLEFILES = \
   contrib/hdtbl/examples/short_reference.ps
 
 hdtblexampledir = $(exampledir)/hdtbl
-dist_hdtblexample_DATA = $(HDTBLEXAMPLEFILES)
-nodist_hdtblexample_DATA = $(HDTBLGENFILES)
+
 if BUILD_EXAMPLES
-nodist_hdtblexample_DATA += $(HDTBLPROCESSEDEXAMPLEFILES) gnu.eps
+dist_hdtblexample_DATA = $(HDTBLEXAMPLEFILES)
+nodist_hdtblexample_DATA = $(HDTBLGENFILES) $(HDTBLPROCESSEDEXAMPLEFILES) 
gnu.eps
+else
+EXTRA_DIST += $(HDTBLEXAMPLEFILES) 
 endif
 $(hdtblexample_DATA): $(HDTBLSTRIPFILES)
 
@@ -90,8 +92,7 @@ EXTRA_DIST += \
   contrib/hdtbl/groff_hdtbl.man \
   contrib/hdtbl/hdtbl.tmac-u \
   contrib/hdtbl/hdmisc.tmac-u \
-  contrib/hdtbl/examples \
-  $(HDTBLEXAMPLEFILES)
+  contrib/hdtbl/examples
 
 # Rule to generate ps and roff files
 SUFFIXES += .roff .in .ps
diff --git a/contrib/mom/mom.am b/contrib/mom/mom.am
index d55d118..118e274 100644
--- a/contrib/mom/mom.am
+++ b/contrib/mom/mom.am
@@ -87,8 +87,12 @@ MOMEXAMPLEFILES=\
   contrib/mom/examples/penguin.ps \
   contrib/mom/examples/penguin.pdf \
   contrib/mom/examples/mom.vim
+if BUILD_EXAMPLES
 momexampledir = $(exampledir)/mom
-momexample_DATA = $(MOMEXAMPLEFILES)
+dist_momexample_DATA = $(MOMEXAMPLEFILES)
+else
+EXTRA_DIST += $(MOMEXAMPLEFILES)
+endif
 
 if BUILD_PDFEXAMPLES
 MOMPROCESSEDEXAMPLEFILES = \
diff --git a/contrib/pdfmark/pdfmark.am b/contrib/pdfmark/pdfmark.am
index fb571dd..0942acf 100644
--- a/contrib/pdfmark/pdfmark.am
+++ b/contrib/pdfmark/pdfmark.am
@@ -86,6 +86,8 @@ mostlyclean_pdfmark:
 
 uninstall_groffdirs: uninstall-pdfmark-hook
 uninstall-pdfmark-hook:
+if BUILD_PDFDOC
        if test -d $(DESTDIR)$(pdfmarkpdfdocdir); then \
          rmdir $(DESTDIR)$(pdfmarkpdfdocdir); \
        fi
+endif
diff --git a/doc/doc.am b/doc/doc.am
index 7b612c5..63e5a51 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -75,18 +75,23 @@ if BUILD_EXAMPLES
 PROCESSEDEXAMPLEFILES = \
   doc/webpage.ps \
   doc/grnexmpl.ps
-# webpage.html is generated, webpage*.html files are installed by the local 
rule.
-HTMLEXAMPLEFILES = doc/webpage.html
-HTMLEXAMPLEFILESALL = webpage*.html
-HTMLEXAMPLEIMAGEFILES = webpage*
 docexamplesdir = $(exampledir)
 dist_docexamples_DATA = $(EXAMPLEFILES)
-nodist_docexamples_DATA = $(HTMLEXAMPLEFILES) $(PROCESSEDEXAMPLEFILES)
+nodist_docexamples_DATA = $(PROCESSEDEXAMPLEFILES)
 MOSTLYCLEANFILES += $(PROCESSEDEXAMPLEFILES)
 else
 EXTRA_DIST += $(EXAMPLEFILES)
 endif
 
+if BUILD_HTMLEXAMPLES
+# webpage.html is generated, webpage*.html files are installed by the local 
rule.
+HTMLEXAMPLEFILES = doc/webpage.html
+HTMLEXAMPLEFILESALL = webpage*.html
+HTMLEXAMPLEIMAGEFILES = webpage*
+htmlexamplesdir = $(exampledir)
+nodist_htmlexamples_DATA = $(HTMLEXAMPLEFILES)
+endif
+
 imagedir = img
 htmldocimagedir = $(htmldocdir)/img
 exampleimagedir = $(exampledir)/img
@@ -171,7 +176,7 @@ endif
          $(RM) $(top_builddir)/doc/groff.css; \
        fi
 
-if BUILD_EXAMPLES
+if BUILD_HTMLEXAMPLES
        if test -d $(doc_builddir); then \
          cd $(doc_builddir) && \
          for f in $(HTMLEXAMPLEFILESALL); do \
@@ -202,12 +207,14 @@ if BUILD_HTML
 endif
 
 install-data-hook: install_doc_examples
-if BUILD_EXAMPLES
 install_doc_examples: gnu.eps
+if BUILD_EXAMPLES
 # Prefer gnu.eps in builddir over srcdir.
        d=.; test -f "gnu.eps" || d=$(doc_srcdir); \
          $(RM) $(DESTDIR)$(exampledir)/gnu.eps; \
          $(INSTALL_DATA) $$d/gnu.eps $(DESTDIR)$(exampledir)/gnu.eps
+endif
+if BUILD_HTMLEXAMPLES
        cd $(doc_builddir) && \
        for f in `ls $(HTMLEXAMPLEFILESALL)`; do \
          $(RM) $(DESTDIR)$(exampledir)/$$f; \
@@ -218,13 +225,14 @@ install_doc_examples: gnu.eps
        $(RM) $(DESTDIR)$(exampleimagedir)/$(HTMLEXAMPLEIMAGEFILES)
        $(INSTALL_DATA) $(doc_builddir)/$(imagedir)/$(HTMLEXAMPLEIMAGEFILES) \
          $(DESTDIR)$(exampleimagedir)
-else
-install_doc_examples:
 endif
 
 uninstall-hook: uninstall_doc_examples uninstall_doc_htmldoc uninstall_mom
 uninstall_doc_examples:
 if BUILD_EXAMPLES
+       rm -f $(DESTDIR)$(exampledir)/gnu.eps
+endif
+if BUILD_HTMLEXAMPLES
        -test -d $(DESTDIR)$(docexamplesdir) && \
        cd $(DESTDIR)$(docexamplesdir) && \
        for f in $(HTMLEXAMPLEFILESALL); do \
@@ -235,7 +243,6 @@ if BUILD_EXAMPLES
        for f in $(HTMLEXAMPLEIMAGEFILES); do \
          $(RM) $$f; \
        done
-       $(RM) $(DESTDIR)$(exampledir)/gnu.eps
        -rmdir $(DESTDIR)$(docexamplesdir)/$(imagedir)
        -rmdir $(DESTDIR)$(docexamplesdir)
 endif
@@ -264,15 +271,24 @@ endif
 # info_TEXINFOS = doc/groff.texi
 # doc_groff_TEXINFOS = doc/fdl.texi
 #
-# Note that GNU standards require to install only info doc.
-all: doc/groff.info
+# Note that GNU standards require to install only info doc. Info doc
+# can still be disabled by passing 
+# --with-doc=<something else than info or yes> 
+# to configure
+
+all: build_infodoc
+if BUILD_INFODOC
+build_infodoc: doc/groff.info
 groffinfodir = $(infodir)
 groffpdfdir = $(infodir)
 MOSTLYCLEANFILES += doc/groff.info doc/groff.info-2 doc/groff.info-2
-EXTRA_DIST += doc/groff.texi doc/fdl.texi
 doc/groff.info: $(doc_srcdir)/groff.texi
        @$(MKDIR_P) $(doc_builddir)
        $(MAKEINFO) -o doc/groff.info --enable-encoding -I$(doc_srcdir) 
$(doc_srcdir)/groff.texi
+else
+build_infodoc:
+endif
+EXTRA_DIST += doc/groff.texi doc/fdl.texi
 
 # Rules to generate various doc files from .texi files.
 .texi.txt:
@@ -330,6 +346,7 @@ clean_otherdoc:
          rm -rf *.pdf *.html *.txt *.dvi *.html.mono *.t2p *.t2d
 
 install-data-local: install_infodoc
+if BUILD_INFODOC
 install_infodoc: doc/groff.info
        -test -d $(DESTDIR)$(infodir) || $(mkinstalldirs) $(DESTDIR)$(infodir)
          for p in doc/groff.info `ls doc/groff.info*`; do \
@@ -339,14 +356,19 @@ install_infodoc: doc/groff.info
          done
        $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) \
          $(DESTDIR)$(infodir)/groff.info
+else
+install_infodoc:
+endif
 
 uninstall-local: uninstall_infodoc
 uninstall_infodoc:
+if BUILD_INFODOC
        -$(INSTALL_INFO) --remove --info-dir=$(DESTDIR)$(infodir) \
          $(DESTDIR)$(infodir)/groff.info
        -for f in `ls $(DESTDIR)$(infodir)/groff.info*`; do \
          rm -f $$f; \
        done
+endif
 
 # File used by contrib/hdtbl and contrib/pdfmark. It is distributed in
 # doc.eps. We try in priority to use the file in 'doc'.



reply via email to

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