bugmake - Bugs: bug #42617, Loaded Object Interface: function...

 
 

bug #42617: Loaded Object Interface: function call doesn't take variables as parameters

Submitter:  Bhavesh <bhavesh>
Submitted:  Wed 25 Jun 2014 07:16:09 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Works for me Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.0 Operating System:  None
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 26 Jun 2014 02:18:08 PM UTC, comment #3: 

Ok thanks for the update.

Paul D. Smith <psmith>
Group administrator
Thu 26 Jun 2014 01:44:09 PM UTC, comment #2: 

Hello Paul,

It was actually the flag issue. Now it works as expected.

Thanks for your quick reply on this.

-B

Bhavesh <bhavesh>
Wed 25 Jun 2014 08:24:55 PM UTC, comment #1: 

Please show the way your code is invoking the gmk_add_function() call.  The final option to that function (flags) has a setting to control whether the arguments are expanded or not expanded; you want to pass GMK_FUNC_DEFAULT (or just 0) here if you want arguments expanded before being called.

There is a regression test that verifies (very simply) that this flag does the right thing and expands and doesn't expand as expected.  But of course the regression test could have a problem.

But, I think this should work, so please provide more details about what you're doing if it doesn't work for you.

Paul D. Smith <psmith>
Group administrator
Wed 25 Jun 2014 07:16:09 PM UTC, original submission:  

I am trying to call a function (registered with make) from within the makefile.

example:
This is the documented way to call the registered function:

$(function_name param1,param2)

This does work properly.
---------------------------------------------------------------
But when I try to call the function with parameters as variables to avoid hard-coding the parameters every time:

PARAM := param2

$(function_name  param1,$(PARAM))

This call doesn't work at all. it sends $(PARAM) and $(PARAM2) as parameters without expanding them.
This is the my main question, I would like to see how this works with variables as parameters.

---------------------------------------------------------------
I also tried calling this function using the "call" directive:

$(call function_name,param1,$(PARAM2))

This call to the loaded function works fine. It sends the expansion of $(PARAM2) as a variable unlike in the previous example.

Bhavesh <bhavesh>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by bhavesh (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-06-26 psmith StatusNone Works for me
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code