From 02dc7536dd625e0cdee23a96e66cb41b407cdba8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 23 Nov 2003 03:42:20 +0000 Subject: save about 35% of the time for "make idl" by processing multiple IDL files at once, which means less perl startup time. (This used to be commit 64b2c67e479ddc754d18f752d347ba22a6d77682) --- source4/script/build_idl.sh | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'source4/script/build_idl.sh') diff --git a/source4/script/build_idl.sh b/source4/script/build_idl.sh index 569dd7dd31..9ad9391ee0 100755 --- a/source4/script/build_idl.sh +++ b/source4/script/build_idl.sh @@ -7,13 +7,25 @@ FULLBUILD=$1 ( cd build/pidl && make ) || exit 1 +PIDL="build/pidl/pidl.pl --output librpc/gen_ndr/ndr_ --parse --header --parser --client librpc/gen_rpc/rpc_" + +if [ x$FULLBUILD = xFULL ]; then + echo Rebuilding all idl files in librpc/idl + $PIDL librpc/idl/*.idl || exit 1 + exit 0 +fi + +list="" + for f in librpc/idl/*.idl; do - base=`basename $f .idl` - ndr=librpc/gen_ndr/ndr_$base - if [ x$FULLBUILD = xFULL -o "$f" -nt $ndr.c ]; then - echo Processing $f - build/pidl/pidl.pl --output $ndr --parse --header --parser --client librpc/gen_rpc/rpc_$base.c $f || exit 1 + basename=`basename $f .idl` + if [ "$f" -nt librpc/gen_ndr/ndr_$basename.c ]; then + list="$list $f" fi done +if [ "x$list" != x ]; then + $PIDL $list || exit 1 +fi + exit 0 -- cgit