source: vendor/3.6.23/source3/script/build_idl.sh

Last change on this file was 740, checked in by Silvan Scherrer, 13 years ago

Samba Server: update vendor to 3.6.0

File size: 1012 bytes
Line 
1#!/bin/sh
2
3if [ "$1" = "--full" ]; then
4 FULL=1
5 shift 1
6else
7 FULL=0
8fi
9
10ARGS="--includedir=../librpc/idl --outputdir $PIDL_OUTPUTDIR --header --ndr-parser --client --samba3-ndr-server $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 b=`basename $f .idl`
33 outfiles="$b.h ndr_$b.h srv_$b.c"
34 outfiles="$outfiles ndr_$b.c srv_$b.h"
35
36 for o in $outfiles; do
37 [ -f $PIDL_OUTPUTDIR/$o ] || {
38 list="$list $f"
39 break
40 }
41 test "`find $f -newer $PIDL_OUTPUTDIR/$o`" != "" && {
42 list="$list $f"
43 break
44 }
45 done
46done
47
48##
49## generate the ndr stubs
50##
51
52if [ "x$list" != x ]; then
53 # echo "${PIDL} ${list}"
54 $PIDL $list || exit 1
55fi
56
57cd ${oldpwd}
58
59exit 0
60
Note: See TracBrowser for help on using the repository browser.