simple method for auto-building rpc files if idl changes, and
authorAndrew Tridgell <tridge@samba.org>
Sat, 15 Nov 2003 21:25:03 +0000 (21:25 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sat, 15 Nov 2003 21:25:03 +0000 (21:25 +0000)
auto-building proto.h if it doesn't exist. This should make life a
little easier for developers
(This used to be commit ab5939e79600841c5e7e31e9da8742bf2da4a184)

source4/Makefile.in
source4/script/build_idl.sh

index fac7f41572ba349f15205e90e5db1ffaef89305f..7dc7874ea2c6fcfe65038a0d5e9de1209df973f4 100644 (file)
@@ -642,7 +642,7 @@ NTLM_AUTH_OBJ = utils/ntlm_auth.o $(LIBNTLMSSP_OBJ) $(LIBSAMBA_OBJ) $(POPT_LIB_O
 ######################################################################
 # now the rules...
 ######################################################################
-all: bin/smbd bin/smbclient bin/smbtorture bin/locktest bin/masktest bin/gentest
+all: proto_test idl_test bin/smbd bin/smbclient bin/smbtorture bin/locktest bin/masktest bin/gentest
 
 #SHOWFLAGS proto_exists $(SBIN_PROGS) $(BIN_PROGS) $(SHLIBS) \
 #      $(TORTURE_PROGS) $(RPC_MODULES) @EXTRA_ALL_TARGETS@
@@ -716,7 +716,10 @@ pch:
 
 
 idl:
-       script/build_idl.sh
+       script/build_idl.sh FULL
+
+idl_test:
+       @script/build_idl.sh
 
 
 # These dependencies are only approximately correct: we want to make
@@ -1260,6 +1263,9 @@ headers:
 
 proto: headers 
 
+proto_test:
+       @[ -f include/proto.h ] || $(MAKE) proto
+
 .PHONY: headers proto
 
 etags:
index 24f18be2efa593e7f562bfd50345471596fc3636..cb81e4de74f0eb413c895813d8c352cc69434ab9 100755 (executable)
@@ -1,10 +1,14 @@
-#!/bin/bash
+#!/bin/sh
+
+FULLBUILD=$1
 
 for f in librpc/idl/*.idl; do
-    echo Processing $f
     base=`basename $f .idl`
     ndr=librpc/ndr/ndr_$base
-    pidl.pl --output $ndr --parse --header --parser --client librpc/rpc/rpc_$base.c $f || exit 1
+    if [ x$FULLBUILD = xFULL -o "$f" -nt $ndr.c ]; then
+      echo Processing $f
+      pidl.pl --output $ndr --parse --header --parser --client librpc/rpc/rpc_$base.c $f || exit 1
+    fi
 done
 
 exit 0