A few days ago I was preparing to release grep and wanted to make sure
it'd work with the latest automake and autoconf, so I built and installed
each from master. That exposed these errors when bootstrapping grep. I
think it was a prerequisite to have run grep's "make maintainer-clean":

  configure.ac:41: warning: _AM_PROG_RM_F is m4_require'd but not\
    m4_defun'd
  configure.ac:41: warning: _AM_PROG_XARGS_N is m4_require'd but not\
    m4_defun'd
  configure:5058: error: possibly undefined macro: _AM_PROG_RM_F
  configure:5059: error: possibly undefined macro: _AM_PROG_XARGS_N

I've just pushed the attached fix.
Introduced in v1.16.5-46-g38da1d906 and v1.16.5-45-g3099097d7
so this doesn't need a NEWS update.

Mike, can you add an automake test that would have caught this?

>From 208f103f2607eaed95aa0d227c5627b4363ffb7b Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyer...@fb.com>
Date: Mon, 23 May 2022 23:20:37 -0700
Subject: [PATCH] fix: autoreconf fails due to .m4 files added but not
 installed

* m4/local.mk (dist_automake_ac_DATA): Add both rmf.m4 and xargsn.m4.
Building grep from "make maintainer-clean" state, failed like this:
  configure.ac:41: warning: _AM_PROG_RM_F is m4_require'd but not\
    m4_defun'd
  configure.ac:41: warning: _AM_PROG_XARGS_N is m4_require'd but not\
    m4_defun'd
  configure:5058: error: possibly undefined macro: _AM_PROG_RM_F
  configure:5059: error: possibly undefined macro: _AM_PROG_XARGS_N
---
 m4/local.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/m4/local.mk b/m4/local.mk
index 3bc333b7b..7ed018996 100644
--- a/m4/local.mk
+++ b/m4/local.mk
@@ -46,6 +46,7 @@ dist_automake_ac_DATA = \
   %D%/options.m4 \
   %D%/python.m4 \
   %D%/prog-cc-c-o.m4 \
+  %D%/rmf.m4 \
   %D%/runlog.m4 \
   %D%/sanity.m4 \
   %D%/silent.m4 \
@@ -53,7 +54,8 @@ dist_automake_ac_DATA = \
   %D%/substnot.m4 \
   %D%/tar.m4 \
   %D%/upc.m4 \
-  %D%/vala.m4
+  %D%/vala.m4 \
+  %D%/xargsn.m4

 dist_system_ac_DATA = %D%/acdir/README

-- 
2.35.1.677.gabf474a5dd

Reply via email to