summaryrefslogtreecommitdiff
path: root/source4/build/smb_build
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-09-06 15:28:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:17:47 -0500
commit6b5e86f47b21b560827c3ca24ee09f92f80fad3b (patch)
treed3c2aaef9000d4a94b054b935d0bb463b40fe823 /source4/build/smb_build
parentc8295a7d2f68b5f2733b947ee2dbcd4358d0bf37 (diff)
downloadsamba-6b5e86f47b21b560827c3ca24ee09f92f80fad3b.tar.gz
samba-6b5e86f47b21b560827c3ca24ee09f92f80fad3b.tar.bz2
samba-6b5e86f47b21b560827c3ca24ee09f92f80fad3b.zip
r18183: - add LIBREPLACE globaly and add LIBREPLACE_HOSTCC
- also specify USE_HOSTCC = YES on binaries that use HOSTCC I also disable autodependecies as this change let make run forever, I hopefully fix that tomorrow metze (This used to be commit 159f74570233a8707dc1deb70fb1917a854213f8)
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r--source4/build/smb_build/config_mk.pm4
-rw-r--r--source4/build/smb_build/input.pm23
-rw-r--r--source4/build/smb_build/makefile.pm4
3 files changed, 28 insertions, 3 deletions
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index 80da0ab2fa..65f873f500 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -76,7 +76,9 @@ my $section_types = {
"PUBLIC_HEADERS" => "list",
"CFLAGS" => "string",
- "STANDARD_VISIBILITY" => "string"
+ "STANDARD_VISIBILITY" => "string",
+
+ "USE_HOSTCC" => "bool"
},
"LIBRARY" => {
"VERSION" => "string",
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index b07c9b1a07..a8f5485a35 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -30,6 +30,25 @@ sub str2array($)
return split /[ \t\n]/;
}
+sub add_libreplace($)
+{
+ my ($part) = @_;
+
+ return if ($part->{NAME} eq "LIBREPLACE");
+ return if ($part->{NAME} eq "LIBREPLACE_HOSTCC");
+
+ foreach my $n (@{$part->{PRIVATE_DEPENDENCIES}}) {
+ return if ($n eq "LIBREPLACE");
+ return if ($n eq "LIBREPLACE_HOSTCC");
+ }
+
+ if (defined($part->{USE_HOSTCC}) && $part->{USE_HOSTCC} eq "YES") {
+ push (@{$part->{PRIVATE_DEPENDENCIES}}, "LIBREPLACE_HOSTCC");
+ } else {
+ push (@{$part->{PRIVATE_DEPENDENCIES}}, "LIBREPLACE");
+ }
+}
+
sub check_subsystem($$$)
{
my ($INPUT, $subsys, $default_ot) = @_;
@@ -38,6 +57,7 @@ sub check_subsystem($$$)
unless(defined($subsys->{OUTPUT_TYPE})) {
$subsys->{OUTPUT_TYPE} = $default_ot;
}
+ add_libreplace($subsys);
}
sub check_module($$$)
@@ -75,6 +95,7 @@ sub check_module($$$)
} else {
push (@{$INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTIONS}}, $mod->{INIT_FUNCTION}) if defined($mod->{INIT_FUNCTION});
}
+ add_libreplace($mod);
}
sub check_library($$$)
@@ -100,6 +121,7 @@ sub check_library($$$)
}
$lib->{INSTALLDIR} = "LIBDIR";
+ add_libreplace($lib);
}
sub check_binary($$)
@@ -111,6 +133,7 @@ sub check_binary($$)
($bin->{BINARY} = (lc $bin->{NAME})) if not defined($bin->{BINARY});
$bin->{OUTPUT_TYPE} = "BINARY";
+ add_libreplace($bin);
}
sub import_integrated($$)
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 5309adea1d..a453cb6203 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -117,7 +117,7 @@ sub _prepare_compiler_linker($)
}
if (!(abs_path($self->{config}->{srcdir}) eq abs_path($self->{config}->{builddir}))) {
- $builddir_headers= "-I\$(builddir)/include -I\$(builddir)/lib/replace -I\$(builddir) -I\$(builddir)/lib ";
+ $builddir_headers= "-I\$(builddir)/include -I\$(builddir) -I\$(builddir)/lib ";
}
$self->output(<< "__EOD__"
@@ -126,7 +126,7 @@ SHELL=$self->{config}->{SHELL}
PERL=$self->{config}->{PERL}
CPP=$self->{config}->{CPP}
-CPPFLAGS=$builddir_headers-I\$(srcdir)/include -I\$(srcdir)/lib/replace -I\$(srcdir) -I\$(srcdir)/lib -D_SAMBA_BUILD_ -DHAVE_CONFIG_H $self->{config}->{CPPFLAGS}
+CPPFLAGS=$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -D_SAMBA_BUILD_ -DHAVE_CONFIG_H $self->{config}->{CPPFLAGS}
CC=$self->{config}->{CC}
CFLAGS=$self->{config}->{CFLAGS} \$(CPPFLAGS)