[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 36/46: Fix configure --with-doc options.
From: |
Bertrand Garrigues |
Subject: |
[groff] 36/46: Fix configure --with-doc options. |
Date: |
Tue, 27 Jan 2015 22:59:32 +0000 |
bgarrigues pushed a commit to branch automake3
in repository groff.
commit 694191c6e319105bdb21ff67604335fac8f399cc
Author: Bertrand Garrigues <address@hidden>
Date: Sat Sep 13 00:44:01 2014 +0200
Fix configure --with-doc options.
Test and fix all the options --with-doc that can be passed to
configure.
---
TESTS | 44 ++++++++++++++++++++++++++++++++++++++++
contrib/chem/chem.am | 2 +-
contrib/hdtbl/hdtbl.am | 11 +++++----
contrib/mom/mom.am | 6 ++++-
contrib/pdfmark/pdfmark.am | 2 +
doc/doc.am | 48 ++++++++++++++++++++++++++++++++-----------
6 files changed, 93 insertions(+), 20 deletions(-)
diff --git a/TESTS b/TESTS
index 25abda0..2b37081 100644
--- a/TESTS
+++ b/TESTS
@@ -514,6 +514,50 @@ 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.3/
+ -- 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.3/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.3/html/ is present.
+
+ - Passing to configure option: --with-doc=pdf
+ Only
+ $(DESTDIR)/usr/local/share/doc/groff-1.22.3/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.3/
+
+ - Passing to configure option: --with-doc=info
+ $(DESTDIR)/usr/local/share/doc is not created.
+ Only $(DESTDIR/usr/local/share/info/ is installed
+
+ - Note that pre-built HTML doc in contrib/mom is installed even if
+ the tools needed to build html doc are not available.
+
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/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 4dca75c..a2b07de 100644
--- a/contrib/mom/mom.am
+++ b/contrib/mom/mom.am
@@ -90,8 +90,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 16c6193..b4d55a4 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -76,18 +76,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
@@ -172,7 +177,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 \
@@ -203,12 +208,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; \
@@ -219,13 +226,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 \
@@ -236,7 +244,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
@@ -269,17 +276,26 @@ 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)
LANG=C \
LC_ALL=C \
$(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:
@@ -347,6 +363,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 \
@@ -356,14 +373,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'.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 36/46: Fix configure --with-doc options.,
Bertrand Garrigues <=