diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-10-29 23:50:32 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:24:42 -0500 |
commit | 72b164d2e94a73d4d1231b7d0b44ed400d2d8470 (patch) | |
tree | 466cadaf5df8f75dc4d54e4fe13733cb51920b30 | |
parent | d6c003083c75a485044bc2d42045f1887ad64e8d (diff) | |
download | samba-72b164d2e94a73d4d1231b7d0b44ed400d2d8470.tar.gz samba-72b164d2e94a73d4d1231b7d0b44ed400d2d8470.tar.bz2 samba-72b164d2e94a73d4d1231b7d0b44ed400d2d8470.zip |
r19509: Simplify buildsystem code, create proper symlinks for aliases.
(This used to be commit a6d610805970dcb8b2676db9074432a094f7c149)
-rw-r--r-- | source4/build/smb_build/makefile.pm | 53 |
1 files changed, 17 insertions, 36 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 259256b9b5..8191d82408 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -207,21 +207,18 @@ sub SharedLibrary($$) { my ($self,$ctx) = @_; - my $installdir; my $init_obj = ""; - $installdir = $ctx->{DEBUGDIR}; - if ($ctx->{TYPE} eq "LIBRARY") { push (@{$self->{shared_libs}}, "$ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION})); - push (@{$self->{installable_shared_libs}}, "$installdir/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION})); + push (@{$self->{installable_shared_libs}}, "$ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION})); } elsif ($ctx->{TYPE} eq "MODULE") { push (@{$self->{shared_modules}}, "$ctx->{TARGET}"); - push (@{$self->{plugins}}, "$installdir/$ctx->{LIBRARY_REALNAME}"); + push (@{$self->{plugins}}, "$ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME}"); - $self->{install_plugins} .= "\t\@echo Installing $installdir/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{LIBRARY_REALNAME}\n"; + $self->{install_plugins} .= "\t\@echo Installing $ctx->{DEBUGDIR}/$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 $installdir/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{LIBRARY_REALNAME}\n"; + $self->{install_plugins} .= "\t\@cp $ctx->{DEBUGDIR}/$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"; if (defined($ctx->{ALIASES})) { @@ -268,47 +265,31 @@ __EOD__ } my $singlesoarg = ""; - - if ($ctx->{DEBUGDIR} ne $installdir) { - $self->output(<< "__EOD__" -# - -$ctx->{TARGET}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) $init_obj - \@echo Linking \$\@ - \@mkdir -p $ctx->{DEBUGDIR} - \@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \$(LOCAL_LINK_FLAGS) \\ - \$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) $soarg \\ - $init_obj $soargdebug -__EOD__ -); - if (defined($ctx->{ALIASES})) { - foreach (@{$ctx->{ALIASES}}) { - $self->output("\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{DEBUGDIR}/$_.\$(SHLIBEXT)\n"); - } - } - - $self->output("\n"); - } else { - if ($self->{config}->{SONAMEFLAG} ne "" and - defined($ctx->{LIBRARY_SONAME}) and - $ctx->{LIBRARY_REALNAME} ne $ctx->{LIBRARY_SONAME}) { - $singlesoarg = "\n\t\@ln -fs $ctx->{LIBRARY_REALNAME} $installdir/$ctx->{LIBRARY_SONAME}"; - } + if ($self->{config}->{SONAMEFLAG} ne "" and + defined($ctx->{LIBRARY_SONAME}) and + $ctx->{LIBRARY_REALNAME} ne $ctx->{LIBRARY_SONAME}) { + $singlesoarg = "\n\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{DEBUGDIR}/$ctx->{LIBRARY_SONAME}"; } $self->output(<< "__EOD__" # -$installdir/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) $init_obj +$ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) $init_obj \@echo Linking \$\@ - \@mkdir -p $installdir + \@mkdir -p $ctx->{DEBUGDIR} \@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ \$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) $soarg \\ $init_obj $singlesoarg - __EOD__ ); + + if (defined($ctx->{ALIASES})) { + foreach (@{$ctx->{ALIASES}}) { + $self->output("\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{DEBUGDIR}/$_.\$(SHLIBEXT)\n"); + } + } + $self->output("\n"); } sub StaticLibrary($$) |