summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2022-06-09 16:12:40 -0500
committerG. Branden Robinson <g.branden.robinson@gmail.com>2022-06-09 16:12:40 -0500
commit95c149af5664a6d7d5bb3c0e9b3e6cf9042d738e (patch)
treedfb8b0e643b5c7e97af06d3f9fdea1666b18db39 /m4
parentc5fe430a770ebb053aea0676bad14b9442dcd01d (diff)
downloadgroff-git-95c149af5664a6d7d5bb3c0e9b3e6cf9042d738e.tar.gz
m4/groff.m4: Run makeinfo, texi2dvi checks always.
* m4/groff.m4 (GROFF_PROG_MAKEINFO, GROFF_PROG_TEXI2DVI): Largely revert commit d5013ededc, 21 May: run checks for 'makeinfo' and 'texi2dvi' programs regardless of presence of ".tarball-version" file. Their presence is a necessary (but not sufficient) condition for refresh of formatted forms of our Texinfo manual if the source is modified. Begins addressing <https://savannah.gnu.org/bugs/?62592>.
Diffstat (limited to 'm4')
-rw-r--r--m4/groff.m476
1 files changed, 35 insertions, 41 deletions
diff --git a/m4/groff.m4 b/m4/groff.m4
index 44b15012b..a72acb5f4 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -106,64 +106,58 @@ AC_DEFUN([GROFF_PROG_M4], [
# The minor version checking logic is present for future needs.
AC_DEFUN([GROFF_PROG_MAKEINFO], [
- if ! test -f "$srcdir"/.tarball-version
- then
# By default automake will set MAKEINFO to MAKEINFO = ${SHELL} <top
# src dir>/build-aux/missing makeinfo. As we need a more precise
# check of makeinfo version, we don't use it.
- MAKEINFO=
- missing=
- AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo])
- if test -z "$MAKEINFO"
+ MAKEINFO=
+ missing=
+ AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo])
+ if test -z "$MAKEINFO"
+ then
+ missing="missing 'makeinfo'"
+ else
+ AC_MSG_CHECKING([for makeinfo version])
+ # We need an additional level of quoting to make sed's regexps
+ # work.
+ [makeinfo_version=`$MAKEINFO --version 2>&1 \
+ | sed -e 's/^.* \([^ ][^ ]*\)$/\1/' -e '1q'`]
+ AC_MSG_RESULT([$makeinfo_version])
+ # Consider only the first two numbers in version number string.
+ makeinfo_version_major=`IFS=.; set x $makeinfo_version; echo ${2}`
+ makeinfo_version_minor=`IFS=.; set x $makeinfo_version; echo ${3}`
+ makeinfo_version_numeric=`
+ expr ${makeinfo_version_major}000 + $makeinfo_version_minor`
+ if test $makeinfo_version_numeric -lt 5000
then
- missing="missing 'makeinfo'"
- else
- AC_MSG_CHECKING([for makeinfo version])
- # We need an additional level of quoting to make sed's regexps
- # work.
- [makeinfo_version=`$MAKEINFO --version 2>&1 \
- | sed -e 's/^.* \([^ ][^ ]*\)$/\1/' -e '1q'`]
- AC_MSG_RESULT([$makeinfo_version])
- # Consider only the first two numbers in version number string.
- makeinfo_version_major=`IFS=.; set x $makeinfo_version; echo ${2}`
- makeinfo_version_minor=`IFS=.; set x $makeinfo_version; echo ${3}`
- makeinfo_version_numeric=`
- expr ${makeinfo_version_major}000 + $makeinfo_version_minor`
- if test $makeinfo_version_numeric -lt 5000
- then
- missing="'makeinfo' is too old."
- MAKEINFO=
- fi
+ missing="'makeinfo' is too old."
+ MAKEINFO=
fi
+ fi
- if test -n "$missing"
+ if test -n "$missing"
+ then
+ infofile=doc/groff.info
+ test -f $infofile || infofile="$srcdir"/$infofile
+ if test ! -f $infofile \
+ || test "$srcdir"/doc/groff.texi -nt $infofile
then
- infofile=doc/groff.info
- test -f $infofile || infofile="$srcdir"/$infofile
- if test ! -f $infofile \
- || test "$srcdir"/doc/groff.texi -nt $infofile
- then
- AC_MSG_ERROR($missing
+ AC_MSG_ERROR($missing
[Get the 'texinfo' package version 5.0 or newer.])
- fi
fi
- AC_SUBST([MAKEINFO])
fi
+ AC_SUBST([MAKEINFO])
])
# 'makeinfo' and 'texi2dvi' are distributed together, so if the former
# is too old, the latter is too.
AC_DEFUN([GROFF_PROG_TEXI2DVI], [
- if ! test -f "$srcdir"/.tarball-version
+ AC_REQUIRE([GROFF_PROG_MAKEINFO])
+ AC_CHECK_PROG([PROG_TEXI2DVI], [texi2dvi], [texi2dvi], [missing])
+ groff_have_texi2dvi=no
+ if test "$PROG_TEXI2DVI" != missing && test -n "$MAKEINFO"
then
- AC_REQUIRE([GROFF_PROG_MAKEINFO])
- AC_CHECK_PROG([PROG_TEXI2DVI], [texi2dvi], [texi2dvi], [missing])
- groff_have_texi2dvi=no
- if test "$PROG_TEXI2DVI" != missing && test -n "$MAKEINFO"
- then
- groff_have_texi2dvi=yes
- fi
+ groff_have_texi2dvi=yes
fi
])