groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/01: Install texinfo doc on 'make install-pdf' and 'make insta


From: Bertrand Garrigues
Subject: [groff] 01/01: Install texinfo doc on 'make install-pdf' and 'make install-html'
Date: Thu, 13 Dec 2018 17:49:24 -0500 (EST)

bgarrigues pushed a commit to branch master
in repository groff.

commit fbc3538c0f122c9f12c03114b9cd150f6b065cd3
Author: Bertrand Garrigues <address@hidden>
Date:   Thu Dec 13 23:14:27 2018 +0100

    Install texinfo doc on 'make install-pdf' and 'make install-html'
    
    * doc/doc.am:
    - Use automake 'install-pdf-local' and 'install-html-local' rules
    to install groff.pdf and groff.html
    - New rules 'uninstall_pdf' and 'uninstall_html'.
    - Use $(RM) instead of 'rm'.
    - Don't try to build doc if 'BUILD_INFODOC' is not set.
    * INSTALL.REPO: document texinfo build and installation.
---
 ChangeLog    | 12 ++++++++++++
 INSTALL.REPO | 22 ++++++++++++++++++++++
 doc/doc.am   | 36 +++++++++++++++++++++++++++++-------
 3 files changed, 63 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 199777a..5de9469 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2018-12-08 Bertrand Garrigues <address@hidden>
+
+       Install texinfo doc on 'make install-pdf' and 'make install-html'
+
+       * doc/doc.am:
+       - Use automake 'install-pdf-local' and 'install-html-local' rules
+       to install groff.pdf and groff.html
+       - New rules 'uninstall_pdf' and 'uninstall_html'.
+       - Use $(RM) instead of 'rm'.
+       - Don't try to build doc if 'BUILD_INFODOC' is not set.
+       * INSTALL.REPO: document texinfo build and installation.
+
 2018-12-10 Ingo Schwarze <address@hidden>
 
        * Makefile.am: Remove the unused variables PREFIXMAN5 and PREFIXMAN7.
diff --git a/INSTALL.REPO b/INSTALL.REPO
index 204ce8f..490f9d7 100644
--- a/INSTALL.REPO
+++ b/INSTALL.REPO
@@ -71,6 +71,11 @@ You can also build groff in an out of source build tree, 
which is cleaner:
 Note that parallel build is also supported and make can be invoked
 with the -j option, which will greatly speed up the build.
 
+When the build is finished you can install the whole groff
+installation with:
+
+    $ make install
+
 Notes:
 
 If you use an old `autoreconf' version < 2.69, there might be an error
@@ -94,6 +99,23 @@ Troff errors of the types
 
 may safely be ignored.
 
+A few sanity checks can be done with the command:
+
+    $ make check
+
+This will perform some tests on the generated examples.  However,
+these checks are for the moment quite limited.
+
+The groff texinfo manual can be generated in pdf and html formats
+with:
+
+    $ make doc
+
+and installed with:
+
+    $ make install-doc
+
+
 2. Modification of autotools files
 ----------------------------------
 
diff --git a/doc/doc.am b/doc/doc.am
index 5c06d9c..97332d7 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -249,7 +249,7 @@ endif
 uninstall-hook: uninstall_doc_examples uninstall_doc_htmldoc uninstall_mom
 uninstall_doc_examples:
 if BUILD_EXAMPLES
-       rm -f $(DESTDIR)$(exampledir)/gnu.eps
+       $(RM) -f $(DESTDIR)$(exampledir)/gnu.eps
 endif
 if BUILD_HTMLEXAMPLES
        -test -d $(DESTDIR)$(docexamplesdir) && \
@@ -345,7 +345,6 @@ EXTRA_DIST += doc/groff.texi doc/fdl.texi
 # blockquote is not properly closed, see fixinfo.sh for more details
 .texi.html:
        @$(MKDIR_P) $(doc_builddir)/
-       @$(MKDIR_P) $(doc_builddir)/`basename address@hidden/
        LANG=C \
        LC_ALL=C \
        $(MAKEINFO) --html -I $(doc_srcdir) \
@@ -353,7 +352,7 @@ EXTRA_DIST += doc/groff.texi doc/fdl.texi
        LANG=C \
        LC_ALL=C \
        $(MAKEINFO) --html -I $(doc_srcdir) --no-split \
-         -o doc/`basename address@hidden/`basename address@hidden $<
+         -o $@ $<
        if test "$(makeinfo_version_numeric)" -lt 5000; then \
          echo "patching $@ with fixinfo.sh"; \
          $(SHELL) $(doc_srcdir)/fixinfo.sh \
@@ -365,6 +364,7 @@ EXTRA_DIST += doc/groff.texi doc/fdl.texi
 # install-pdf, install-dvi, install-ps, install-html are standard
 # Automake targets.
 
+if BUILD_INFODOC
 doc: doc_all
 doc_all: doc_txt dvi pdf html
 doc_txt: doc/groff.txt
@@ -374,14 +374,19 @@ pdf: doc_pdf
 doc_pdf: doc/groff.pdf
 html: doc_html
 doc_html: doc/groff.html
+install-doc: install-pdf install-html
+endif
 
 distclean-local: clean_infodoc clean_otherdoc
 maintainer-clean-local: clean_infodoc clean_otherdoc
 clean_infodoc:
        -$(RM) $(doc_builddir)/groff.info*
+       -$(RM) $(doc_builddir)/groff.pdf
+       -$(RM) $(doc_builddir)/groff.dvi
+       -$(RM) -r $(doc_builddir)/groff.html.*
 clean_otherdoc:
        -cd $(doc_builddir) && \
-         rm -rf *.pdf *.html *.txt *.dvi *.html.mono *.t2p *.t2d
+         $(RM) -r *.pdf *.html *.txt *.dvi *.t2p *.t2d
 
 install-data-local: install_infodoc
 if BUILD_INFODOC
@@ -389,24 +394,41 @@ install_infodoc: doc/groff.info
        -test -d $(DESTDIR)$(infodir) || $(mkinstalldirs) $(DESTDIR)$(infodir)
          for p in doc/groff.info `ls doc/groff.info*`; do \
            f=`basename $$p`; \
-           rm -f $(DESTDIR)$(infodir)/$$f; \
+           $(RM) $(DESTDIR)$(infodir)/$$f; \
            $(INSTALL_DATA) $$p $(DESTDIR)$(infodir)/$$f; \
          done
        $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) \
          $(DESTDIR)$(infodir)/groff.info
+install-pdf-local: doc/groff.pdf
+       -test -d $(DESTDIR)$(pdfdocdir) || $(mkinstalldirs) 
$(DESTDIR)$(pdfdocdir)
+       cp $(top_builddir)/doc/groff.pdf $(DESTDIR)$(pdfdocdir)
+install-html-local: doc/groff.html
+       -test -d $(DESTDIR)$(htmldocdir)/groff.html.mono || $(mkinstalldirs) 
$(DESTDIR)$(htmldocdir)/groff.html.mono
+       cp -r $(top_builddir)/doc/groff.html 
$(DESTDIR)$(htmldocdir)/groff.html.mono
+       cp -r $(top_builddir)/doc/groff.html.node $(DESTDIR)$(htmldocdir)
 else
 install_infodoc:
 endif
 
-uninstall-local: uninstall_infodoc
+uninstall-local: uninstall_infodoc uninstall-pdf uninstall-html
+uninstall_doc: uninstall-local
+uninstall-doc: uninstall-local
 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; \
+         $(RM) $$f; \
        done
 endif
+uninstall-pdf:
+if BUILD_INFODOC
+       -$(RM) -f $(DESTDIR)$(pdfdocdir)/groff.pdf 
+endif
+uninstall-html:
+if BUILD_INFODOC
+       -$(RM) -r $(DESTDIR)$(htmldocdir)/groff.html.*
+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]