diff mbox

[1/4] Fix wrong source path in scripts/namespace.pl

Message ID 1285828138-5873-1-git-send-email-amwang@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Amerigo Wang Sept. 30, 2010, 6:28 a.m. UTC
None
diff mbox

Patch

diff --git a/scripts/namespace.pl b/scripts/namespace.pl
index 361d0f7..fb4e245 100755
--- a/scripts/namespace.pl
+++ b/scripts/namespace.pl
@@ -167,11 +167,11 @@  sub do_nm
 		printf STDERR "$fullname is not an object file\n";
 		return;
 	}
-	($source = $fullname) =~ s/\.o$//;
-	if (-e "$objtree$source.c" || -e "$objtree$source.S") {
-		$source = "$objtree$source";
+	($source = $basename) =~ s/\.o$//;
+	if (-e "$source.c" || -e "$source.S") {
+		$source = "$objtree$File::Find::dir/$source";
 	} else {
-		$source = "$srctree$source";
+		$source = "$srctree$File::Find::dir/$source";
 	}
 	if (! -e "$source.c" && ! -e "$source.S") {
 		# No obvious source, exclude the object if it is conglomerate