On Tue, Nov 27, 2018 at 07:47:12PM +0100, Bruno Haible wrote: > Eric Blake wrote: > > > In other words, can you guarantee that $(GREP) will never expand to empty? > > > > If we change gl_INIT() to AC_REQUIRE([AC_PROG_GREP]), then that should > > be sufficient to ensure $(GREP) is set by the time Makefile is parsed, > > which in turn will propagate to maint.mk. > > Yes. And (question to Roman): what the proper place to change, so that > gl_INIT() contains AC_REQUIRE([AC_PROG_GREP]) ? > > Hint: The answer is contained in this part of the Gnulib documentation: > https://www.gnu.org/software/gnulib/manual/html_node/Writing-modules.html > > Bruno >
I'm quite new to gnulib but thanks to Eric and your comments that should do it: diff --git a/modules/maintainer-makefile b/modules/maintainer-makefile index 39b51583c..13b8c546a 100644 --- a/modules/maintainer-makefile +++ b/modules/maintainer-makefile @@ -14,6 +14,7 @@ configure.ac: AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER], [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])]) AC_REQUIRE([AC_PROG_SED]) +AC_REQUIRE([AC_PROG_GREP]) Makefile.am: EXTRA_DIST += $(top_srcdir)/maint.mk