bugmake - Bugs: bug #45799, handle local variables in $(call )

 
 

bug #45799: handle local variables in $(call )

Submitter:  Thierry LARMOIRE <tlarmoire>
Submitted:  Thu 20 Aug 2015 12:10:12 PM UTC
   
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  Duplicate Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  3.82 Operating System:  Any
Fixed Release:  4.4 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 31 Oct 2022 08:16:29 PM UTC, comment #3: 

Thank you !

Thierry LARMOIRE <tlarmoire>
Mon 31 Oct 2022 07:31:13 PM UTC, comment #2: 

Thanks for pointing this out Jouke!

Paul D. Smith <psmith>
Group administrator
Mon 31 Oct 2022 07:10:03 PM UTC, comment #1: 

The recently released GNU Make 4.4 has the $(let ...) function, which provides local variables. The current feature request is thus taken care of.

Jouke Witteveen <jwitteveen>
Thu 20 Aug 2015 12:10:12 PM UTC, original submission:  

add a lset function

$(lset var_name,value)

function_table_entry
...
  { STRING_SIZE_TUPLE("lset"),          2,  2,  1,  func_lset},


static char *
func_lset (char o, char *argv, const char *funcname UNUSED)
{
  if(argv[0] && argv[1])
  {
    define_variable(argv[0],strlen(argv[0]),argv[1],o_command,0);
    o = variable_buffer_output (o, argv[1], strlen (argv[1]));
  }
  return o;
}

note, this defines locals in $(foreach ) also :
$(foreach src,$(srcs),$(lset obj,$(subst .c,.o,$(src)))$(info $(obj)))

Thierry LARMOIRE <tlarmoire>

 

(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 jwitteveen (Posted a comment)
  • -email is unavailable- added by tlarmoire (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-10-31 psmith StatusNone Duplicate
        Open/ClosedOpen Closed
        Component VersionNone 3.82
        Fixed ReleaseNone 4.4

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code