svn commit: samba r19509 - in branches/SAMBA_4_0/source/build/smb_build: .

jelmer at samba.org jelmer at samba.org
Sun Oct 29 23:50:34 GMT 2006


Author: jelmer
Date: 2006-10-29 23:50:32 +0000 (Sun, 29 Oct 2006)
New Revision: 19509

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19509

Log:
Simplify buildsystem code, create proper symlinks for aliases.

Modified:
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2006-10-29 22:48:43 UTC (rev 19508)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2006-10-29 23:50:32 UTC (rev 19509)
@@ -207,21 +207,18 @@
 {
 	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 @@
 	}
 
 	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($$)



More information about the samba-cvs mailing list