[asterisk-dev] [asterisk-commits] tilghman: branch 1.4 r242423 - /branches/1.4/pbx/Makefile

Kevin P. Fleming kpfleming at digium.com
Sat Jan 23 08:55:03 CST 2010


SVN commits to the Asterisk project wrote:
> Author: tilghman
> Date: Fri Jan 22 15:44:18 2010
> New Revision: 242423
> 
> URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=242423
> Log:
> Rebuild from flex, bison sources when necessary.
> 
> (issue #14629)
>  Reported by: Marquis
>  Patches: 
>        20100121__issue14629.diff.txt uploaded by tilghman (license 14)
> 
> Modified:
>     branches/1.4/pbx/Makefile
> 
> Modified: branches/1.4/pbx/Makefile
> URL: http://svnview.digium.com/svn/asterisk/branches/1.4/pbx/Makefile?view=diff&rev=242423&r1=242422&r2=242423
> ==============================================================================
> --- branches/1.4/pbx/Makefile (original)
> +++ branches/1.4/pbx/Makefile Fri Jan 22 15:44:18 2010
> @@ -44,11 +44,13 @@
>  
>  $(if $(filter pbx_ael,$(EMBEDDED_MODS)),modules.link,pbx_ael.so): ael/ael.tab.o ael/ael_lex.o
>  
> -ael/ael_lex.c:
> +ael/ael_lex.c: ael/ael.flex
> +	$(ECHO_PREFIX) echo "   [FLEX] $< -> $@"
>  	(cd ael; flex ael.flex; sed -i -e "/begin standard C headers/i#include \"asterisk.h\"" ael_lex.c)
>  	(cd ael; sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' ael_lex.c > zz; mv zz ael_lex.c)
>  
> -ael/ael.tab.c ael/ael.tab.h:
> +ael/ael.tab.c ael/ael.tab.h: ael/ael.y
> +	$(ECHO_PREFIX) echo "   [BISON] $< -> $@"
>  	(cd ael; bison -v -d ael.y)
>  
>  dundi-parser.o: dundi-parser.h

I don't think this is a good idea; when the source code is checked out
from Subversion, or unpacked from a tarball, there is no guarantee that
the timestamp on ael/ael.flex is going to be earlier than (or equal to)
the timestamp on ael/ael_lex.c. If it is not, and the user's system does
not have flex, their build of Asterisk will unnecessarily fail.

Since editing ael/ael.flex is *extremely* rare, the Makefiles have
always been configured to require manual rebuilding of the targets (by
using (make -C pbx ael/ael_lex.c).


-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kpfleming at digium.com
Check us out at www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list