diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-03-03 18:25:28 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-03-03 18:25:28 +0100 |
commit | b29d47edcf2767d7f9e9f63332079c6e8e89946c (patch) | |
tree | 4d744bee8f5c7f14641bfc030e3f76dff2604add /source4/build | |
parent | f0bac65d9a184d5faedec4d8b325496478d2e54c (diff) | |
download | samba-b29d47edcf2767d7f9e9f63332079c6e8e89946c.tar.gz samba-b29d47edcf2767d7f9e9f63332079c6e8e89946c.tar.bz2 samba-b29d47edcf2767d7f9e9f63332079c6e8e89946c.zip |
Move object file lists to the Makefile.
(This used to be commit a7e6d2a1832db388fdafa1279f84c9a8bbfc87d6)
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/m4/public.m4 | 2 | ||||
-rw-r--r-- | source4/build/smb_build/config_mk.pm | 7 | ||||
-rw-r--r-- | source4/build/smb_build/input.pm | 2 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 15 | ||||
-rw-r--r-- | source4/build/smb_build/output.pm | 11 |
5 files changed, 6 insertions, 31 deletions
diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4 index eb673446c7..604092c8d7 100644 --- a/source4/build/m4/public.m4 +++ b/source4/build/m4/public.m4 @@ -31,7 +31,6 @@ SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS ################################### # Start Subsystem $1 @<:@SUBSYSTEM::$1@:>@ -OBJ_FILES = \$($1_OBJ_FILES) PRIVATE_DEPENDENCIES = $3 CFLAGS = \$($1_CFLAGS) ENABLE = YES @@ -54,7 +53,6 @@ SMB_INFO_LIBRARIES="$SMB_INFO_LIBRARIES ################################### # Start Library $1 @<:@LIBRARY::$1@:>@ -OBJ_FILES = \$($1_OBJ_FILES) PRIVATE_DEPENDENCIES = $3 VERSION = $4 SO_VERSION = $5 diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm index 7e0d2f8f56..e7fb7f5729 100644 --- a/source4/build/smb_build/config_mk.pm +++ b/source4/build/smb_build/config_mk.pm @@ -23,14 +23,11 @@ my $section_types = { SWIG_FILE => "string", "PRIVATE_DEPENDENCIES" => "list", "PUBLIC_DEPENDENCIES" => "list", - "OBJ_FILES" => "list", "ENABLE" => "bool", "LDFLAGS" => "list", "CFLAGS" => "list", }, "SUBSYSTEM" => { - "OBJ_FILES" => "list", - "PRIVATE_DEPENDENCIES" => "list", "PUBLIC_DEPENDENCIES" => "list", @@ -47,7 +44,6 @@ my $section_types = { "SUBSYSTEM" => "string", "INIT_FUNCTION" => "string", - "OBJ_FILES" => "list", "PRIVATE_DEPENDENCIES" => "list", @@ -62,7 +58,6 @@ my $section_types = { "CFLAGS" => "list" }, "BINARY" => { - "OBJ_FILES" => "list", "PRIVATE_DEPENDENCIES" => "list", @@ -88,8 +83,6 @@ my $section_types = { "INIT_FUNCTION_SENTINEL" => "string", "OUTPUT_TYPE" => "list", - "OBJ_FILES" => "list", - "PRIVATE_DEPENDENCIES" => "list", "PUBLIC_DEPENDENCIES" => "list", diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm index 948f2657b4..cd7b7ba2ac 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -249,7 +249,7 @@ sub check($$$$$) foreach my $part (values %$INPUT) { $part->{LINK_FLAGS} = []; - $part->{FULL_OBJ_LIST} = ["\$($part->{NAME}_OBJ_LIST)"]; + $part->{FULL_OBJ_LIST} = ["\$($part->{NAME}_OBJ_FILES)"]; if ($part->{TYPE} eq "SUBSYSTEM") { check_subsystem($INPUT, $part, $subsys_ot); diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index e0708b26fe..3d66c6bcfb 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -159,7 +159,7 @@ sub SharedModule($$) $self->_prepare_list($ctx, "LINK_FLAGS"); if (defined($ctx->{INIT_FUNCTION}) and $ctx->{INIT_FUNCTION_TYPE} =~ /\(\*\)/) { - $self->output("\$($ctx->{NAME}_OBJ_LIST): CFLAGS+=-D$ctx->{INIT_FUNCTION}=init_module\n"); + $self->output("\$($ctx->{NAME}_OBJ_FILES): CFLAGS+=-D$ctx->{INIT_FUNCTION}=init_module\n"); } $self->output("\$(eval \$(call shared_module_template,$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}, \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST), \$($ctx->{NAME}\_FULL_OBJ_LIST) \$($ctx->{NAME}_LINK_FLAGS)))\n"); @@ -220,15 +220,13 @@ sub MergedObj($$) return unless defined($ctx->{OUTPUT}); $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); - $self->output("\$(call partial_link_template, \$($ctx->{NAME}_OUTPUT), \$($ctx->{NAME}_OBJ_LIST))\n"); + $self->output("\$(call partial_link_template, \$($ctx->{NAME}_OUTPUT), \$($ctx->{NAME}_OBJ_FILES))\n"); } sub StaticLibraryPrimitives($$) { my ($self,$ctx) = @_; - return unless (defined($ctx->{OBJ_FILES})); - $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); $self->_prepare_list($ctx, "FULL_OBJ_LIST"); } @@ -236,15 +234,13 @@ sub StaticLibraryPrimitives($$) sub InitFunctions($$) { my ($self, $ctx) = @_; - $self->output("\$($ctx->{NAME}_OBJ_LIST): CFLAGS+=-DSTATIC_$ctx->{NAME}_MODULES=\"\$($ctx->{NAME}_INIT_FUNCTIONS)$ctx->{INIT_FUNCTION_SENTINEL}\"\n"); + $self->output("\$($ctx->{NAME}_OBJ_FILES): CFLAGS+=-DSTATIC_$ctx->{NAME}_MODULES=\"\$($ctx->{NAME}_INIT_FUNCTIONS)$ctx->{INIT_FUNCTION_SENTINEL}\"\n"); } sub StaticLibrary($$) { my ($self,$ctx) = @_; - return unless (defined($ctx->{OBJ_FILES})); - $self->output("STATIC_LIBS += $ctx->{RESULT_STATIC_LIBRARY}\n") if ($ctx->{TYPE} eq "LIBRARY"); $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); $self->output("$ctx->{RESULT_STATIC_LIBRARY}: \$($ctx->{NAME}_FULL_OBJ_LIST)\n"); @@ -288,7 +284,7 @@ sub ProtoHeader($$) my $target = "\$(addprefix $ctx->{BASEDIR}/, $ctx->{PRIVATE_PROTO_HEADER})"; $self->output("PROTO_HEADERS += $target\n"); - $self->output("\$(call proto_header_template, $target, \$($ctx->{NAME}_OBJ_LIST:.o=.c))\n"); + $self->output("\$(call proto_header_template, $target, \$($ctx->{NAME}_OBJ_FILES:.o=.c))\n"); } sub write($$) @@ -324,7 +320,6 @@ sub CFlags($$) my $src_ne_build = ($srcdir ne $builddir) ? 1 : 0; - return unless defined ($key->{OBJ_LIST}); return unless defined ($key->{FINAL_CFLAGS}); return unless (@{$key->{FINAL_CFLAGS}} > 0); @@ -350,7 +345,7 @@ sub CFlags($$) my $cflags = join(' ', @cflags); - $self->output("\$(patsubst %.ho,%.d,\$($key->{NAME}_OBJ_LIST:.o=.d)) \$($key->{NAME}_OBJ_LIST): CFLAGS+= $cflags\n"); + $self->output("\$(patsubst %.ho,%.d,\$($key->{NAME}_OBJ_LIST:.o=.d)) \$($key->{NAME}_OBJ_FILES): CFLAGS+= $cflags\n"); } 1; diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 1ddd39d261..58c9f20670 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -128,17 +128,6 @@ sub create_output($$) foreach $part (values %{$depend}) { next unless(defined($part->{OUTPUT_TYPE})); - # Combine object lists - if (defined($part->{OBJ_FILES})) { - my $list; - - $list = join(" ", @{$part->{OBJ_FILES}}); - unless ($list =~ /^\.\//) { - $list = "\$(addprefix $part->{BASEDIR}/, $list)" - } - push(@{$part->{OBJ_LIST}}, $list); - } - generate_binary($part) if grep(/BINARY/, @{$part->{OUTPUT_TYPE}}); generate_shared_library($part) if grep(/SHARED_LIBRARY/, @{$part->{OUTPUT_TYPE}}); generate_static_library($part) if grep(/STATIC_LIBRARY/, @{$part->{OUTPUT_TYPE}}); |