~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to source3/script/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
ARGS="--includedir=../librpc/idl --outputdir $PIDL_OUTPUTDIR --header --ndr-parser --samba3-ndr-server --samba3-ndr-client $PIDL_ARGS --"
 
4
IDL_FILES="$*"
 
5
 
 
6
oldpwd=`pwd`
 
7
cd ${srcdir}
 
8
 
 
9
[ -d $PIDL_OUTPUTDIR ] || mkdir -p $PIDL_OUTPUTDIR || exit 1
 
10
 
 
11
PIDL="$PIDL $ARGS"
 
12
 
 
13
##
 
14
## Find newer files rather than rebuild all of them
 
15
##
 
16
 
 
17
list=""
 
18
for 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
 
29
done
 
30
 
 
31
##
 
32
## generate the ndr stubs
 
33
##
 
34
 
 
35
if [ "x$list" != x ]; then
 
36
        # echo "${PIDL} ${list}"
 
37
        $PIDL $list || exit 1
 
38
fi
 
39
 
 
40
cd ${oldpwd}
 
41
 
 
42
exit 0
 
43