[Top][All Lists]

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

Re: remake of a makefile

From: Paul D. Smith
Subject: Re: remake of a makefile
Date: Tue, 17 Jul 2001 23:55:22 -0400

%% Krzysztof Horecki <address@hidden> writes:

  kh> I try to install a warning in case the makefile or rather one of its
  kh> includes was modified:

  kh> ::
  kh>   @echo WARNING! makefile: $@ has been changed

The makefile has been changed with respect to _what_?

You mustn't forget that make has no state.  It doesn't "remember" what
things were like the last time it ran (the ability to do this is on the
TODO list).

All it does is compare timestamps, and if a target is older than any of
its prerequisites, it runs whatever rules you gave it, with the
expectation that this will cause the target to now be up-to-date with
respect to its prerequisites.

Here, you have given no prerequisites, so there is nothing to compare,
so as long as the file exists, it'll be up to date.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "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]