bugmake - Bugs: bug #2590, add loop control to Make

 
 

bug #2590: add loop control to Make

Submitted by:  None
Submitted on:  Wed 19 Feb 2003 01:38:32 AM UTC  
 
Severity: 1 - WishItem Group: Enhancement
Status: Works for mePrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: NoneOperating System: Any
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 03 Apr 2003 01:24:08 AM UTC, comment #2:

I'm not willing to add any more "basic" functions to GNU make; only functions which significantly increase its power, like $(call ...) and $(eval ...), will be considered. I'm completely uninterested in writing YASL (Yet Another Scripting Language) for make: there are already a huge variety of these and there's no need for one more incompatible language. On the TODO list for GNU make is integrating support for Guile as an embedded scripting language, in which case you'll have all the functionality you want.

In the meantime, if cook is what you want you know where to find it. I've never claimed that GNU make was the best build tool ever: if it doesn't meet your needs, you're free to find something else. GNU make has a certain niche, which is the best, most powerful POSIX compatible make implementation around. If you don't care about the latter there are definitely tools which are better than GNU make at the former.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Wed 19 Feb 2003 02:01:25 AM UTC, comment #1:

Make already has a loop control, and has done for a long time: the foreach function. See the GNU make manual for a description. Combined with the $(call ..) function you can already generate closures such as you describe:

A.x = B C
B.x = D E
C.x = F G

closure = $(1) $(foreach v,$($(1).x),$(call closure,$(v)))

all: ; @echo closure is $(call closure,A)

$ make
closure is A B C D E F G

Note you need GNU make 3.80 to avoid errors about recursive references to the closure variable.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Wed 19 Feb 2003 01:38:32 AM UTC, original submission:

After the introduction of eval to Make in 3.80, it is logical to add a loop control like while. This is very useful in cases like computing the following "closure":

A.x = B C
B.x = D E
C.x = F G

The closure A.x is A B C D E F G

This can greatly simply the way to manage link dependency among libraries.

Anonymous

 

(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

 

CC list is empty

 

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 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Wed 19 Feb 2003 02:01:25 AM UTCpsmithStatusNone=>(Error - Not Found)
  Assigned toNone=>NA
  Open/ClosedOpen=>(Error - Not Found)
Wed 19 Feb 2003 02:01:24 AM UTCpsmithSeverity3 - Normal=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1