More waf confusion

Gary E. Miller gem at rellim.com
Wed Mar 29 22:46:01 UTC 2017


Yo Hal!

On Wed, 29 Mar 2017 03:46:39 -0700
Hal Murray <hmurray at megapathdsl.net> wrote:

> >>   ##    ctx.check_cc(auto_add_header_name=True,
> >>   ##                 header_name="stddef.h",
> >>   ##                 mandatory=False)  
> 
> > That might happen if you leave out the define_name argument.  
> 
> I don't see a define_name arg to leave out.
> 
> I poked around and didn't find useful documentation on either
> check_cc or define_name.  I'm probably not looking in the right place.


Not easy to find, it is defined here:

ntpsec/.waf-1.9.7-fc95bab69065dbc43ddd71d4b69d0078/waflib/Tools/c_config.py

check_cc() is a helper/wrapper function to check(), which is in the same
file.  check() collects more basic functions into a usefull  unit.

check_cc() is barely mentioned in the waf book.  Section 10.4.1 gives
a small overview of check().

Here is the relevant part:

        "define_name: sets a define of the form define_name=x when
        the test succeeds (a default value for define_name is usually
        calculated automatically)"

In your case the define name is calculated automatically.  Looking at the
code I see no way to avoid the automagic.  Only thing we could do is
undefine it after the test.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170329/4f065165/attachment.bin>


More information about the devel mailing list