version.h rebuild change in stable

Vincent Lefevre vincent at
Sat Jun 1 12:16:24 UTC 2019

On 2019-06-01 16:36:38 +1000, Cameron Simpson wrote:
> On 31May2019 17:36, Kevin J. McCarthy <kevin at> wrote:
> > On Fri, May 31, 2019 at 11:19:27PM +0200, Vincent Lefevre wrote:
> > > On 2019-05-31 09:37:02 -0700, Kevin J. McCarthy wrote:
> > > > Of course, if anyone has an idea how to do this in a way that
> > > > works portably, we can revisit.  But for now I consider their
> > > > build issues more important than the minor convenience for
> > > > developers.
> > > 
> > > How about using AM_CONDITIONAL in, setting a variable
> > > GNU_MAKE when GNU Make is used (based on "make --version" output)?
> > 
> > That might be a workable idea.  I worry about making assumptions about
> > the 'make' program that will be used, though.  It's possible the user
> > will invoke another make program outside of the search path, in certain
> > environments.  Or am I just being too paranoid... :-)

There would be a problem in practice only if the user has GNU make
in his search path, but chooses later to use a different make. But
why would he do that? Anywway, changing the version of "make" after
configure is not supported by the configure script, which already

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
  $as_echo_n "(cached) " >&6
  cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
        @echo '@@@%%%=$(MAKE)=@@@%%%'
# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
    eval ac_cv_prog_make_${ac_make}_set=yes;;
    eval ac_cv_prog_make_${ac_make}_set=no;;
rm -f conftest.make
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }


> I'm an opinionated make user. Can you explain why you want the "FORCE"
> target at all?

The goal is to make sure that version.h is up-to-date after an update
such as "git pull".

> Coming around to my opinions here, I think the BSD make is more correct:
> version.h got remade in the "FORCE" version of the Makefile, and its
> dependents need a rebuild. GNU make's presuming that file content are all
> there are - suppose an action changed something else significant not
> considered? Eg maybe the build process copies an ACL off version.h or some
> other thing beyond the content. Obviously we don't actually do that, but IMO
> GNU make is being too clever.

No, a rule with no prerequisites or recipe is undefined behavior in
POSIX, thus can be used as an extension, and this is what GNU make
does (see Section 4.7 Rules without Recipes or Prerequisites).

Vincent Lefèvre <vincent at> - Web: <>
100% accessible validated (X)HTML - Blog: <>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

More information about the Mutt-dev mailing list