source: branches/samba-3.5.x/librpc/build_idl.sh

Last change on this file was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 890 bytes
Line 
1#!/bin/sh
2
3if [ "$1" = "--full" ]; then
4 FULL=1
5 shift 1
6else
7 FULL=0
8fi
9
10ARGS="--outputdir $PIDL_OUTPUTDIR --header --ndr-parser --samba3-ndr-server --samba3-ndr-client --server --client --python --dcom-proxy --com-header $PIDL_ARGS --"
11IDL_FILES="$*"
12
13oldpwd=`pwd`
14cd ${srcdir}
15
16[ -d $PIDL_OUTPUTDIR ] || mkdir -p $PIDL_OUTPUTDIR || exit 1
17
18PIDL="$PIDL $ARGS"
19
20if [ $FULL = 1 ]; then
21 echo "Rebuilding all idl files"
22 $PIDL $IDL_FILES || exit 1
23 exit 0
24fi
25
26##
27## Find newer files rather than rebuild all of them
28##
29
30list=""
31for f in ${IDL_FILES}; do
32 basename=`basename $f .idl`
33 ndr="$PIDL_OUTPUTDIR/py_$basename.c"
34
35 if [ -f $ndr ]; then
36 if [ "x`find $f -newer $ndr -print`" = "x$f" ]; then
37 list="$list $f"
38 fi
39 else
40 list="$list $f"
41 fi
42done
43
44##
45## generate the ndr stubs
46##
47
48if [ "x$list" != x ]; then
49 # echo "${PIDL} ${list}"
50 $PIDL $list || exit 1
51fi
52
53cd ${oldpwd}
54
55exit 0
Note: See TracBrowser for help on using the repository browser.