summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-03-17 19:41:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:57:39 -0500
commit92bb5909701b1994c90eb2833315df215f7e386a (patch)
tree2dd7453f7f3b8e9f99a9328f2e66629a2d73b4d7 /source4/build
parentdcc730e7fb347baebac1c88c045e782b20b4e20b (diff)
downloadsamba-92bb5909701b1994c90eb2833315df215f7e386a.tar.gz
samba-92bb5909701b1994c90eb2833315df215f7e386a.tar.bz2
samba-92bb5909701b1994c90eb2833315df215f7e386a.zip
r14529: Include $(builddir) where necesary
(This used to be commit ee49674dc6cbda95590409541703c36534b195b3)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/smb_build/TODO1
-rw-r--r--source4/build/smb_build/makefile.pm20
-rw-r--r--source4/build/smb_build/output.pm16
3 files changed, 19 insertions, 18 deletions
diff --git a/source4/build/smb_build/TODO b/source4/build/smb_build/TODO
index 3be5b1b63b..7a95f8824f 100644
--- a/source4/build/smb_build/TODO
+++ b/source4/build/smb_build/TODO
@@ -5,6 +5,7 @@
- include line in Makefile
- rule in Makefile
- generate headermap.txt
+- fixed shared library install
set of test scripts that check the code:
- configure_check_unused.pl
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index e632895f20..0b4da1817f 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -191,12 +191,12 @@ sub DependencyInfo($$)
{
my ($self,$ctx) = @_;
- $self->output("bin/deps/$ctx->{TYPE}_$ctx->{NAME}: \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST:.o=.c)");
+ $self->output("\$(builddir)/bin/deps/$ctx->{TYPE}_$ctx->{NAME}: \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST:.o=.c)");
$self->output("\n");
$self->output("\t\@echo \"Generating dependency info for $ctx->{NAME}\"\n");
$self->output("\t\@./script/cdeps.pl \$^ > \$@\n");
$self->output("\n");
- $self->output("-include bin/deps/$ctx->{TYPE}_$ctx->{NAME}\n\n");
+ $self->output("-include \$(builddir)/bin/deps/$ctx->{TYPE}_$ctx->{NAME}\n\n");
}
sub SharedLibrary($$)
@@ -245,14 +245,14 @@ sub SharedLibrary($$)
$proto_fn =~ s/\(\*\)/$ctx->{INIT_FUNCTION}/;
$self->output(<< "__EOD__"
-bin/$ctx->{NAME}_init_module.c:
+\$(builddir)/bin/$ctx->{NAME}_init_module.c:
\@echo Creating \$\@
\@echo \"#include \\\"includes.h\\\"\" > \$\@
\@echo \"$proto_fn;\" >> \$\@
\@echo -e \"_PUBLIC_ $init_fn \\n{\\n\\treturn $ctx->{INIT_FUNCTION}();\\n}\\n\" >> \$\@
__EOD__
);
- $init_obj = "bin/$ctx->{NAME}_init_module.o";
+ $init_obj = "\$(builddir)/bin/$ctx->{NAME}_init_module.o";
}
my $soarg = "";
@@ -371,9 +371,9 @@ sub Binary($$)
my $installdir;
if ($self->{duplicate_build}) {
- $installdir = "bin/install";
+ $installdir = "\$(builddir)/bin/install";
} else {
- $installdir = "bin";
+ $installdir = "\$(builddir)/bin";
}
push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)");
@@ -385,7 +385,7 @@ sub Binary($$)
push (@{$self->{bin_progs}}, "$installdir/$ctx->{BINARY}");
}
- push (@{$self->{binaries}}, "bin/$ctx->{BINARY}");
+ push (@{$self->{binaries}}, "\$(builddir)/bin/$ctx->{BINARY}");
$self->_prepare_list($ctx, "OBJ_LIST");
$self->_prepare_list($ctx, "CFLAGS");
@@ -396,7 +396,7 @@ sub Binary($$)
if ($self->{duplicate_build}) {
$self->output(<< "__EOD__"
#
-bin/$ctx->{BINARY}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)
+\$(builddir)/bin/$ctx->{BINARY}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)
\@echo Linking \$\@
\@\$(CC) \$(LDFLAGS) -o \$\@ \$(LOCAL_LINK_FLAGS) \$(INSTALL_LINK_FLAGS) \\
\$\($ctx->{TYPE}_$ctx->{NAME}_LINK_LIST) \\
@@ -512,8 +512,8 @@ sub write($$)
# nasty hack to allow running locally
if ($self->{duplicate_build}) {
- $self->output("bin/libdynconfig.\$(SHLIBEXT): dynconfig-devel.o\n");
- $self->output("bin/libdynconfig.\$(SHLIBEXT): LIBRARY_DYNCONFIG_OBJ_LIST=dynconfig-devel.o\n");
+ $self->output("\$(builddir)/bin/libdynconfig.\$(SHLIBEXT): dynconfig-devel.o\n");
+ $self->output("\$(builddir)/bin/libdynconfig.\$(SHLIBEXT): LIBRARY_DYNCONFIG_OBJ_LIST=dynconfig-devel.o\n");
}
$self->_prepare_mk_files();
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index 594d1d48c7..cf01368aac 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -28,14 +28,14 @@ sub generate_mergedobj($)
{
my $subsys = shift;
- $subsys->{OUTPUT} = $subsys->{TARGET} = "bin/subsystems/$subsys->{TYPE}_$subsys->{NAME}.o";
+ $subsys->{OUTPUT} = $subsys->{TARGET} = "\$(builddir)/bin/subsystems/$subsys->{TYPE}_$subsys->{NAME}.o";
}
sub generate_objlist($)
{
my $subsys = shift;
- $subsys->{TARGET} = "bin/.$subsys->{TYPE}_$subsys->{NAME}";
+ $subsys->{TARGET} = "\$(builddir)/bin/.$subsys->{TYPE}_$subsys->{NAME}";
$subsys->{OUTPUT} = "\$($subsys->{TYPE}_$subsys->{NAME}_OBJ_LIST)";
}
@@ -58,15 +58,15 @@ sub generate_shared_library($)
$lib_name = "lib$link_name";
}
- $lib->{DEBUGDIR} = "bin";
- $lib->{RELEASEDIR} = "bin/install";
+ $lib->{DEBUGDIR} = "\$(builddir)/bin";
+ $lib->{RELEASEDIR} = "\$(builddir)/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->{DEBUGDIR} = "bin/modules/$lib->{SUBSYSTEM}";
+ $lib->{DEBUGDIR} = "\$(builddir)/bin/modules/$lib->{SUBSYSTEM}";
}
$lib->{TARGET} = "$lib->{DEBUGDIR}/$lib->{LIBRARY_REALNAME}";
$lib->{OUTPUT} = $lib->{TARGET};
@@ -86,7 +86,7 @@ sub generate_static_library($)
@{$lib->{LINK_LIST}} = ("\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)");
@{$lib->{LINK_FLAGS}} = ();
- $lib->{TARGET} = "bin/$lib->{LIBRARY_NAME}";
+ $lib->{TARGET} = "\$(builddir)/bin/$lib->{LIBRARY_NAME}";
$lib->{OUTPUT} = "-l".lc($link_name);
}
@@ -98,8 +98,8 @@ sub generate_binary($)
@{$bin->{LINK_LIST}} = ("\$($bin->{TYPE}_$bin->{NAME}\_OBJ_LIST)");
@{$bin->{LINK_FLAGS}} = ();
- $bin->{RELEASEDIR} = "bin/install";
- $bin->{DEBUGDIR} = "bin/";
+ $bin->{RELEASEDIR} = "\$(builddir)/bin/install";
+ $bin->{DEBUGDIR} = "\$(builddir)/bin/";
$bin->{TARGET} = $bin->{OUTPUT} = "$bin->{DEBUGDIR}/$bin->{NAME}";
$bin->{BINARY} = $bin->{NAME};
}