version.h rebuild change in stable

Kevin J. McCarthy kevin at
Sat Jun 1 14:18:39 UTC 2019

On Sat, Jun 01, 2019 at 04:36:38PM +1000, Cameron Simpson wrote:
>If I were writing the conjectured goal above I'd probably do this:
> mutt_version='#define MUTT_VERSION "'`sh "$(srcdir)/`'"'
> version_h=`[ -s version.h ] && cat version.h`
> [ "$$mutt_version" = "$$version_h" ] || echo "$$mutt_version" >version.h
>in "configure", not in the Makefile. As a prebuilt step. Once you've 
>got a version.h you're good.

:-) Funnily enough that's the way it was in the first place.  But as 
Vincent mentioned, the change was to save developers from having to 
reconfigure all the time just to bump the version number.

>But I think what I'd really want is:
> version.h: $(srcdir)/
>   echo '#define MUTT_VERSION "'`sh '$?'`'"' >'$@'
>Why _don't_ we just have this?

I'm not a Makefile person myself.  My "fix" added the 
prerequisite and appended to the version.h explicitly just to match the 
target below, reldate.h.

If there is something to be gained by using the Makefile variables I'm 
all ears, but personally I find the recipe less readable with that way.

Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <>

More information about the Mutt-dev mailing list