svn commit: samba r14554 - in branches/SAMBA_4_0/source: . build/smb_build heimdal_build include lib lib/messaging lib/netif lib/registry lib/samba3 lib/tdr ntvfs/posix smbd

jelmer at samba.org jelmer at samba.org
Sun Mar 19 02:23:54 GMT 2006


Author: jelmer
Date: 2006-03-19 02:23:52 +0000 (Sun, 19 Mar 2006)
New Revision: 14554

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14554

Log:
Write out header dependencies. This means all C files affected will be 
rebuilt when a header file is changed. It also means parallel builds work now.

It will take a minute or so to generate all the dependency information, 
but there should be no need to rebuild that information later on, unless 
a file changes.

This behaviour is only enabled when building in developer mode 
(--enable-developer) and requires a GNU make (or compatible). In all other 
cases, the file 'static_deps.mk' is included, which contains some basic 
hardcoded dependency information. 

Added:
   branches/SAMBA_4_0/source/static_deps.mk
Modified:
   branches/SAMBA_4_0/source/build/smb_build/cflags.pm
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SAMBA_4_0/source/heimdal_build/config.mk
   branches/SAMBA_4_0/source/include/
   branches/SAMBA_4_0/source/lib/db_wrap.h
   branches/SAMBA_4_0/source/lib/messaging/messaging.c
   branches/SAMBA_4_0/source/lib/netif/netif.h
   branches/SAMBA_4_0/source/lib/registry/reg_backend_nt4.c
   branches/SAMBA_4_0/source/lib/registry/registry.h
   branches/SAMBA_4_0/source/lib/samba3/samba3.h
   branches/SAMBA_4_0/source/lib/tdr/tdr.h
   branches/SAMBA_4_0/source/main.mk
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_xattr.c
   branches/SAMBA_4_0/source/smbd/server.c


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/cflags.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/cflags.pm	2006-03-18 23:51:55 UTC (rev 14553)
+++ branches/SAMBA_4_0/source/build/smb_build/cflags.pm	2006-03-19 02:23:52 UTC (rev 14554)
@@ -21,6 +21,7 @@
 			my $ofile = $_;
 			my $dfile = $_;
 			$dfile =~ s/\.o$/.d/;
+			$dfile =~ s/\.ho$/.d/;
 			print CFLAGS_TXT "$ofile $dfile: CFLAGS+=$key->{EXTRA_CFLAGS}\n";
 		}
 	}

Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2006-03-18 23:51:55 UTC (rev 14553)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2006-03-19 02:23:52 UTC (rev 14554)
@@ -509,12 +509,9 @@
 	$self->output($self->{mkfile});
 
 	if ($self->{developer}) {
-		$self->output(<<__EOD__
-
--include \$(DEP_FILES)
-
-__EOD__
-);
+		$self->output("-include \$(DEP_FILES)\n");
+	} else {
+		$self->output("include static_deps.mk\n");
 	}
 
 	open(MAKEFILE,">$file") || die ("Can't open $file\n");

Modified: branches/SAMBA_4_0/source/heimdal_build/config.mk
===================================================================
--- branches/SAMBA_4_0/source/heimdal_build/config.mk	2006-03-18 23:51:55 UTC (rev 14553)
+++ branches/SAMBA_4_0/source/heimdal_build/config.mk	2006-03-19 02:23:52 UTC (rev 14554)
@@ -418,12 +418,6 @@
 # End BINARY compile_et
 #######################
 
-heimdal/lib/roken/vis.h: heimdal/lib/roken/vis.hin
-	@cp heimdal/lib/roken/vis.hin heimdal/lib/roken/vis.h
-
-heimdal/lib/roken/err.h: heimdal/lib/roken/err.hin
-	@cp heimdal/lib/roken/err.hin heimdal/lib/roken/err.h
-
 include perl_path_wrapper.sh asn1_deps.pl heimdal/lib/hdb/hdb.asn1 hdb_asn1|
 include perl_path_wrapper.sh asn1_deps.pl heimdal/lib/gssapi/spnego.asn1 spnego_asn1|
 include perl_path_wrapper.sh asn1_deps.pl heimdal/lib/asn1/k5.asn1 krb5_asn1 --encode-rfc1510-bit-string|
@@ -434,17 +428,8 @@
 include perl_path_wrapper.sh et_deps.pl heimdal/lib/krb5/k524_err.et|
 include perl_path_wrapper.sh et_deps.pl heimdal/lib/krb5/krb5_err.et|
 
-heimdal_basics: \
-	heimdal/lib/roken/vis.h \
-	heimdal/lib/roken/err.h \
-	heimdal/lib/hdb/hdb_asn1.h \
-	heimdal/lib/gssapi/spnego_asn1.h \
-	heimdal/lib/asn1/krb5_asn1.h \
-	heimdal/lib/asn1/asn1_err.h \
-	heimdal/lib/hdb/hdb_err.h \
-	heimdal/lib/krb5/heim_err.h \
-	heimdal/lib/krb5/k524_err.h \
-	heimdal/lib/krb5/krb5_err.h
+./heimdal/lib/krb5/replay.c: ./heimdal/lib/roken/vis.h
+./heimdal/lib/roken/vis.c: ./heimdal/lib/roken/vis.h
 
 clean::	
 	@-rm -f heimdal/lib/roken/vis.h heimdal/lib/roken/err.h


Property changes on: branches/SAMBA_4_0/source/include
___________________________________________________________________
Name: svn:ignore
   - config.h
config.h.in
build.h
includes.h.gch
stamp-h
version.h

   + includes.d
config.h
config.h.in
build.h
includes.h.gch
stamp-h
version.h


Modified: branches/SAMBA_4_0/source/lib/db_wrap.h
===================================================================
--- branches/SAMBA_4_0/source/lib/db_wrap.h	2006-03-18 23:51:55 UTC (rev 14553)
+++ branches/SAMBA_4_0/source/lib/db_wrap.h	2006-03-19 02:23:52 UTC (rev 14554)
@@ -33,4 +33,4 @@
 struct ldb_dn;
 struct cli_credentials;
 
-#include "db_wrap_proto.h"
+#include "lib/db_wrap_proto.h"

Modified: branches/SAMBA_4_0/source/lib/messaging/messaging.c
===================================================================
--- branches/SAMBA_4_0/source/lib/messaging/messaging.c	2006-03-18 23:51:55 UTC (rev 14553)
+++ branches/SAMBA_4_0/source/lib/messaging/messaging.c	2006-03-19 02:23:52 UTC (rev 14554)
@@ -30,7 +30,7 @@
 #include "lib/messaging/irpc.h"
 #include "db_wrap.h"
 #include "lib/tdb/include/tdbutil.h"
-#include "util/unix_privs.h"
+#include "lib/util/unix_privs.h"
 #include "librpc/rpc/dcerpc.h"
 
 /* change the message version with any incompatible changes in the protocol */

Modified: branches/SAMBA_4_0/source/lib/netif/netif.h
===================================================================
--- branches/SAMBA_4_0/source/lib/netif/netif.h	2006-03-18 23:51:55 UTC (rev 14553)
+++ branches/SAMBA_4_0/source/lib/netif/netif.h	2006-03-19 02:23:52 UTC (rev 14554)
@@ -29,5 +29,5 @@
 #define MAX_INTERFACES 128
 
 #ifndef AUTOCONF_TEST
-#include "netif/proto.h"
+#include "lib/netif/proto.h"
 #endif

Modified: branches/SAMBA_4_0/source/lib/registry/reg_backend_nt4.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/reg_backend_nt4.c	2006-03-18 23:51:55 UTC (rev 14553)
+++ branches/SAMBA_4_0/source/lib/registry/reg_backend_nt4.c	2006-03-19 02:23:52 UTC (rev 14554)
@@ -18,7 +18,7 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  
 #include "includes.h"
-#include "registry.h"
+#include "lib/registry/registry.h"
 #include "system/filesys.h"
 #include "system/time.h"
 #include "lib/registry/tdr_regf.h"

Modified: branches/SAMBA_4_0/source/lib/registry/registry.h
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/registry.h	2006-03-18 23:51:55 UTC (rev 14553)
+++ branches/SAMBA_4_0/source/lib/registry/registry.h	2006-03-19 02:23:52 UTC (rev 14554)
@@ -164,6 +164,6 @@
 	struct reg_diff_key *keys;
 };
 
-#include "registry_proto.h"
+#include "lib/registry/registry_proto.h"
 
 #endif /* _REGISTRY_H */

Modified: branches/SAMBA_4_0/source/lib/samba3/samba3.h
===================================================================
--- branches/SAMBA_4_0/source/lib/samba3/samba3.h	2006-03-18 23:51:55 UTC (rev 14553)
+++ branches/SAMBA_4_0/source/lib/samba3/samba3.h	2006-03-19 02:23:52 UTC (rev 14554)
@@ -210,6 +210,6 @@
 	struct samba3_regdb registry;
 };
 
-#include "samba3/samba3_proto.h"
+#include "lib/samba3/samba3_proto.h"
 
 #endif /* _SAMBA3_H */

Modified: branches/SAMBA_4_0/source/lib/tdr/tdr.h
===================================================================
--- branches/SAMBA_4_0/source/lib/tdr/tdr.h	2006-03-18 23:51:55 UTC (rev 14553)
+++ branches/SAMBA_4_0/source/lib/tdr/tdr.h	2006-03-19 02:23:52 UTC (rev 14554)
@@ -62,6 +62,6 @@
 typedef NTSTATUS (*tdr_push_fn_t) (struct tdr_push *, const void *);
 typedef NTSTATUS (*tdr_pull_fn_t) (struct tdr_pull *, TALLOC_CTX *, void *);
 
-#include "tdr/tdr_proto.h"
+#include "lib/tdr/tdr_proto.h"
 
 #endif /* __TDR_H__ */

Modified: branches/SAMBA_4_0/source/main.mk
===================================================================
--- branches/SAMBA_4_0/source/main.mk	2006-03-18 23:51:55 UTC (rev 14553)
+++ branches/SAMBA_4_0/source/main.mk	2006-03-19 02:23:52 UTC (rev 14554)
@@ -1,4 +1,4 @@
-all: basics bin/asn1_compile bin/compile_et binaries libraries modules
+all: bin/asn1_compile bin/compile_et binaries libraries modules
 
 include dynconfig.mk
 include heimdal_build/config.mk
@@ -192,6 +192,7 @@
 IDL_NDR_HEADER_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%.h,$(IDL_FILES))
 IDL_NDR_PARSE_C_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%.c,$(IDL_FILES))
 IDL_NDR_CLIENT_C_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%_c.c,$(IDL_FILES))
+IDL_NDR_CLIENT_HEADER_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%_c.h,$(IDL_FILES))
 IDL_NDR_SERVER_C_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%_s.c,$(IDL_FILES))
 IDL_NDR_EJS_C_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%_ejs.c,$(IDL_FILES))
 IDL_NDR_EJS_H_FILES = $(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%_ejs.h,$(IDL_FILES))
@@ -200,6 +201,7 @@
 $(IDL_NDR_HEADER_FILES): idl
 $(IDL_NDR_PARSE_C_FILES): idl
 $(IDL_NDR_CLIENT_C_FILES): idl
+$(IDL_NDR_CLIENT_H_FILES): idl
 $(IDL_NDR_SERVER_C_FILES): idl
 $(IDL_NDR_EJS_C_FILES): idl
 $(IDL_NDR_EJS_H_FILES): idl
@@ -225,32 +227,11 @@
 	@echo "You need to rerun ./autogen.sh and ./configure"
 	@/bin/false
 
-librpc/gen_ndr/misc.h: idl
-librpc/ndr/libndr.h: librpc/ndr/libndr_proto.h librpc/gen_ndr/misc.h
-librpc/rpc/dcerpc.h: librpc/rpc/dcerpc_proto.h
-auth/credentials/credentials.h: auth/credentials/credentials_proto.h
-libcli/nbt/libnbt.h: libcli/nbt/nbt_proto.h
-lib/charset/charset.h: lib/charset/charset_proto.h
-
-include/includes.h: \
-		include/config.h \
-		lib/util/util_proto.h \
-		lib/charset/charset.h \
-		param/proto.h \
-		libcli/util/proto.h \
-		librpc/gen_ndr/misc.h
-
 clean_pch: 
 	-rm -f include/includes.h.gch
 
 pch: clean_pch include/includes.h.gch
 
-proto: $(PROTO_HEADERS)
-basics: include/includes.h \
-	proto \
-	idl \
-	heimdal_basics
-
 clean:: clean_pch
 	@echo Removing objects
 	@-find . -name '*.o' -exec rm -f '{}' \;
@@ -331,16 +312,23 @@
 # File types
 ###############################################################################
 
-.SUFFIXES: .x .c .et .y .l .d .o .h .h.gch .a .so .1 .1.xml .3 .3.xml .5 .5.xml .7 .7.xml .8 .8.xml .ho
+.SUFFIXES: .x .c .et .y .l .d .o .h .h.gch .a .so .1 .1.xml .3 .3.xml .5 .5.xml .7 .7.xml .8 .8.xml .ho .hin .idl
 
+.hin.h:
+	@cp $< $@
+
 .c.ho:
-	@echo "Compiling $*.c with host compiler"
+	@echo "Compiling $< with host compiler"
 	@$(HOSTCC) `script/cflags.pl $@` $(CFLAGS) -c $*.c -o $@
 
 .c.d:
 	@echo "Generating dependencies for $<"
-	@$(CC) -MM -MG -MT $(<:.c=.o) -MF $@ $(CFLAGS) $<
+	@$(CC) -M -MG -MT $(<:.c=.o) `script/cflags.pl $@` $(CFLAGS) $< -o $@
 
+include/includes.d: include/includes.h
+	@echo "Generating dependencies for $<"
+	@$(CC) -M -MG -MT include/includes.h.gch $(CFLAGS) $< -o $@
+
 .c.o:
 	@if test -n "$(CC_CHECKER)"; then \
 		echo "Checking  $< with '$(CC_CHECKER)'"; \
@@ -377,3 +365,9 @@
 
 .8.xml.8:
 	$(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
+
+DEP_FILES = $(patsubst %.ho,%.d,$(patsubst %.o,%.d,$(ALL_OBJS))) \
+		   include/includes.d
+
+clean-deps:
+	rm -f $(DEPFILES)

Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_xattr.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_xattr.c	2006-03-18 23:51:55 UTC (rev 14553)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_xattr.c	2006-03-19 02:23:52 UTC (rev 14554)
@@ -22,7 +22,7 @@
 
 #include "includes.h"
 #include "vfs_posix.h"
-#include "util/unix_privs.h"
+#include "lib/util/unix_privs.h"
 #include "librpc/gen_ndr/ndr_xattr.h"
 
 /*

Modified: branches/SAMBA_4_0/source/smbd/server.c
===================================================================
--- branches/SAMBA_4_0/source/smbd/server.c	2006-03-18 23:51:55 UTC (rev 14553)
+++ branches/SAMBA_4_0/source/smbd/server.c	2006-03-19 02:23:52 UTC (rev 14554)
@@ -40,7 +40,7 @@
 #include "smbd/process_model.h"
 #include "smbd/service.h"
 #include "passdb/secrets.h"
-#include "util/pidfile.h"
+#include "lib/util/pidfile.h"
 
 /*
   recursively delete a directory tree

Added: branches/SAMBA_4_0/source/static_deps.mk
===================================================================
--- branches/SAMBA_4_0/source/static_deps.mk	2006-03-18 23:51:55 UTC (rev 14553)
+++ branches/SAMBA_4_0/source/static_deps.mk	2006-03-19 02:23:52 UTC (rev 14554)
@@ -0,0 +1,35 @@
+# These should also be autogenerated at some point
+# perhaps by some perl scripts run from config.status ?
+#
+librpc/gen_ndr/misc.h: idl
+librpc/ndr/libndr.h: librpc/ndr/libndr_proto.h librpc/gen_ndr/misc.h
+librpc/rpc/dcerpc.h: librpc/rpc/dcerpc_proto.h
+auth/credentials/credentials.h: auth/credentials/credentials_proto.h
+libcli/nbt/libnbt.h: libcli/nbt/nbt_proto.h
+lib/charset/charset.h: lib/charset/charset_proto.h
+
+include/includes.h: \
+		include/config.h \
+		lib/util/util_proto.h \
+		lib/charset/charset.h \
+		param/proto.h \
+		libcli/util/proto.h \
+		librpc/gen_ndr/misc.h
+
+heimdal_basics: \
+       heimdal/lib/roken/vis.h \
+       heimdal/lib/roken/err.h \
+       heimdal/lib/hdb/hdb_asn1.h \
+       heimdal/lib/gssapi/spnego_asn1.h \
+       heimdal/lib/asn1/krb5_asn1.h \
+       heimdal/lib/asn1/asn1_err.h \
+       heimdal/lib/hdb/hdb_err.h \
+       heimdal/lib/krb5/heim_err.h \
+       heimdal/lib/krb5/k524_err.h \
+       heimdal/lib/krb5/krb5_err.h
+
+proto: basics
+basics: include/includes.h \
+	proto \
+	idl \
+	heimdal_basics



More information about the samba-cvs mailing list