summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-23 03:42:20 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-23 03:42:20 +0000
commit02dc7536dd625e0cdee23a96e66cb41b407cdba8 (patch)
tree07abe233e81ee3a945361a5ce4cc694754b77f8b /source4/script
parent231ae2430ee4f762035803ee0c7c00823fba6bfb (diff)
downloadsamba-02dc7536dd625e0cdee23a96e66cb41b407cdba8.tar.gz
samba-02dc7536dd625e0cdee23a96e66cb41b407cdba8.tar.bz2
samba-02dc7536dd625e0cdee23a96e66cb41b407cdba8.zip
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)
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/build_idl.sh22
1 files changed, 17 insertions, 5 deletions
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