bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature request - order only deps


From: Matěj Týč
Subject: feature request - order only deps
Date: Fri, 01 Feb 2013 16:18:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130109 Thunderbird/17.0.2

Hi,
I have noticed that if we have a target that has prerequisities, if those prerequisities are missing and I want to make the target, then even if the target file exists, prerequisities are remade if possible and then, consequently, the target has to be remade, too, since its prerequisity is now more up-to-date. Which, of course, makes perfect sense.

However, if a prerequisity is order-only, it is also going to be remade despite the target file existis already, but unlike the case above, the target won't be remade because it is allowed to be older than its order-only prerequisity. This is normally not an issue, since order-only prereqs are probably often cheap commands lke mkdir etc., but my case is different:

Consider a server process that can execute commands and that can load (huge) data into cache to spped the execution up. Loading the data is a make task and a target file cache-foo is created to expose that the data has been succesfully loaded into the server cache. Then cache-foo is an order-only dependency of foo1, foo2 and foo3 targets that take advantage of it (rules to make them call the server process that uses the foo cache). Therefore those targets are not made before setting the cache up and also the cache is loaded once, not concurently even if like -j4 is used as a make argument.

As you might guess, if I have a target 'bar' that depends on 'foo1' and 'foo2', then even if 'foo1' and 'foo2' exist, if 'cache-foo' is missing, it is remade and data are loaded into the cache without being of any use, which is quite annoying. In other words, the whole server might have to start, load the cache and then do nothing.

Could you help me with this?
There are two possible solutions I see here:
 - Change the make behavior or add an option to not to remake order-only deps if they are not relevant
 - Suggest a workaround for situations like this, so the cache is loaded only if it is needed and parallel make execution won't attempt to load the cache for each job separately.


Best wishes,
Matej

reply via email to

[Prev in Thread] Current Thread [Next in Thread]