bug-make
[Top][All Lists]
Advanced

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

Flavor of function parameters for nested calls


From: LeJacq, Jean Pierre
Subject: Flavor of function parameters for nested calls
Date: Thu, 01 Dec 2016 10:07:04 -0500
User-agent: KMail/4.14.1 (Linux/4.7.0-0.bpo.1-amd64; KDE/4.14.2; x86_64; ; )

I have a question on the scope of function parameters when using the
flavor() function to see if they are defined.

Consider the following functions and subsequent calls:

    inner_fn = $(info 1F="$(flavor 1)" 1V="$(1)" 2F="$(flavor 2)" 2V="$(2)")
    outer_fn = $(call inner_fn,one)

    $(call outer_fn,one)
    $(call outer_fn,one,two)

This will produce the following output with make-4.2.90

    1F="simple" 1V="one" 2F="undefined" 2V=""
    1F="simple" 1V="one" 2F="simple" 2V=""

It appears that the scope of the parameters in the outer function intrudes
into the inner function for the flavor() function but not for the value.

Is this expected behavior or a bug?

-- 
JP




reply via email to

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