[SCM] Samba Shared Repository - branch master updated

David Disseldorp ddiss at samba.org
Mon Apr 16 08:30:02 MDT 2012


The branch, master has been updated
       via  8405fee build: rebuild idl if the pidl compiler is changed
      from  51e3bbd s4:libcli/smb2: fix anonymous session setups against windows servers

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 8405fee41d93cb5a44690213c3086f3a4a275cb0
Author: David Disseldorp <ddiss at samba.org>
Date:   Mon Apr 16 01:00:46 2012 +0200

    build: rebuild idl if the pidl compiler is changed
    
    In determining whether to compile a given .idl source file, build_idl.sh
    currently checks:
    a) that all build output files exist
    b) build output files are newer than their corresponding .idl source
    
    The .idl is rebuilt if either of the above conditions is false.
    This logic does not catch the case where the pidl compiler itself is
    changed. An IDL rebuild should occur in such a case.
    
    https://bugzilla.samba.org/show_bug.cgi?id=8865
    
    Autobuild-User: David Disseldorp <ddiss at samba.org>
    Autobuild-Date: Mon Apr 16 16:29:45 CEST 2012 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 librpc/build_idl.sh |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/build_idl.sh b/librpc/build_idl.sh
index afab910..e028bc6 100755
--- a/librpc/build_idl.sh
+++ b/librpc/build_idl.sh
@@ -15,17 +15,28 @@ cd ${srcdir}
 
 [ -d $PIDL_OUTPUTDIR ] || mkdir -p $PIDL_OUTPUTDIR || exit 1
 
-PIDL="$PIDL $ARGS"
+PIDL_DIR=`dirname $PIDL`
+PIDL_CMD="$PIDL $ARGS"
 
 if [ $FULL = 1 ]; then
 	echo "Rebuilding all idl files"
-	$PIDL $IDL_FILES || exit 1
+	$PIDL_CMD $IDL_FILES || exit 1
 	exit 0
 fi
 
 ##
-## Find newer files rather than rebuild all of them
+## Find newer files rather than rebuild all of them. Also handle the case
+## where the pidl compiler itself is newer.
 ##
+PIDL_NEWEST=`find $PIDL_DIR -type f -printf "%p\0%T@\n" \
+	| perl -e '$ts_newest = 0;
+		   while (<STDIN>) {
+		           ($f, $ts) = split(/\0/);
+		           next if ($ts <= $ts_newest);
+		           $ts_newest = $ts;
+		           $f_newest = $f;
+		   }
+		   print $f_newest'` || exit 1
 
 list=""
 for f in ${IDL_FILES}; do
@@ -42,6 +53,10 @@ for f in ${IDL_FILES}; do
 		list="$list $f"
 		break
 	    }
+	    test "`find $PIDL_NEWEST -newer $PIDL_OUTPUTDIR/$o`" != "" && {
+		list="$list $f"
+		break
+	    }
 	done
 done
 
@@ -50,8 +65,8 @@ done
 ##
 
 if [ "x$list" != x ]; then
-	# echo "${PIDL} ${list}"
-	$PIDL $list || exit 1
+	# echo "${PIDL_CMD} ${list}"
+	$PIDL_CMD $list || exit 1
 fi
 
 cd ${oldpwd}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list