help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to check make version inside a makefile?


From: Paul D. Smith
Subject: Re: How to check make version inside a makefile?
Date: Sun, 9 Apr 2006 14:44:59 -0400

%% Greg Chicares <address@hidden> writes:

  gc> On a related note, I've been using this:

  gc>   ifeq (3.81,$(firstword $(sort $(MAKE_VERSION) 3.81)))
  gc>     # stuff that requires make-3.81 or higher
  gc>   endif

  gc> and would be glad to learn a clearer method.

Well, it depends on what you're trying to do.  One option is to look in
the .FEATURES variable, which was added in 3.81.  See the GNU make
manual for details.

If the feature you're looking for is listed there then that's considered
the best/safest way to test for it, rather than looking at the version
string.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]