source: branches/samba-3.3.x/source/script/build_idl.sh

Last change on this file was 206, checked in by Herwig Bauernfeind, 16 years ago

Import Samba 3.3 branch at 3.0.0 level (psmedley's port)

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