It will fail where the make version shows 4 digits (for example 3.79.1) and
we need to check availability of a 3 digit make (for example 3.81)..
I cant think of any immediate way to tackle these sort of arithmetic
situations though...but seems very interesting

regards
kalyan


On Fri, Sep 26, 2008 at 8:12 PM, Stephan Beal <[EMAIL PROTECTED]> wrote:

> On Fri, Sep 26, 2008 at 3:08 PM, Dave Korn <[EMAIL PROTECTED]> wrote:
> >  $(MAKE_VERSION) has all the info you need toimplement a check.  Dunno
> what
> > version it was first introduced in, but if it's not defined, it's gotta
> be
> > pretty old.
>
> Great! Here's one solution, in case anyone's interested:
>
> MAKE_REQUIRED_VERSION := 380# MAKE_VERSION stripped of any dots
> VERSION_CHECK := \
>        $(shell \
>        test $$(echo $(MAKE_VERSION) | sed -e 's/\.//g') -ge \
>        "$(MAKE_REQUIRED_VERSION)" 2>/dev/null \
>        && echo 1 || echo 0)
>
> ifneq (1,$(VERSION_CHECK))
> $(error Your make is too old! Time to upgrade!)
> endif
>
> Also works when MAKE_VERSION is undefined.
>
> Happy hacking!
> --
> ----- stephan beal
> http://wanderinghorse.net/home/stephan/
>
>
> _______________________________________________
> Help-make mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/help-make
>
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to