help-make
[Top][All Lists]
Advanced

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

Re: Trigger missing dependencies by changing order of execution?


From: Paul Smith
Subject: Re: Trigger missing dependencies by changing order of execution?
Date: Tue, 28 Feb 2012 10:44:57 -0500

On Tue, 2012-02-28 at 13:41 +0000, Tim Landscheidt wrote:
> As in real-life scenarios there is seldomly a sleep 3 and
> the bug will thus only show very randomly, I'm looking for a
> way to smoke out such errors with a higher probability.  One
> idea would be to reverse the order of execution for targets
> "on the same level": As the test suite will usually trigger
> first generation of a.out, then b.out, if instead first
> b.out was generated, the bug would surface.
> 
>   Is there a way in GNU make to do this?

No.  There have been requests for "randomized" prerequisite lists for
this exact reason in the past, but nothing like this has ever been
implemented.

One issue is that you really can't "randomize" (or reverse) the first
prerequisite as it has a special status (being the value of $<); if you
randomize all prerequisites of all targets then most of your rules will
fail.  So you have to special-case that one and only "randomize" the 2nd
and subsequent prerequisites.

The other issue is just that the way make is coded, it's not so easy to
do this.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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