[Top][All Lists]

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

Re: Makefile regeneration

From: Paul D. Smith
Subject: Re: Makefile regeneration
Date: Wed, 31 Jul 2002 11:23:58 -0400

%% "Jeff Wood" <address@hidden> writes:

  jw> Can a makefile recreate itself and then run the newly 
  jw> recreated makefile?  

GNU make will attempt to rebuild each makefile it reads (except ones in
the MAKEFILES variable IIRC), including both the original makefile and
any included makefiles.

If any of them are rebuilt, it will automatically re-exec itself to read
the new versions (then it will try to rebuild them again--so be careful
to not go into an infinite loop!)

So, all you have to do is provide a rule that rebuilds your makefile and
it will Just Work.

 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]