patchmake - Patches: patch #2483, $(lastword )

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #2483: $(lastword )

Submitter:  Boris Kolpackov <bosk>
Submitted:  Fri 16 Jan 2004 05:49:30 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Fixed Release:  CVS

Fri 16 Jan 2004 05:49:30 PM UTC, original submission:  

I would like to propose addition of a new built-in function 'lastword' with the following motivation:

  • There is already the $(firstword ) function.


  • With introduction of MAKEFILE_LIST variable the following

  construct becomes quite common:

  $(word $(words $(MAKEFILE_LIST),$(MAKEFILE_LIST))

  With the new function this can be rewritten as

  $(lastword $(MAKEFILE_LIST))

  • Suggested (straightforward) implementation is at least

  two times faster than $(word $(words ...),...) in current 
  implementation. This could be significant in potentially
  long lists like MAKEFILE_LIST.

Attached patch against current CVS includes implementation
of $(lastword ) and updated documentation.

Boris Kolpackov <bosk>
Group Member

 

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

Attached Files
file #6782:  lastword.patch added by bosk (4KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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.

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-02-27 psmith StatusNone Done
    Open/ClosedOpen Closed
    Fixed ReleaseNone CVS
2004-01-16 bosk Attached File- Added lastword.patch, #2525
    Carbon-Copy- Added boris --AT-- kolpackov --DOT-- net

Back to the top

Powered by Savane 3.13-02a9.
Corresponding source code