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 configure.ac, setting a variable
GNU_MAKE when GNU Make is used (based on "make --version" output)?

Then, in Makefile.am, have

if GNU_MAKE

version.h: FORCE
        echo '#define MUTT_VERSION "'`sh "$(srcdir)/version.sh"`'"' > $@.tmp
        cmp -s $@ $@.tmp && rm -f $@.tmp || mv $@.tmp $@
FORCE:

else

version.h: $(srcdir)/version.sh
        echo '#define MUTT_VERSION "'`sh "$(srcdir)/version.sh"`'"' > version.h

endif

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to