summaryrefslogtreecommitdiff
path: root/source4/build/smb_build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r--source4/build/smb_build/TODO13
-rw-r--r--source4/build/smb_build/makefile.pm11
-rw-r--r--source4/build/smb_build/output.pm11
3 files changed, 25 insertions, 10 deletions
diff --git a/source4/build/smb_build/TODO b/source4/build/smb_build/TODO
index b9607cd593..7d6999e973 100644
--- a/source4/build/smb_build/TODO
+++ b/source4/build/smb_build/TODO
@@ -1,6 +1,4 @@
- subdir handler for install headers into a specific directory
-- hack for loading modules locally
- - create
- saner names for some of the .pc files
- .pc files also when there is a public header?
- get rid of include/structs.h and include/proto.h
@@ -11,5 +9,14 @@
for each subsystem:
- include line in Makefile
- rule in Makefile
-- determine dependencies from #include lines ?
- install (parts of ?) autogenerated headers
+
+set of test scripts that check the code:
+- configure_check_unused.pl
+- find_unused_macros.pl
+- find_unused_makefilevars.pl
+- find_unused_options.sh
+- findstatic.pl
+- minimal_includes.pl
+- check dependencies based on #include lines ?
+- check whether private headers are not used outside their own subsystem
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 7002bc8844..1ff2e0cfa6 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -206,15 +206,15 @@ sub SharedLibrary($$)
my $init_obj = "";
if ($self->{duplicate_build}) {
- $installdir = "bin/install";
+ $installdir = $ctx->{INSTALLDIR};
} else {
- $installdir = "bin";
+ $installdir = $ctx->{BUILDDIR};
}
if ($ctx->{TYPE} eq "LIBRARY") {
- push (@{$self->{shared_libs}}, "bin/$ctx->{LIBRARY_REALNAME}");
+ push (@{$self->{shared_libs}}, "$ctx->{BUILDDIR}/$ctx->{LIBRARY_REALNAME}");
} elsif ($ctx->{TYPE} eq "MODULE") {
- push (@{$self->{shared_modules}}, "bin/$ctx->{LIBRARY_REALNAME}");
+ push (@{$self->{shared_modules}}, "$ctx->{BUILDDIR}/$ctx->{LIBRARY_REALNAME}");
push (@{$self->{plugins}}, "$installdir/$ctx->{LIBRARY_REALNAME}");
my $fixedname = $ctx->{NAME};
@@ -267,8 +267,9 @@ __EOD__
$self->output(<< "__EOD__"
#
-bin/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST) $init_obj
+$ctx->{TARGET}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST) $init_obj
\@echo Linking \$\@
+ \@mkdir -p $ctx->{BUILDDIR}
\@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \$(LOCAL_LINK_FLAGS) \\
\$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) $soarg \\
$init_obj \$($ctx->{TYPE}_$ctx->{NAME}_LINK_LIST)
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index 2a0d592895..15ce5a78b0 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -58,12 +58,17 @@ sub generate_shared_library($)
$lib_name = "lib$link_name";
}
+ $lib->{BUILDDIR} = "bin";
+ $lib->{INSTALLDIR} = "bin/install";
$lib->{LIBRARY_REALNAME} = $lib->{LIBRARY_NAME} = "$lib_name.\$(SHLIBEXT)";
+
if (defined($lib->{VERSION})) {
$lib->{LIBRARY_SONAME} = $lib->{LIBRARY_NAME}.".$lib->{SO_VERSION}";
$lib->{LIBRARY_REALNAME} = $lib->{LIBRARY_NAME}.".$lib->{VERSION}";
+ } elsif ($lib->{TYPE} eq "MODULE") {
+ $lib->{BUILDDIR} = "bin/modules/$lib->{SUBSYSTEM}";
}
- $lib->{TARGET} = "bin/$lib->{LIBRARY_REALNAME}";
+ $lib->{TARGET} = "$lib->{BUILDDIR}/$lib->{LIBRARY_REALNAME}";
$lib->{OUTPUT} = $lib->{TARGET};
}
@@ -93,7 +98,9 @@ sub generate_binary($)
@{$bin->{LINK_LIST}} = ("\$($bin->{TYPE}_$bin->{NAME}\_OBJ_LIST)");
@{$bin->{LINK_FLAGS}} = ();
- $bin->{TARGET} = $bin->{OUTPUT} = "bin/$bin->{NAME}";
+ $bin->{INSTALLDIR} = "bin/install";
+ $bin->{BUILDDIR} = "bin/";
+ $bin->{TARGET} = $bin->{OUTPUT} = "$bin->{BUILDDIR}/$bin->{NAME}";
$bin->{BINARY} = $bin->{NAME};
}