helpmake - Support: sr #107228, Desire for a somewhat smarter...

 
 

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

sr #107228: Desire for a somewhat smarter order only dependency

Submitted by:  Brian Cody <epistax2>
Submitted on:  Thu 21 Jan 2010 02:53:44 PM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 1 - WishStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: Any

Thu 21 Jan 2010 03:06:20 PM UTC, comment #2:

No, because 'a' in my case is actually a pattern match that will match hundreds of targets, and we only want to do 'c' if and only if any 'a' matches (and only once).

Thanks

Brian Cody <epistax2>
Thu 21 Jan 2010 03:02:30 PM UTC, comment #1:

Would it work to do something like:

?

Paul D. Smith <psmith>
Project Administrator
Thu 21 Jan 2010 02:53:44 PM UTC, original submission:

I don't much care if the syntax would be different, but one glaring issue that I'm experiencing right now in make is that I cannot have a dependency only be made if it is actually needed. For example given the file:

all : a

a :
@touch a

b:
@touch b

c:
@echo c

a : b | c

The first run would result in b being created, c being echoed, and a being created. The second run would result in c being echoed. However, I never specified c as a target. a is already up to date by virtue of the file a being newer than the file b. Since the dependency on c is order only, and we've already decided we're not going to make a, there's no reason to make c.

The heart of the issue is that of timing. In this case, 'a', 'b', and 'c' all take a significant amount of actual time to complete (not for the example above of course). If 'a' is already up to date with respect to 'b', then 'c' is a productivity waster. This is a simplified example. In the actual system, 'a' is a pattern match with hundreds of results, 'b' is unique to each 'a', but 'c' is the same for all. That is, if more than one 'a' needs to be made, 'c' only needs to be made once.

I cannot find any make syntax to make 'c' if and only if any 'a' needs to be done.

Brian Cody <epistax2>

 

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 epistax2 (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):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup