diff options
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/m4/public.m4 | 24 | ||||
-rw-r--r-- | source4/build/smb_build/config_mk.pm | 4 | ||||
-rwxr-xr-x | source4/build/smb_build/dot.pl | 2 | ||||
-rw-r--r-- | source4/build/smb_build/input.pm | 61 | ||||
-rw-r--r-- | source4/build/smb_build/main.pl | 13 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 52 | ||||
-rw-r--r-- | source4/build/smb_build/output.pm | 38 | ||||
-rw-r--r-- | source4/build/smb_build/summary.pm | 5 |
8 files changed, 85 insertions, 114 deletions
diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4 index d045cf42b7..eb673446c7 100644 --- a/source4/build/m4/public.m4 +++ b/source4/build/m4/public.m4 @@ -8,7 +8,7 @@ dnl SMB_SUBSYSTEM(name,obj_files,required_subsystems) dnl dnl SMB_EXT_LIB_FROM_PKGCONFIG(name,pkg-config name,[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) dnl -dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags,pcname) +dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags) dnl dnl SMB_ENABLE(name,default_build) dnl @@ -40,7 +40,7 @@ ENABLE = YES " ]) -dnl SMB_LIBRARY(name,obj_files,required_subsystems,version,so_version,cflags,ldflags,pcname) +dnl SMB_LIBRARY(name,obj_files,required_subsystems,version,so_version,cflags,ldflags) AC_DEFUN([SMB_LIBRARY], [ MAKE_SETTINGS="$MAKE_SETTINGS @@ -60,7 +60,6 @@ VERSION = $4 SO_VERSION = $5 CFLAGS = \$($1_CFLAGS) LDFLAGS = \$($1_LDFLAGS) -PC_NAME = $8 ENABLE = YES # End Library $1 ################################### @@ -104,8 +103,7 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG], [`$PKG_CONFIG --libs-only-l '$2'`], [`$PKG_CONFIG --cflags-only-other '$2'`], [`$PKG_CONFIG --cflags-only-I '$2'`], - [`$PKG_CONFIG --libs-only-other '$2'` `$PKG_CONFIG --libs-only-L '$2'`], - [ $2 ]) + [`$PKG_CONFIG --libs-only-other '$2'` `$PKG_CONFIG --libs-only-L '$2'`]) ac_cv_$1_found=yes else @@ -133,11 +131,11 @@ dnl SMB_INCLUDE_MK(file) AC_DEFUN([SMB_INCLUDE_MK], [ SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS -include $1 +mkinclude $1 " ]) -dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags,pcname) +dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags) AC_DEFUN([SMB_EXT_LIB], [ MAKE_SETTINGS="$MAKE_SETTINGS @@ -147,18 +145,6 @@ $1_CPPFLAGS = $4 $1_LDFLAGS = $5 " -SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS -################################### -# Start Ext Lib $1 -@<:@EXT_LIB::$1@:>@ -LIBS = \$($1_LIBS) -CFLAGS = \$($1_CFLAGS) -CPPFLAGS = \$($1_CPPFLAGS) -LDFLAGS = \$($1_LDFLAGS) -PC_NAME = $6 -# End Ext Lib $1 -################################### -" ]) dnl SMB_ENABLE(name,default_build) diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm index 027c7ff6d6..70520554ab 100644 --- a/source4/build/smb_build/config_mk.pm +++ b/source4/build/smb_build/config_mk.pm @@ -18,7 +18,6 @@ my $section_types = { "CFLAGS" => "list", "CPPFLAGS" => "list", "LDFLAGS" => "list", - "PC_NAME" => "string", }, "PYTHON" => { SWIG_FILE => "string", @@ -90,7 +89,6 @@ my $section_types = { "SO_VERSION" => "string", "LIBRARY_REALNAME" => "string", - "PC_NAME" => "string", "PC_FILE" => "string", "INIT_FUNCTION_TYPE" => "string", @@ -241,7 +239,7 @@ sub run_config_mk($$$$) } # include - if ($line =~ /^include (.*)$/) { + if ($line =~ /^mkinclude (.*)$/) { my $subfile= $1; my $subdir = dirname($filename); $subdir =~ s/^\.$//g; diff --git a/source4/build/smb_build/dot.pl b/source4/build/smb_build/dot.pl index 82f89c081a..e50ee50f95 100755 --- a/source4/build/smb_build/dot.pl +++ b/source4/build/smb_build/dot.pl @@ -44,7 +44,7 @@ my $name = "samba4"; my $only; if (defined($subsys)) { my $DEPEND = smb_build::input::check($INPUT, \%config::enabled, - "STATIC_LIBRARY", "SHARED_LIBRARY", "SHARED_LIBRARY"); + "MERGED_OBJ", "SHARED_LIBRARY", "SHARED_LIBRARY"); die("No such subsystem $subsys") unless (defined($DEPEND->{$subsys})); diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm index 6be48fcc67..9aef1c1002 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -5,13 +5,10 @@ # Copyright (C) Jelmer Vernooij 2004 # Released under the GNU GPL -use smb_build::config; use strict; package smb_build::input; use File::Basename; -my $srcdir = $config::config{srcdir}; - sub strtrim($) { $_ = shift; @@ -60,10 +57,7 @@ sub check_subsystem($$$) my ($INPUT, $subsys, $default_ot) = @_; return if ($subsys->{ENABLE} ne "YES"); - unless(defined($subsys->{OUTPUT_TYPE})) { - $subsys->{OUTPUT_TYPE} = $default_ot; - } - + unless (defined($subsys->{OUTPUT_TYPE})) { $subsys->{OUTPUT_TYPE} = $default_ot; } unless (defined($subsys->{INIT_FUNCTION_TYPE})) { $subsys->{INIT_FUNCTION_TYPE} = "NTSTATUS (*) (void)"; } unless (defined($subsys->{INIT_FUNCTION_SENTINEL})) { $subsys->{INIT_FUNCTION_SENTINEL} = "NULL"; } } @@ -79,11 +73,11 @@ sub check_module($$$) } if (!(defined($INPUT->{$mod->{SUBSYSTEM}}))) { - $mod->{ENABLE} = "NO"; - return; + die("Unknown subsystem $mod->{SUBSYSTEM} for module $mod->{NAME}"); } if ($INPUT->{$mod->{SUBSYSTEM}} eq "NO") { + warn("Disabling module $mod->{NAME} because subsystem $mod->{SUBSYSTEM} is disabled"); $mod->{ENABLE} = "NO"; return; } @@ -98,7 +92,7 @@ sub check_module($$$) if (not defined($mod->{OUTPUT_TYPE})) { if ($INPUT->{$mod->{SUBSYSTEM}}->{TYPE} eq "EXT_LIB") { - $mod->{OUTPUT_TYPE} = ["SHARED_LIBRARY"]; + $mod->{OUTPUT_TYPE} = undef; } else { $mod->{OUTPUT_TYPE} = $default_ot; } @@ -111,8 +105,9 @@ sub check_module($$$) push (@{$mod->{PUBLIC_DEPENDENCIES}}, $mod->{SUBSYSTEM}); add_libreplace($mod); } - if (grep(/INTEGRATED/, @{$mod->{OUTPUT_TYPE}})) { + if (grep(/MERGED_OBJ/, @{$mod->{OUTPUT_TYPE}})) { push (@{$INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTIONS}}, $mod->{INIT_FUNCTION}) if defined($mod->{INIT_FUNCTION}); + unshift (@{$INPUT->{$mod->{SUBSYSTEM}}{PRIVATE_DEPENDENCIES}}, $mod->{NAME}); } } @@ -159,8 +154,8 @@ sub check_python($$$) $python->{OBJ_FILES} = ["$dirname$basename\_wrap.o"]; $python->{LIBRARY_REALNAME} = "_$basename.\$(SHLIBEXT)"; $python->{PYTHON_FILES} = ["$dirname$basename.py"]; - push (@{$python->{CFLAGS}}, $config::config{CFLAG_NO_UNUSED_MACROS}); - push (@{$python->{CFLAGS}}, $config::config{CFLAG_NO_CAST_QUAL}); + push (@{$python->{CFLAGS}}, "\$(CFLAG_NO_UNUSED_MACROS)"); + push (@{$python->{CFLAGS}}, "\$(CFLAG_NO_CAST_QUAL)"); $python->{INIT_FUNCTION} = "{ (char *)\"_$basename\", init_$basename }"; } else { my $basename = $python->{NAME}; @@ -168,7 +163,7 @@ sub check_python($$$) $python->{LIBRARY_REALNAME} = "$basename.\$(SHLIBEXT)"; $python->{INIT_FUNCTION} = "{ (char *)\"$basename\", init$basename }"; } - push (@{$python->{CFLAGS}}, @{$INPUT->{EXT_LIB_PYTHON}->{CFLAGS}}); + push (@{$python->{CFLAGS}}, "\$(EXT_LIB_PYTHON_CFLAGS)"); $python->{SUBSYSTEM} = "LIBPYTHON"; @@ -187,26 +182,6 @@ sub check_binary($$) add_libreplace($bin); } -sub import_integrated($$) -{ - my ($lib, $depend) = @_; - - foreach my $mod (values %$depend) { - next if(not defined($mod->{OUTPUT_TYPE})); - next if(not grep(/INTEGRATED/, @{$mod->{OUTPUT_TYPE}})); - next if(not defined($mod->{SUBSYSTEM})); - next if($mod->{SUBSYSTEM} ne $lib->{NAME}); - next if($mod->{ENABLE} ne "YES"); - - push (@{$lib->{LINK_FLAGS}}, "\$($mod->{NAME}_LINK_FLAGS)"); - push (@{$lib->{CFLAGS}}, @{$mod->{CFLAGS}}) if defined($mod->{CFLAGS}); - push (@{$lib->{PUBLIC_DEPENDENCIES}}, @{$mod->{PUBLIC_DEPENDENCIES}}) if defined($mod->{PUBLIC_DEPENDENCIES}); - push (@{$lib->{PRIVATE_DEPENDENCIES}}, @{$mod->{PRIVATE_DEPENDENCIES}}) if defined($mod->{PRIVATE_DEPENDENCIES}); - - $mod->{ENABLE} = "NO"; - } -} - sub add_implicit($$) { my ($INPUT, $n) = @_; @@ -214,9 +189,12 @@ sub add_implicit($$) $INPUT->{$n} = { TYPE => "MAKE_RULE", NAME => $n, - TARGET => lc($n), - LIBS => "\$(".uc($n)."_LIBS)", - CFLAGS => "\$(".uc($n)."_CFLAG)" + TARGET => "", + OUTPUT_TYPE => undef, + LIBS => ["\$(".uc($n)."_LIBS)"], + LDFLAGS => ["\$(".uc($n)."_LDFLAGS)"], + CFLAGS => ["\$(".uc($n)."_CFLAGS)"], + CPPFLAGS => ["\$(".uc($n)."_CPPFLAGS)"] }; } @@ -227,15 +205,17 @@ sub calc_unique_deps($$$$$$$$) foreach my $n (@$deps) { add_implicit($INPUT, $n) unless (defined($INPUT->{$n})); - die("Recursive dependency: $n, list: " . join(',', @$busy)) if (grep (/^$n$/, @$busy)); - next if (grep /^$n$/, @$udeps); my $dep = $INPUT->{$n}; + if (grep (/^$n$/, @$busy)) { + next if (@{$dep->{OUTPUT_TYPE}}[0] eq "MERGED_OBJ"); + die("Recursive dependency: $n, list: " . join(',', @$busy)); + } + next if (grep /^$n$/, @$udeps); push (@{$udeps}, $dep->{NAME}) if $forward; if (defined ($dep->{OUTPUT_TYPE}) && ($withlibs or - (@{$dep->{OUTPUT_TYPE}}[0] eq "INTEGRATED") or (@{$dep->{OUTPUT_TYPE}}[0] eq "MERGED_OBJ") or (@{$dep->{OUTPUT_TYPE}}[0] eq "STATIC_LIBRARY"))) { push (@$busy, $dep->{NAME}); @@ -306,7 +286,6 @@ sub check($$$$$) if (defined($part->{INIT_FUNCTIONS})) { push (@{$part->{LINK_FLAGS}}, "\$(DYNEXP)"); } - import_integrated($part, $INPUT); } foreach my $part (values %$INPUT) { diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl index 3911a11773..c6031e23e6 100644 --- a/source4/build/smb_build/main.pl +++ b/source4/build/smb_build/main.pl @@ -18,9 +18,7 @@ use strict; my $INPUT = {}; my $mkfile = smb_build::config_mk::run_config_mk($INPUT, $config::config{srcdir}, $config::config{builddir}, "main.mk"); -my $subsys_output_type; -$subsys_output_type = ["MERGED_OBJ"]; -#$subsys_output_type = ["STATIC_LIBRARY"]; +my $subsys_output_type = ["MERGED_OBJ"]; my $library_output_type; if ($config::config{USESHARED} eq "true") { @@ -35,7 +33,7 @@ my $module_output_type; if ($config::config{USESHARED} eq "true") { $module_output_type = ["SHARED_LIBRARY"]; } else { - $module_output_type = ["INTEGRATED"]; + $module_output_type = ["MERGED_OBJ"]; } my $DEPEND = smb_build::input::check($INPUT, \%config::enabled, @@ -43,12 +41,13 @@ my $DEPEND = smb_build::input::check($INPUT, \%config::enabled, $library_output_type, $module_output_type); my $OUTPUT = output::create_output($DEPEND, \%config::config); -$config::config{SUBSYSTEM_OUTPUT_TYPE} = $subsys_output_type; -$config::config{LIBRARY_OUTPUT_TYPE} = $library_output_type; -$config::config{MODULE_OUTPUT_TYPE} = $module_output_type; my $mkenv = new smb_build::makefile(\%config::config, $mkfile); my $shared_libs_used = 0; +foreach my $key (values %$OUTPUT) { + $mkenv->_prepare_list($key, "OBJ_LIST"); + push(@{$mkenv->{all_objs}}, "\$($key->{NAME}_OBJ_LIST)"); +} foreach my $key (values %$OUTPUT) { next unless defined $key->{OUTPUT_TYPE}; diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 072e3c0c4b..5fd9f359ee 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -101,19 +101,6 @@ sub _prepare_list($$$) $self->output("$ctx->{NAME}_$var =$tmplist\n"); } -sub Integrated($$) -{ - my ($self,$ctx) = @_; - - $self->_prepare_list($ctx, "OBJ_LIST"); - $self->output("$ctx->{SUBSYSTEM}_OBJ_LIST += \$($ctx->{NAME}_OBJ_LIST)\n"); - if(defined($ctx->{INIT_FUNCTION})) { - my $init_fn = $ctx->{INIT_FUNCTION}; - $init_fn =~ s/"/\\\"/g; - $self->output("$ctx->{SUBSYSTEM}_INIT_FUNCTIONS += \"$init_fn,\"\n"); - } -} - sub SharedModulePrimitives($$) { my ($self,$ctx) = @_; @@ -154,7 +141,7 @@ sub SharedModule($$) } $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); - $self->_prepare_list($ctx, "OBJ_LIST"); + $self->_prepare_list($ctx, "FULL_OBJ_LIST"); $self->_prepare_list($ctx, "DEPEND_LIST"); $self->_prepare_list($ctx, "LINK_FLAGS"); @@ -190,7 +177,7 @@ sub SharedLibraryPrimitives($$) if (not grep(/STATIC_LIBRARY/, @{$ctx->{OUTPUT_TYPE}})) { $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); - $self->_prepare_list($ctx, "OBJ_LIST"); + $self->_prepare_list($ctx, "FULL_OBJ_LIST"); } } @@ -198,14 +185,14 @@ sub SharedLibrary($$) { my ($self,$ctx) = @_; - $self->output("SHARED_LIBS += $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}\n") if (defined($ctx->{SO_VERSION})); + $self->output("SHARED_LIBS += $ctx->{RESULT_SHARED_LIBRARY}\n") if (defined($ctx->{SO_VERSION})); $self->_prepare_list($ctx, "DEPEND_LIST"); $self->_prepare_list($ctx, "LINK_FLAGS"); $self->output(<< "__EOD__" -$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_OBJ_LIST) +$ctx->{RESULT_SHARED_LIBRARY}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST) \@echo Linking \$\@ \@mkdir -p $ctx->{SHAREDDIR} \@\$(SHLD) \$(SHLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ @@ -226,16 +213,15 @@ sub MergedObj($$) { my ($self, $ctx) = @_; + return unless defined($ctx->{OUTPUT}); + $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); - $self->_prepare_list($ctx, "OBJ_LIST"); - $self->_prepare_list($ctx, "FULL_OBJ_LIST"); - push(@{$self->{all_objs}}, "\$($ctx->{NAME}_FULL_OBJ_LIST)"); $self->output(<< "__EOD__" # -$ctx->{TARGET_MERGED_OBJ}: \$($ctx->{NAME}_FULL_OBJ_LIST) +$ctx->{RESULT_MERGED_OBJ}: \$($ctx->{NAME}_OBJ_LIST) \@echo Partially linking \$@ \@mkdir -p bin/mergedobj - \$(PARTLINK) -o \$@ \$($ctx->{NAME}_FULL_OBJ_LIST) + \$(PARTLINK) -o \$@ \$($ctx->{NAME}_OBJ_LIST) __EOD__ ); @@ -247,7 +233,10 @@ sub StaticLibraryPrimitives($$) return unless (defined($ctx->{OBJ_FILES})); - $self->_prepare_list($ctx, "OBJ_LIST"); + push (@{$self->{static_libs}}, $ctx->{RESULT_STATIC_LIBRARY}) if ($ctx->{TYPE} eq "LIBRARY"); + + $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); + $self->_prepare_list($ctx, "FULL_OBJ_LIST"); } sub InitFunctions($$) @@ -259,6 +248,13 @@ sub InitFunctions($$) sub StaticLibrary($$) { my ($self,$ctx) = @_; + $self->output(<< "__EOD__" +# +$ctx->{RESULT_STATIC_LIBRARY}: \$($ctx->{NAME}_FULL_OBJ_LIST) + \@echo Linking \$@ + \@rm -f \$@ + \@mkdir -p $ctx->{STATICDIR} + \@\$(STLD) \$(STLD_FLAGS) \$@ \$($ctx->{NAME}_FULL_OBJ_LIST) return unless (defined($ctx->{OBJ_FILES})); @@ -288,19 +284,19 @@ sub Binary($$) unless (defined($ctx->{INSTALLDIR})) { } elsif ($ctx->{INSTALLDIR} eq "SBINDIR") { - $self->output("SBIN_PROGS += bin/$ctx->{BINARY}\n"); + $self->output("SBIN_PROGS += $ctx->{RESULT_BINARY}\n"); } elsif ($ctx->{INSTALLDIR} eq "BINDIR") { - $self->output("BIN_PROGS += bin/$ctx->{BINARY}\n"); + $self->output("BIN_PROGS += $ctx->{RESULT_BINARY}\n"); } - $self->output("binaries:: bin/$ctx->{BINARY}\n"); + $self->output("binaries:: $ctx->{TARGET_BINARY}\n"); - $self->_prepare_list($ctx, "OBJ_LIST"); + $self->_prepare_list($ctx, "FULL_OBJ_LIST"); $self->_prepare_list($ctx, "DEPEND_LIST"); $self->_prepare_list($ctx, "LINK_FLAGS"); $self->output(<< "__EOD__" -bin/$ctx->{BINARY}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_OBJ_LIST) +$ctx->{RESULT_BINARY}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST) \@echo Linking \$\@ __EOD__ ); diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 0ddb9e4efb..83be28e740 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -85,8 +85,9 @@ sub generate_shared_library($) $lib->{LIBRARY_REALNAME} = "$lib->{LIBRARY_REALNAME}.\$($lib->{NAME}_VERSION)"; } - $lib->{TARGET_SHARED_LIBRARY} = "$lib->{SHAREDDIR}/$lib->{LIBRARY_REALNAME}"; - $lib->{OUTPUT_SHARED_LIBRARY} = $lib->{TARGET_SHARED_LIBRARY}; + $lib->{RESULT_SHARED_LIBRARY} = "$lib->{SHAREDDIR}/$lib->{LIBRARY_REALNAME}"; + $lib->{OUTPUT_SHARED_LIBRARY} = "-l$link_name"; + $lib->{TARGET_SHARED_LIBRARY} = $lib->{RESULT_SHARED_LIBRARY}; } sub generate_merged_obj($) @@ -96,8 +97,14 @@ sub generate_merged_obj($) my $link_name = $lib->{NAME}; $link_name =~ s/^LIB//; - $lib->{MERGED_OBJNAME} = lc($link_name).".o"; - $lib->{TARGET_MERGED_OBJ} = $lib->{OUTPUT_MERGED_OBJ} = "bin/mergedobj/$lib->{MERGED_OBJNAME}"; + if (defined($lib->{OBJ_FILES})) { + $lib->{MERGED_OBJNAME} = lc($link_name).".o"; + $lib->{RESULT_MERGED_OBJ} = $lib->{OUTPUT_MERGED_OBJ} = "bin/mergedobj/$lib->{MERGED_OBJNAME}"; + $lib->{TARGET_MERGED_OBJ} = $lib->{RESULT_MERGED_OBJ}; + } else { + $lib->{TARGET_MERGED_OBJ} = ""; + $lib->{RESULT_MERGED_OBJ} = ""; + } } sub generate_static_library($) @@ -113,10 +120,12 @@ sub generate_static_library($) $lib->{LIBRARY_NAME} = "lib".lc($link_name).".a"; if (defined($lib->{OBJ_FILES})) { - $lib->{TARGET_STATIC_LIBRARY} = "bin/static/$lib->{LIBRARY_NAME}"; + $lib->{RESULT_STATIC_LIBRARY} = "bin/static/$lib->{LIBRARY_NAME}"; + $lib->{TARGET_STATIC_LIBRARY} = $lib->{RESULT_STATIC_LIBRARY}; $lib->{STATICDIR} = 'bin/static'; $lib->{OUTPUT_STATIC_LIBRARY} = "-l".lc($link_name); } else { + $lib->{RESULT_STATIC_LIBRARY} = ""; $lib->{TARGET_STATIC_LIBRARY} = ""; $lib->{OUTPUT_STATIC_LIBRARY} = ""; } @@ -127,10 +136,11 @@ sub generate_binary($) my $bin = shift; $bin->{DEPEND_LIST} = []; - push(@{$bin->{LINK_FLAGS}}, "\$($bin->{NAME}\_OBJ_LIST)"); + push(@{$bin->{LINK_FLAGS}}, "\$($bin->{NAME}\_FULL_OBJ_LIST)"); - $bin->{DEBUGDIR} = "bin/"; - $bin->{TARGET_BINARY} = $bin->{OUTPUT_BINARY} = "$bin->{DEBUGDIR}/$bin->{NAME}"; + $bin->{DEBUGDIR} = "bin"; + $bin->{RESULT_BINARY} = $bin->{OUTPUT_BINARY} = "$bin->{DEBUGDIR}/$bin->{NAME}"; + $bin->{TARGET_BINARY} = $bin->{RESULT_BINARY}; $bin->{BINARY} = $bin->{NAME}; } @@ -188,15 +198,19 @@ sub create_output($$) my $elem = $depend->{$_}; next if $elem == $part; - push(@{$part->{LINK_FLAGS}}, "\$($elem->{NAME}_OUTPUT)") if defined($elem->{OUTPUT}); push(@{$part->{LINK_FLAGS}}, @{$elem->{LIBS}}) if defined($elem->{LIBS}); - push(@{$part->{LINK_FLAGS}},@{$elem->{LDFLAGS}}) if defined($elem->{LDFLAGS}); - push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET}); + push(@{$part->{LINK_FLAGS}}, @{$elem->{LDFLAGS}}) if defined($elem->{LDFLAGS}); + if (defined($elem->{OUTPUT_TYPE}) and @{$elem->{OUTPUT_TYPE}}[0] eq "MERGED_OBJ") { + push (@{$part->{FULL_OBJ_LIST}}, $elem->{TARGET}); + } else { + push(@{$part->{LINK_FLAGS}}, "\$($elem->{NAME}_OUTPUT)") if defined($elem->{OUTPUT}); + push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET}); + } } } foreach $part (values %{$depend}) { - if (($part->{STANDARD_VISIBILITY} ne "default") and + if (defined($part->{STANDARD_VISIBILITY}) and ($part->{STANDARD_VISIBILITY} ne "default") and ($config->{visibility_attribute} eq "yes")) { push(@{$part->{FINAL_CFLAGS}}, "-fvisibility=$part->{STANDARD_VISIBILITY}"); } diff --git a/source4/build/smb_build/summary.pm b/source4/build/smb_build/summary.pm index 52817f3597..4ea1ad525e 100644 --- a/source4/build/smb_build/summary.pm +++ b/source4/build/smb_build/summary.pm @@ -5,6 +5,7 @@ # Released under the GNU GPL package summary; +use smb_build::config; use strict; sub enabled($) @@ -21,9 +22,7 @@ sub showitem($$$) my @need = (); foreach (@$items) { - if (!enabled($output->{$_}->{ENABLE})) { - push (@need, $_); - } + push (@need, $_) if (enabled($config::enable{$_})); } print "Support for $desc: "; |