diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-10-05 19:51:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:07:47 -0500 |
commit | 8c2ef262a83041fc194b32e412afb18647733ce0 (patch) | |
tree | 72a32c1ce2d2b2e839e0d42f70c56b109a268a31 | |
parent | 719a4ae0d32ab9ba817fd01f2b8f4cba220a8c60 (diff) | |
download | samba-8c2ef262a83041fc194b32e412afb18647733ce0.tar.gz samba-8c2ef262a83041fc194b32e412afb18647733ce0.tar.xz samba-8c2ef262a83041fc194b32e412afb18647733ce0.zip |
r25524: Fix directory names for local module builds.
(This used to be commit 93e5a568e3da1c8b2e7decb2a675456ad35dc29b)
-rw-r--r-- | source4/build/smb_build/input.pm | 4 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 21 | ||||
-rw-r--r-- | source4/build/smb_build/output.pm | 6 |
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"; |