summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source4/build/smb_build/input.pm4
-rw-r--r--source4/build/smb_build/makefile.pm21
-rw-r--r--source4/build/smb_build/output.pm6
3 files changed, 19 insertions, 12 deletions
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index 11ddea11738..a96aad22717 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -99,7 +99,9 @@ sub check_module($$$)
}
if (grep(/SHARED_LIBRARY/, @{$mod->{OUTPUT_TYPE}})) {
- $mod->{INSTALLDIR} = "MODULESDIR/$mod->{SUBSYSTEM}";
+ my $sane_subsystem = lc($mod->{SUBSYSTEM});
+ $sane_subsystem =~ s/^lib//;
+ $mod->{INSTALLDIR} = "MODULESDIR/$sane_subsystem";
push (@{$mod->{PRIVATE_DEPENDENCIES}}, $mod->{SUBSYSTEM});
}
if (grep(/INTEGRATED/, @{$mod->{OUTPUT_TYPE}})) {
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 98b7e41306a..b1bd215af18 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -285,24 +285,27 @@ sub SharedLibrary($$)
my $init_obj = "";
my $has_static_lib = 0;
-
+
if ($ctx->{TYPE} eq "LIBRARY") {
push (@{$self->{shared_libs}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION}));
push (@{$self->{installable_shared_libs}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION}));
} elsif ($ctx->{TYPE} eq "MODULE") {
+ my $sane_subsystem = lc($ctx->{SUBSYSTEM});
+ $sane_subsystem =~ s/^lib//;
+
push (@{$self->{shared_modules}}, "$ctx->{TARGET_SHARED_LIBRARY}");
push (@{$self->{plugins}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}");
- $self->{install_plugins} .= "\t\@echo Installing $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{LIBRARY_REALNAME}\n";
- $self->{install_plugins} .= "\t\@mkdir -p \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/\n";
- $self->{install_plugins} .= "\t\@cp $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{LIBRARY_REALNAME}\n";
- $self->{uninstall_plugins} .= "\t\@echo Uninstalling \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{LIBRARY_REALNAME}\n";
- $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{LIBRARY_REALNAME}\n";
+ $self->{install_plugins} .= "\t\@echo Installing $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n";
+ $self->{install_plugins} .= "\t\@mkdir -p \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/\n";
+ $self->{install_plugins} .= "\t\@cp $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n";
+ $self->{uninstall_plugins} .= "\t\@echo Uninstalling \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n";
+ $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n";
if (defined($ctx->{ALIASES})) {
foreach (@{$ctx->{ALIASES}}) {
- $self->{install_plugins} .= "\t\@rm -f \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$_.\$(SHLIBEXT)\n";
- $self->{install_plugins} .= "\t\@ln -fs $ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$_.\$(SHLIBEXT)\n";
- $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$_.\$(SHLIBEXT)\n";
+ $self->{install_plugins} .= "\t\@rm -f \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$_.\$(SHLIBEXT)\n";
+ $self->{install_plugins} .= "\t\@ln -fs $ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$_.\$(SHLIBEXT)\n";
+ $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$_.\$(SHLIBEXT)\n";
}
}
}
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index ec273b894a3..42e68abec98 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -55,9 +55,11 @@ sub generate_shared_library($)
$lib->{SHAREDDIR} = $lib->{BASEDIR};
} else {
if ($lib->{TYPE} eq "MODULE") {
- $lib->{SHAREDDIR} = "bin/modules/$lib->{SUBSYSTEM}";
+ my $sane_subsystem = lc($lib->{SUBSYSTEM});
+ $sane_subsystem =~ s/^lib//;
+ $lib->{SHAREDDIR} = "bin/modules/$sane_subsystem";
$lib->{LIBRARY_REALNAME} = $link_name;
- $lib->{LIBRARY_REALNAME} =~ s/^$lib->{SUBSYSTEM}_//g;
+ $lib->{LIBRARY_REALNAME} =~ s/^$sane_subsystem\_//g;
$lib->{LIBRARY_REALNAME}.= ".\$(SHLIBEXT)";
} else {
$lib->{SHAREDDIR} = "bin/shared";