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

metze at samba.org metze at samba.org
Fri Apr 20 07:36:22 GMT 2007


Author: metze
Date: 2007-04-20 07:36:21 +0000 (Fri, 20 Apr 2007)
New Revision: 22400

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

Log:
only add srcdir and builddir path if they differ

metze
Modified:
   branches/SAMBA_4_0/source/build/smb_build/cflags.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/cflags.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/cflags.pm	2007-04-20 06:57:07 UTC (rev 22399)
+++ branches/SAMBA_4_0/source/build/smb_build/cflags.pm	2007-04-20 07:36:21 UTC (rev 22400)
@@ -15,6 +15,9 @@
 
 	open(CFLAGS_TXT,">$file") || die ("Can't open `$file'\n");
 
+	my $src_ne_build = 0;
+	$src_ne_build = 1 unless ($srcdir eq $builddir);
+
 	foreach my $key (values %{$CTX}) {
 		next unless defined ($key->{OBJ_LIST});
 
@@ -26,7 +29,7 @@
 		my $cflags = "";
 		foreach my $flag (@{$key->{FINAL_CFLAGS}}) {
 			my $dir;
-			if (($dir) = ($flag =~ /^-I([^\/].*)$/)) {
+			if ($src_ne_build and ($dir) = ($flag =~ /^-I([^\/].*)$/)) {
 				$cflags .= " -I$builddir/$dir";
 				$cflags .= " -I$srcdir/$dir";
 			} else {



More information about the samba-cvs mailing list