1#!/bin/sh 2 3ARGS="--includedir=../librpc/idl --outputdir $PIDL_OUTPUTDIR --header --ndr-parser --samba3-ndr-server --samba3-ndr-client $PIDL_ARGS --" 4IDL_FILES="$*" 5 6oldpwd=`pwd` 7cd ${srcdir} 8 9[ -d $PIDL_OUTPUTDIR ] || mkdir -p $PIDL_OUTPUTDIR || exit 1 10 11PIDL="$PIDL $ARGS" 12 13## 14## Find newer files rather than rebuild all of them 15## 16 17list="" 18for f in ${IDL_FILES}; do 19 basename=`basename $f .idl` 20 ndr="$PIDL_OUTPUTDIR/ndr_$basename.c" 21 22 if [ -f $ndr ]; then 23 if [ "x`find $f -newer $ndr -print`" = "x$f" ]; then 24 list="$list $f" 25 fi 26 else 27 list="$list $f" 28 fi 29done 30 31## 32## generate the ndr stubs 33## 34 35if [ "x$list" != x ]; then 36 # echo "${PIDL} ${list}" 37 $PIDL $list || exit 1 38fi 39 40cd ${oldpwd} 41 42exit 0 43 44