mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
r14529: Include $(builddir) where necesary
(This used to be commit ee49674dc6cbda95590409541703c36534b195b3)
This commit is contained in:
parent
dcc730e7fb
commit
92bb590970
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user