help-make
[Top][All Lists]
Advanced

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

Trigger missing dependencies by changing order of execution?


From: Tim Landscheidt
Subject: Trigger missing dependencies by changing order of execution?
Date: Tue, 28 Feb 2012 13:41:49 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Hi,

suppose I have a Makefile:

| a.out:
|     sleep 3
|     touch a.out a1
|
| b.out:
|     cat a1 > b.out
|
| c.out: a.out b.out
|     cat a.out b.out > c.out

"make c.out" will /usually/ succeed, as the commands for
a.out are executed before the commands for b.out.  But "make
b.out" will fail (in a clean directory), as will "make -j
c.out".

  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?

Tim




reply via email to

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