diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-05-26 09:22:44 -0500 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-05-26 09:22:44 -0500 |
commit | eb5a7d0041923247c2108546d8490bb615d1c5d9 (patch) | |
tree | 48b7d8d7c144569fa70c2710c72e0af6b4209550 /m4 | |
parent | fc21c6121d4df0cc7736f3b37db5aaa2f5a5e6c6 (diff) | |
download | groff-git-eb5a7d0041923247c2108546d8490bb615d1c5d9.tar.gz |
[build]: Fix error in snapshot archive builds.
* m4/groff.m4 (GROFF_PROG_YACC, GROFF_MAKEINFO, GROFF_TEXI2DVI): Fix
logic error in detection of build scenario: the presence of a ".git"
directory is not an indicator that we're not building from a
distribution archive, because we might be building from a snapshot
archive (which also lacks it). Instead, perform checks required only
by builds from Git checkouts and snapshot archives if the
".tarball-version" file is not present.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/groff.m4 | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/m4/groff.m4 b/m4/groff.m4 index 37e0da2a7..551e872e6 100644 --- a/m4/groff.m4 +++ b/m4/groff.m4 @@ -65,14 +65,17 @@ AC_DEFUN([GROFF_PRINT], [ # Bison-generated parsers have problems with C++ compilers other than # g++. Thus, byacc is preferred over bison. If no yacc program is -# available, we issue an error only if building from Git, because files -# generated by a yacc are already present in the distribution archive. +# available, we issue an error only if not building from a distribution +# archive, because files generated by a yacc are already present there. AC_DEFUN([GROFF_PROG_YACC], [ AC_CHECK_PROGS([YACC], [byacc 'bison -y' yacc], [missing]) - if test "$YACC" = missing && test -d "$srcdir"/.git + if ! test -f "$srcdir"/.tarball-version then - AC_MSG_ERROR([could not find 'byacc', 'bison', or 'yacc'], 1) + if test "$YACC" = missing + then + AC_MSG_ERROR([could not find 'byacc', 'bison', or 'yacc'], 1) + fi fi ]) @@ -101,7 +104,7 @@ AC_DEFUN([GROFF_PROG_M4], [ # The minor version checking logic is present for future needs. AC_DEFUN([GROFF_MAKEINFO], [ - if test -d "$srcdir"/.git + 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 @@ -150,7 +153,7 @@ AC_DEFUN([GROFF_MAKEINFO], [ # is too old, the latter is too. AC_DEFUN([GROFF_TEXI2DVI], [ - if test -d "$srcdir"/.git + if ! test -f "$srcdir"/.tarball-version then AC_REQUIRE([GROFF_MAKEINFO]) AC_CHECK_PROG([PROG_TEXI2DVI], [texi2dvi], [texi2dvi], [missing]) |