[Olsr-dev] [PATCH] fix infinite recursion problem when running make
Sat Nov 3 23:00:42 CET 2007
Bernd Petrovitsch wrote:
> On Sat, 2007-11-03 at 18:00 +0100, Felix Fietkau wrote:
>> with certain make versions, running make in the olsr directory loops
> Which version(s)? On which OS/systems/...?
OpenWrt, Linux, Make 3.81
>> forever rebuilding a dependency file. This is caused by a bogus .PHONY
> That sounds quite strange. Rebuilding it 2 times (or so) may be possible
> (due to multiple dependency resolutions) but I doubt that it will last
> Any log file?
Entering directory <build dir>...
Leaving directory <build dir>...
in an endless loop.
>> statement (which is erroneously used on a real file target).
> Actually this file purposely always generated to reflect the build time
> of the daemon (and compiling the beast from CVS-HEAD several times a day
> requires to put the time and build host in).
Maybe it would help to give it a different file extension. The problem
seems to come from the interaction between a build-always rule and the
automatic dependency generation. It jumps back and forth between generating
the .c and the .d file.
>> This patch fixes it:
> That defeats the purpose of that file as such and consequently we can
> kill that file completely and remove the variables there or think of
> another way to get that info in.
> I'm open to alternative solutions of the "problem".
OK. I played with it for a while and have a better patch now:
More information about the Olsr-dev