Summary:ASTERISK-05646: [patch] make fails on Debian/testing
Reporter:gkloepfer (gkloepfer)Labels:
Date Opened:2005-11-18 22:18:25.000-0600Date Closed:2005-12-01 17:38:35.000-0600
Versions:Frequency of
Environment:Attachments:( 0) makefile_noseconds.diff
( 1) makefile.patch
Description:There is a circular dependency in the main Asterisk makefile
that appears to cause the version of GNU make in Debian/testing
(make version 3.80-11) to build .depend over and over.

The target "depend" depends on include/asterisk/version.h and .depend.
The target ".depend" also depends on include/asterisk/version.h.


The problem occurs because version.h is always directed to rebuild (target
FORCE).  When .depend is built the it forces version.h to be rebuilt by
dependency.  Then the Makefile returns to the original target,
depend (without the dot) which also forces a rebuild of version.h.
Make discovers that version.h is newer than .depend, so it executes
that and rebuilds version.h and .depend again.  This loop continues forever.

I am reporting this as a portability issue because I have not encountered
this with other versions of Debian or with FreeBSD.  It does, however,
look like a circular dependency, so I am hopefully removing this dependency.
Comments:By: Andrew Lindh (andrew) 2005-11-21 22:17:54.000-0600

This happens for me when I DON'T use the CVS HEAD version but a branch/tagged CVS version. I don't think this is just a Debian problem (but yes, I am using Debian too).

The make file creates a version.h file which includes the current build time INCLUDING "seconds" it then checks the version to the last one which it will not match because it took more than 1 second to build. So the compare says they are different and it needs to be rebuilt.

My quick solution was to change the version time from Hour:Min:Sec to just Hour:Min (no seconds). Yes, this can still fail or be wrong, but it's not and endless loop.

Both solutions seem to solve the problem for me....not sure which is best for everyone else...

(uploaded my patch to remove seconds from the asterisk version in makefile)

By: Kevin P. Fleming (kpfleming) 2005-12-01 17:38:27.000-0600

This is no longer an issue since we switched to Subversion, since the version string computation no longer includes the date/time.