s3-waf: Add check for dirent.d_off member
[Samba/gebeck_regimport.git] / source3 / script / build_idl.sh
blob8877913137f061e301cca70f6b814034ac331cc4
1 #!/bin/sh
3 ARGS="--includedir=../librpc/idl --outputdir $PIDL_OUTPUTDIR --header --ndr-parser --samba3-ndr-server --samba3-ndr-client $PIDL_ARGS --"
4 IDL_FILES="$*"
6 oldpwd=`pwd`
7 cd ${srcdir}
9 [ -d $PIDL_OUTPUTDIR ] || mkdir -p $PIDL_OUTPUTDIR || exit 1
11 PIDL="$PIDL $ARGS"
14 ## Find newer files rather than rebuild all of them
17 list=""
18 for f in ${IDL_FILES}; do
19 b=`basename $f .idl`
20 outfiles="cli_$b.c $b.h ndr_$b.h srv_$b.c"
21 outfiles="$outfiles cli_$b.h ndr_$b.c srv_$b.h"
23 for o in $outfiles; do
24 [ -f $PIDL_OUTPUTDIR/$o ] || {
25 list="$list $f"
26 break
28 test "`find $f -newer $PIDL_OUTPUTDIR/$o`" != "" && {
29 list="$list $f"
30 break
32 done
33 done
36 ## generate the ndr stubs
39 if [ "x$list" != x ]; then
40 # echo "${PIDL} ${list}"
41 $PIDL $list || exit 1
44 cd ${oldpwd}
46 exit 0