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

 
 

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

Submitted by:  Bhavesh <bhavesh>
Submitted on:  Wed 25 Jun 2014 07:16:09 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Works for mePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 4.0Operating System: None
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

Ok thanks for the update.

Paul D. Smith <psmith>
Project 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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 26 Jun 2014 02:18:08 PM UTCpsmithStatusNone=>Works for me
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1