[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 01/01: Fix 'dvi' and 'pdf' texinfo doc generation.
From: |
Bertrand Garrigues |
Subject: |
[groff] 01/01: Fix 'dvi' and 'pdf' texinfo doc generation. |
Date: |
Tue, 18 Dec 2018 18:06:21 -0500 (EST) |
bgarrigues pushed a commit to branch master
in repository groff.
commit b78b8ba1a973421ad00770fc10bcd894fc7fc717
Author: Bertrand Garrigues <address@hidden>
Date: Tue Dec 18 18:57:16 2018 +0100
Fix 'dvi' and 'pdf' texinfo doc generation.
GNU make has a built-in variable 'TEXI2DVI' but it is not the case
of all 'make' implementations, which causes 'make doc' to fail with
an unclear message although 'texi2dvi' is available. Also,
'texi2dvi' is invoked inconditionnally.
* m4/groff.m4 (GROFF_TEXI2DVI): new macro to detect properly the
presence of 'texi2dvi'.
* configure.ac: use 'GROFF_TEXI2DVI' and define automake conditional
'HAVE_TEXI2DVI'.
* doc/doc.am:
- Define TEXI2DVI to 'texi2dvi'.
- Print an error message if 'texi2dvi' is not available.
---
ChangeLog | 19 +++++++++++++++++++
configure.ac | 2 ++
doc/doc.am | 16 ++++++++++++++++
m4/groff.m4 | 11 ++++++++++-
4 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 5de9469..835d26c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2018-12-18 Bertrand Garrigues <address@hidden>
+
+ Fix 'dvi' and 'pdf' texinfo doc generation.
+
+ GNU make has a built-in variable 'TEXI2DVI' but it is not the case
+ of all 'make' implementations, which causes 'make doc' to fail
+ with an unclear message although 'texi2dvi' is available. Also,
+ 'texi2dvi' is invoked inconditionnally.
+
+ * m4/groff.m4 (GROFF_TEXI2DVI): new macro to detect properly the
+ presence of 'texi2dvi'.
+
+ * configure.ac: use 'GROFF_TEXI2DVI' and define automake conditional
+ 'HAVE_TEXI2DVI'.
+
+ * doc/doc.am:
+ - Define TEXI2DVI to 'texi2dvi'.
+ - Print an error message if 'texi2dvi' is not available.
+
2018-12-08 Bertrand Garrigues <address@hidden>
Install texinfo doc on 'make install-pdf' and 'make install-html'
diff --git a/configure.ac b/configure.ac
index e0a049f..28e75f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,7 @@ AC_PROG_EGREP
GROFF_PROG_YACC
GROFF_DOC_CHECK
GROFF_MAKEINFO
+GROFF_TEXI2DVI
AC_PROG_RANLIB
GROFF_INSTALL_SH
GROFF_INSTALL_INFO
@@ -200,6 +201,7 @@ AM_CONDITIONAL([BUILD_OTHERDOC], [test -n "$make_otherdoc"])
AM_CONDITIONAL([BUILD_EXAMPLES], [test -n "$make_examples"])
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" ])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([test-groff], [chmod +x test-groff])
diff --git a/doc/doc.am b/doc/doc.am
index 97332d7..a3a2ff0 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -315,6 +315,12 @@ build_infodoc:
endif
EXTRA_DIST += doc/groff.texi doc/fdl.texi
+# GNU Make has a built-in variable TEXI2DVI but it is not the case of
+# all 'make' implementation. As it default to 'texi2dvi' we simply
+# redefine it here.
+
+TEXI2DVI = texi2dvi
+texi2dvi_missing = no
# Rules to generate various doc files from .texi files.
.texi.txt:
@$(MKDIR_P) $(doc_builddir)
@@ -323,20 +329,30 @@ EXTRA_DIST += doc/groff.texi doc/fdl.texi
$(MAKEINFO) --enable-encoding -I$(doc_srcdir) --plaintext -o $@ $<
.texi.dvi:
+if HAVE_TEXI2DVI
@$(MKDIR_P) $(doc_builddir)
LANG=C \
LC_ALL=C \
TEXINPUTS="$(top_srcdir)/build-aux:$(TEXINPUTS)" \
MAKEINFO='$(MAKEINFO) -I $(doc_srcdir)' \
$(TEXI2DVI) -e --batch --build-dir=doc/`basename address@hidden -o $@ $<
+else
+ @echo "Program texi2dvi is missing, cannot generate dvi doc"; \
+ exit 1
+endif
.texi.pdf:
+if HAVE_TEXI2DVI
@$(MKDIR_P) $(doc_builddir)
LANG=C \
LC_ALL=C \
TEXINPUTS="$(top_srcdir)/build-aux:$(TEXINPUTS)" \
MAKEINFO='$(MAKEINFO) -I $(doc_srcdir)' \
$(TEXI2DVI) -e --batch --pdf --build-dir=doc/`basename address@hidden
-o $@ $<
+else
+ @echo "Program texi2dvi is missing, cannot generate pdf doc"; \
+ exit 1
+endif
# This will generate both html split into several files and html doc
# in a single file. If texinfo version < 5.0, we process the resulting
diff --git a/m4/groff.m4 b/m4/groff.m4
index 75aa3e2..5343f22 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -209,6 +209,15 @@ AC_DEFUN([GROFF_MAKEINFO],
AC_SUBST([make_uninstall_infodoc])
AC_SUBST([makeinfo_version_numeric])])
+AC_DEFUN([GROFF_TEXI2DVI],
+ [AC_CHECK_PROG([PROG_TEXI2DVI], [texi2dvi], [found], [missing])
+ if test "x$PROG_TEXI2DVI" = "xfound"; then
+ groff_have_texi2dvi=yes;
+ else
+ groff_have_texi2dvi=no;
+ fi
+ ])
+
# The following programs are needed for grohtml.
AC_DEFUN([GROFF_HTML_PROGRAMS],
@@ -1585,7 +1594,7 @@ AC_DEFUN([GROFF_REFERDIR_DEFAULT],
AC_DEFUN([GROFF_PROG_XPMTOPPM],
[AC_CHECK_PROG([XPMTOPPM], [xpmtoppm], [found], [missing])])
-# Check for make builtin variable RM
+# Check for make built-in variable RM
AC_DEFUN([GROFF_MAKE_RM],
[AC_MSG_CHECKING(whether make has builtin variable RM)
cat <<EOF > test_make_rm.mk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 01/01: Fix 'dvi' and 'pdf' texinfo doc generation.,
Bertrand Garrigues <=