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