Use make to create lists of pc files and prototype headers.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 16 Feb 2008 16:12:01 +0000 (17:12 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 29 Feb 2008 12:48:34 +0000 (13:48 +0100)
(This used to be commit a932a2e37d1aa86cca769398721318b3942fad83)

source4/build/smb_build/main.pl
source4/build/smb_build/makefile.pm

index 3ed0327d6d7fef90c7adff22d1abe16dd359cef3..9690c465a77eb29f3926349759f7b106218d2558 100644 (file)
@@ -56,7 +56,7 @@ foreach my $key (values %$OUTPUT) {
        $mkenv->MergedObj($key) if grep(/MERGED_OBJ/, @{$key->{OUTPUT_TYPE}});
        $mkenv->StaticLibrary($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}});
        if (defined($key->{PC_FILE})) {
-               push(@{$mkenv->{pc_files}}, "$key->{BASEDIR}/$key->{PC_FILE}");
+               $mkenv->output("PC_FILES += $key->{BASEDIR}/$key->{PC_FILE}\n");
        } 
        $mkenv->SharedLibraryPrimitives($key) if ($key->{TYPE} eq "LIBRARY") and
                                        grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
index fea0977ee6d7c90746c24c6dbb841a6ad76a6a06..fe16f0124ac780768c13702cc91b94f78d308ac6 100644 (file)
@@ -25,7 +25,6 @@ sub new($$$)
        $self->{python_pys} = [];
        $self->{headers} = [];
        $self->{plugins} = [];
-       $self->{pc_files} = [];
        $self->{output} = "";
 
        $self->{mkfile} = $mkfile;
@@ -282,9 +281,15 @@ sub Header($$)
 {
        my ($self,$ctx) = @_;
 
+       return if ($#{$ctx->{PUBLIC_HEADERS}} == -1);
+
+       $self->output("PUBLIC_HEADERS +=");
+
        foreach (@{$ctx->{PUBLIC_HEADERS}}) {
-               push (@{$self->{headers}}, output::add_dir_str($ctx->{BASEDIR}, $_));
+               $self->output(" " . output::add_dir_str($ctx->{BASEDIR}, $_));
        }
+
+       $self->output("\n");
 }
 
 sub Binary($$)
@@ -393,8 +398,6 @@ sub write($$)
 
        $self->output("PYTHON_DSOS = " . array2oneperline($self->{python_dsos}) . "\n");
        $self->output("PYTHON_PYS = " . array2oneperline($self->{python_pys}) . "\n");
-       $self->output("PUBLIC_HEADERS = " . array2oneperline($self->{headers}) . "\n");
-       $self->output("PC_FILES = " . array2oneperline($self->{pc_files}) . "\n");
        $self->output("ALL_OBJS = " . array2oneperline($self->{all_objs}) . "\n");
        $self->output("PLUGINS = " . array2oneperline($self->{plugins}) . "\n");