[Asterisk-Dev] Asterisk make clean and make looping?? (Possible solution)

Robert Webb asterisk at ropeguru.com
Wed Nov 2 21:23:56 MST 2005


On Wed, 02 Nov 2005 19:30:38 -0600
  "Kevin P. Fleming" <kpfleming at digium.com> wrote:
> asterisk at ropeguru.com wrote:
> 
>> ifneq ($(wildcard .depend),)
>>   include .depend
>> Endif
>> 
>> If I comment out the above section, everything seems to 
>>run as it
>> should. I can make install, break out of it before it is 
>>finished, then
>> make clean and all other make commands seem to work. If 
>>I let make
>> install complete, asterisk starts and runs normally.
>> 
>> Can someone take a look at the Makefile and try to help 
>>me understand
>> the purpose of the above code that I commented out??
> 
> That snippet includes a series of rules into the 
>Makefile that tell it what files (header files, mostly) 
>each source file is dependent on, so that it can properly 
>determine what needs to be rebuilt when source files are 
>changed. The reason it is included in this fashion is 
>because when it does not exist it must be skipped or an 
>error will be generated.


Ok, so after spending the evening learning about just how 
all of this works, I have one last question.

For the section include/asterisk/version.h:, does it 
really have to have FORCE as a dependency? If I leave all 
code in the Makefile as is, and remove the FORCE, then 
evertyhing seems to compile correctly.

It seems that with FORCE as a dependency, it is forcing 
the version.h file to change evertime this section is run. 
In doing so, the .depend section runs, anbd thus you get 
into a loop with the implicit .depend that is setup in the 
beginning of the Makefile.

Robert




More information about the asterisk-dev mailing list