r21497: Pass more of the RPC-CRACKNAMES test by using the new search_options control.
[Samba.git] / source / script / build_idl.sh
blobecf665783628cc70ba786b774576f30f50dd16d6
1 #!/bin/sh
3 FULLBUILD=$1
4 shift 1
5 PIDL_EXTRA_ARGS="$*"
7 [ -d librpc/gen_ndr ] || mkdir -p librpc/gen_ndr || exit 1
9 PIDL="$PERL $srcdir/pidl/pidl --outputdir librpc/gen_ndr --header --ndr-parser --server --client --swig --ejs $PIDL_EXTRA_ARGS"
11 if [ x$FULLBUILD = xFULL ]; then
12 echo Rebuilding all idl files in librpc/idl
13 $PIDL $srcdir/librpc/idl/*.idl || exit 1
14 exit 0
17 list=""
19 for f in $srcdir/librpc/idl/*.idl ; do
20 basename=`basename $f .idl`
21 ndr="librpc/gen_ndr/ndr_$basename.c"
22 # blergh - most shells don't have the -nt function
23 if [ -f $ndr ]; then
24 if [ x`find $f -newer $ndr -print` = x$f ]; then
25 list="$list $f"
27 else
28 list="$list $f"
30 done
32 if [ "x$list" != x ]; then
33 $PIDL $list || exit 1
36 exit 0