1#!/bin/sh 2 3FULLBUILD=$1 4OUTDIR=$2 5shift 2 6IDL_FILES="$*" 7 8[ -d $OUTDIR ] || mkdir -p $OUTDIR || exit 1 9 10PIDL="$PIDL --outputdir $OUTDIR --header --ndr-parser --server --client --python --dcom-proxy --com-header --includedir ../librpc/idl -- " 11 12if [ x$FULLBUILD = xFULL ]; then 13 echo Rebuilding all idl files in $IDLDIR 14 $PIDL $IDL_FILES || exit 1 15 exit 0 16fi 17 18list="" 19 20for f in $IDL_FILES ; do 21 basename=`basename $f .idl` 22 ndr="$OUTDIR/ndr_$basename.c" 23 # blergh - most shells don't have the -nt function 24 if [ -f $ndr ]; then 25 if [ x`find $f -newer $ndr -print` = x$f ]; then 26 list="$list $f" 27 fi 28 else 29 list="$list $f" 30 fi 31done 32 33if [ "x$list" != x ]; then 34 $PIDL $list || exit 1 35fi 36 37exit 0 38