~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to source4/librpc/scripts/build_idl.sh

  • Committer: Chuck Short
  • Date: 2010-09-28 20:38:39 UTC
  • Revision ID: zulcss@ubuntu.com-20100928203839-pgjulytsi9ue63x1
Initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
FULLBUILD=$1
 
4
OUTDIR=$2
 
5
shift 2
 
6
IDL_FILES="$*"
 
7
 
 
8
[ -d $OUTDIR ] || mkdir -p $OUTDIR || exit 1
 
9
 
 
10
PIDL="$PIDL --outputdir $OUTDIR --header --ndr-parser --server --client --python --dcom-proxy --com-header --includedir ../librpc/idl -- "
 
11
 
 
12
if [ x$FULLBUILD = xFULL ]; then
 
13
      echo Rebuilding all idl files in $IDLDIR
 
14
      $PIDL $IDL_FILES || exit 1
 
15
      exit 0
 
16
fi
 
17
 
 
18
list=""
 
19
 
 
20
for 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
 
31
done
 
32
 
 
33
if [ "x$list" != x ]; then
 
34
    $PIDL $list || exit 1
 
35
fi
 
36
 
 
37
exit 0