From fc5a0c4c46ba5718ac0c6489aa733060be1fa9ef Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 12 Jul 2005 12:12:03 +0000 Subject: r8374: avoid running flex and bison unless needed this should stop the files changes in svn for other developers (This used to be commit 18d3deb777bd6aa4dd102fa2a2838d0afc2bd74c) --- source4/heimdal_build/build_external.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/source4/heimdal_build/build_external.sh b/source4/heimdal_build/build_external.sh index 355facc6dd..5b512899cc 100755 --- a/source4/heimdal_build/build_external.sh +++ b/source4/heimdal_build/build_external.sh @@ -41,10 +41,15 @@ build_lex() { dir=`dirname $f` file=`basename $f` base=`basename $f .l` + if [ -r $dir/$base.c ]; then + if [ x`find $f -newer $dir/$base.c -print` != x$f ]; then + return; + fi + fi echo Building $f if cd $dir && $FLEX $file; then - sed '/^#/ s|$base.yy\.c|$base.c|' $base.yy.c > $base.c - rm -f $base.yy.c + sed '/^#/ s|$base.yy\.c|$base.c|' $base.yy.c > $base.c + rm -f $base.yy.c fi cd $TOP || exit 1 } @@ -54,6 +59,11 @@ build_bison() { dir=`dirname $f` file=`basename $f` base=`basename $f .y` + if [ -r $dir/$base.c ]; then + if [ x`find $f -newer $dir/$base.c -print` != x$f ]; then + return; + fi + fi echo Building $f if cd $dir && $BISON -y -d $file; then sed -e "/^#/!b" -e "s|y\.tab\.h|$base.h|" y.tab.h > $base.h -- cgit