r15248: Fix automatic dependencies build
authorJelmer Vernooij <jelmer@samba.org>
Tue, 25 Apr 2006 16:35:06 +0000 (16:35 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:04:25 +0000 (14:04 -0500)
source/build/smb_build/env.pm
source/build/smb_build/input.pm
source/build/smb_build/makefile.pm
source/heimdal_build/config.mk
source/lib/registry/config.mk

index f6de8ce57f08e1351c96ebd50e8e5a8a586ca9ae..1fdaf87ad7c2fdb42814d9198f14c0c6278d42d7 100644 (file)
@@ -53,9 +53,9 @@ sub _set_config($$)
        $self->{automatic_deps} = ($self->{config}->{automatic_dependencies} eq "yes");
 }
 
-sub PkgConfig($$$$$$$$)
+sub PkgConfig($$$$$$$$$$)
 {
-       my ($self,$path,$name,$libs,$cflags,$version,$desc,$hasmodules) = @_;
+       my ($self,$path,$name,$libs,$cflags,$version,$desc,$hasmodules,$pubdep,$privdep) = @_;
 
        print __FILE__.": creating $path\n";
 
@@ -83,6 +83,8 @@ __EOF__
        if (defined($desc)) {
                print OUT "Description: $desc\n";
        }
+       print OUT "Requires: $pubdep\n" if defined($pubdep);
+       print OUT "Requires.private: $privdep\n" if defined($privdep);
        print OUT "Version: $version\n";
        print OUT "Libs: -L\${libdir} $libs\n";
        print OUT "Cflags: -I\${includedir} $cflags\n";
index 6d9b3f5aac97d471581b3bdb0fa389e4894ec496..697f706a0c1543082aac56097f97ecf733de22c7 100644 (file)
@@ -203,8 +203,8 @@ sub check($$$$$)
                        push (@{$part->{DEPENDENCIES}}, \$depend{$key});
                }
 
-               delete ($part->{PRIVATE_DEPENDENCIES});
-               delete ($part->{PUBLIC_DEPENDENCIES});
+#              delete ($part->{PRIVATE_DEPENDENCIES});
+#              delete ($part->{PUBLIC_DEPENDENCIES});
        }
 
        foreach my $part (values %depend) {
index 767edbd496e0a19a8de604a1101b0e4d293a08e3..aa9f93fc2d2d71caf2003f22dc35c56de5c9ccd9 100644 (file)
@@ -70,7 +70,7 @@ sub _prepare_path_vars($)
 prefix = $self->{config}->{prefix}
 exec_prefix = $self->{config}->{exec_prefix}
 selftest_prefix = $self->{config}->{selftest_prefix}
-VPATH = $self->{config}->{srcdir}:heimdal/lib/asn1:heimdal/lib/krb5:heimdal/lib/gssapi:heimdal/lib/hdb:heimdal/lib/roken:heimdal/lib/des
+VPATH = $self->{config}->{srcdir}:heimdal_build:heimdal/lib/asn1:heimdal/lib/krb5:heimdal/lib/gssapi:heimdal/lib/hdb:heimdal/lib/roken:heimdal/lib/des
 srcdir = $self->{config}->{srcdir}
 builddir = $self->{config}->{builddir}
 
@@ -457,6 +457,25 @@ sub PkgConfig($$)
 
        push (@{$self->{pc_files}}, $path);
 
+       my $pubs;
+       my $privs;
+
+       if (defined($ctx->{PUBLIC_DEPENDENCIES})) {
+               foreach (@{$ctx->{PUBLIC_DEPENDENCIES}}) {
+#                      next unless ($self-> ) {
+
+                       $pubs .= "$_ ";
+               }
+       }
+
+       if (defined($ctx->{PRIVATE_DEPENDENCIES})) {
+               foreach (@{$ctx->{PRIVATE_DEPENDENCIES}}) {
+#                      next unless ($self-> ) {
+
+                       $privs .= "$_ ";
+               }
+       }
+
        smb_build::env::PkgConfig($self,
                $path,
                $link_name,
@@ -464,7 +483,9 @@ sub PkgConfig($$)
                "",
                "$ctx->{VERSION}",
                $ctx->{DESCRIPTION},
-               defined($ctx->{INIT_FUNCTIONS})
+               defined($ctx->{INIT_FUNCTIONS}),
+               $pubs,
+               $privs
        ); 
 }
 
@@ -499,7 +520,7 @@ sub ProtoHeader($$)
                $ctx->{PUBLIC_PROTO_HEADER} = $ctx->{PRIVATE_PROTO_HEADER};
        }       
 
-       $self->output("$dir/$ctx->{PUBLIC_PROTO_HEADER}: $ctx->{MK_FILE} \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST:.o=.c)\n");
+       $self->output("$dir/$ctx->{PUBLIC_PROTO_HEADER}: $ctx->{MK_FILE} \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST:.o=.c) \$(srcdir)/script/mkproto.pl\n");
        $self->output("\t\@echo \"$comment\"\n");
 
        $self->output("\t\@\$(PERL) \$(srcdir)/script/mkproto.pl --srcdir=\$(srcdir) --builddir=\$(builddir) --private=$dir/$ctx->{PRIVATE_PROTO_HEADER} --public=$dir/$ctx->{PUBLIC_PROTO_HEADER} \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)\n\n");
index c403b09a87ff408fa6d4f6b2ff15d94a50b63e0b..771551af5ce599f78b88e2715e46daae7ddc0a2b 100644 (file)
@@ -188,8 +188,7 @@ OBJ_FILES = \
 #######################
 # Start SUBSYSTEM HEIMDAL_ASN1
 [SUBSYSTEM::HEIMDAL_ASN1]
-EXTRA_CFLAGS = \
-       -Iheimdal_build -Iheimdal/lib/asn1
+EXTRA_CFLAGS = -Iheimdal_build -Iheimdal/lib/asn1
 OBJ_FILES = \
        ../heimdal/lib/asn1/der_get.o \
        ../heimdal/lib/asn1/der_put.o \
@@ -295,7 +294,7 @@ OBJ_FILES = ../heimdal/lib/roken/gai_strerror.o
 #######################
 # Start SUBSYSTEM HEIMDAL_ROKEN_GAI_STRERROR
 [SUBSYSTEM::HEIMDAL_ROKEN_INET_ATON]
-EXTRA_CFLAGS = -Iheimdal_build -Iheimdal/lib/roken
+EXTRA_CFLAGS = -Iheimdal_build 
 OBJ_FILES = ../heimdal/lib/roken/inet_aton.o
 
 #######################
@@ -376,7 +375,7 @@ OBJ_FILES = ../heimdal/lib/asn1/lex.ho
 #######################
 # Start BINARY asn1_compile
 [BINARY::asn1_compile]
-EXTRA_CFLAGS = -Iheimdal_build -Iheimdal/lib/roken -Iheimdal/lib/asn1
+EXTRA_CFLAGS = -Iheimdal_build -Iheimdal/lib/roken
 OBJ_FILES = \
        ../heimdal/lib/asn1/main.ho \
        ../heimdal/lib/asn1/gen.ho \
@@ -416,7 +415,7 @@ OBJ_FILES = ../heimdal/lib/com_err/lex.ho
 #######################
 # Start BINARY compile_et
 [BINARY::compile_et]
-EXTRA_CFLAGS = -Iheimdal_build -Iheimdal/lib/com_err -Iheimdal/lib/roken
+EXTRA_CFLAGS = -Iheimdal_build -Iheimdal/lib/roken
 OBJ_FILES = ../heimdal/lib/vers/print_version.ho \
        ../heimdal/lib/com_err/parse.ho \
        ../heimdal/lib/com_err/compile_et.ho \
@@ -469,12 +468,11 @@ clean::
 [LIBRARY::HEIMDAL]
 VERSION = 0.0.1
 SO_VERSION = 0
-EXTRA_CFLAGS = -Iheimdal/lib/vers -Iheimdal_build
+EXTRA_CFLAGS = -Iheimdal_build
 OBJ_FILES = ../heimdal/lib/vers/print_version.o
 PUBLIC_DEPENDENCIES = \
                LIBREPLACE HEIMDAL_GSSAPI HEIMDAL_KRB5 KERBEROS \
-               HEIMDAL_ASN1 HEIMDAL_ROKEN \
-               HEIMDAL_COM_ERR HEIMDAL_GLUE EXT_LIB_RESOLV
+               HEIMDAL_GLUE EXT_LIB_RESOLV
 # End SUBSYSTEM HEIMDAL
 #######################
 
index 6cf2f50268590d9f07b337bd2f64072ee511f180..e31a775a3c23e71cb147c85bef1a25a20482a8cd 100644 (file)
@@ -16,7 +16,6 @@ PUBLIC_DEPENDENCIES = TDR
 OBJ_FILES = tdr_regf.o
 
 # Special support for external builddirs
-lib/registry/reg_backend_nt4.c: $(srcdir)/lib/registry/reg_backend_nt4.c
 $(srcdir)/lib/registry/reg_backend_nt4.c: lib/registry/tdr_regf.c
 lib/registry/tdr_regf.h: lib/registry/tdr_regf.c
 lib/registry/tdr_regf.c: $(srcdir)/lib/registry/regf.idl