gbranden pushed a commit to branch master
in repository groff.

commit bd35d413cd7abd0c785c5f3d9220e56496afbd6d
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Oct 8 03:53:03 2026 -0500

    Stop letting code coverage crash Solaris build.
    
    Defuse land mine planted by our support code coverage report generation,
    and set off by pre-POSIX Issue 8 (2024) make(1)s.
    
    * Makefile.am: Comment out `?=` conditional macro definitions.
    
    * configure.ac: Use POSIX shell conditional parameter expansion and
      `AC_SUBST()` instead.
---
 ChangeLog    |  9 +++++++++
 Makefile.am  |  7 +++++--
 configure.ac | 12 ++++++++++++
 3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 033a8f9a2..5135fc0aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2026-10-08  G. Branden Robinson <[email protected]>
+
+       Defuse land mine planted by our support code coverage report
+       generation, and set off by pre-POSIX Issue 8 (2024) make(1)s.
+
+       * Makefile.am: Comment out `?=` conditional macro definitions.
+       * configure.ac: Use POSIX shell conditional parameter expansion
+       and `AC_SUBST()` instead.
+
 2026-10-05  G. Branden Robinson <[email protected]>
 
        * man/man.am (man/groff.7.man): Fix man/groff.7.man generation.
diff --git a/Makefile.am b/Makefile.am
index d49a5eebc..32deb25f5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -881,8 +881,11 @@ init-coverage:
        $(MAKE) $(AM_MAKEFLAGS) clean
        lcov --directory . --zerocounters
 
-COVERAGE_CCOPTS ?= "-g --coverage"
-COVERAGE_OUT ?= doc/coverage
+# TODO: Uncomment these and update "configure.ac" when all "make"s we
+# support themselves support the now-standard `?=` macro expansion
+# operator.
+#COVERAGE_CCOPTS ?= "-g --coverage"
+#COVERAGE_OUT ?= doc/coverage
 
 build-coverage:
        $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) \
diff --git a/configure.ac b/configure.ac
index e8c4318c6..521505313 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,18 @@ AM_INIT_AUTOMAKE([subdir-objects])
 AM_MAINTAINER_MODE([disable])
 AM_SILENT_RULES([yes])
 
+# Support maintainer-mode coverage targets even on systems using a
+# make(1) non-conforming with POSIX Issue 8 (2024), like that on
+# Solaris.
+#
+# TODO: Drop this block when all "make"s we support themselves support
+# the now-standard `?=` macro expansion operator.
+
+: ${COVERAGE_CCOPTS:=\"-g --coverage\"}
+: ${COVERAGE_OUT:=doc/coverage}
+AC_SUBST([COVERAGE_CCOPTS])
+AC_SUBST([COVERAGE_OUT])
+
 # checks for programs
 # Autoconf [2.70,2.72] tries to cram C11 and C++11 down our throats.  We
 # don't (yet) want them.

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to