mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 2.6.14-rc1] Make scripts/namespace.pl work with shared source and object trees
@ 2005-09-18  5:50 Keith Owens
  0 siblings, 0 replies; only message in thread
From: Keith Owens @ 2005-09-18  5:50 UTC (permalink / raw)
  To: linux-kernel

Correct scripts/namespace.pl so it finds the sources when using a
shared source and object tree for the kernel build.  Add more error
checks.  Add a couple more entries to the list of special case, single
input objects.

Signed-off-by: Keith Owens <kaos@ocs.com.au>

Index: linux/scripts/namespace.pl
===================================================================
--- linux.orig/scripts/namespace.pl	2005-09-18 15:07:35.825968745 +1000
+++ linux/scripts/namespace.pl	2005-09-18 15:47:31.329956062 +1000
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 #
-#	namespace.pl.  Mon Aug 30 2004
+#	namespace.pl.  Sun Sep 18 2005
 #
 #	Perform a name space analysis on the linux kernel.
 #
@@ -12,8 +12,7 @@
 #	Tuned for 2.1.x kernels with the new module handling, it will
 #	work with 2.0 kernels as well.
 #
-#	Last change 2.6.9-rc1, adding support for separate source and object
-#	trees.
+#	Last change 2.6.14-rc1.
 #
 #	The source must be compiled/assembled first, the object files
 #	are the primary input to this script.  Incomplete or missing
@@ -68,10 +67,24 @@ use File::Find;
 
 my $nm = "/usr/bin/nm -p";
 my $objdump = "/usr/bin/objdump -s -j .comment";
-my $srctree = "";
-my $objtree = "";
-$srctree = "$ENV{'srctree'}/" if (exists($ENV{'srctree'}));
-$objtree = "$ENV{'objtree'}/" if (exists($ENV{'objtree'}));
+my $pwd = $ENV{'PWD'};
+my $srctree = $pwd . '/';
+my $objtree = $pwd . '/';
+if (exists($ENV{'srctree'})) {
+	chdir($ENV{'srctree'}) || die("cannot chdir($ENV{'srctree'}) (srctree)");
+	$srctree = `pwd`;
+	chomp($srctree);
+	$srctree .= '/';
+	chdir($pwd) || die("cannot chdir($pwd) (original directory)");
+}
+if (exists($ENV{'objtree'})) {
+	chdir($ENV{'objtree'}) || die("cannot chdir($ENV{'objtree'}) (objtree)");
+	$objtree = `pwd`;
+	chomp($objtree);
+	$objtree .= '/';
+	die("No vmlinux in $objtree") if (! -e "vmlinux");
+}
+print("srctree=$srctree objtree=$objtree\n");
 
 if ($#ARGV != -1) {
 	print STDERR "usage: $0 takes no parameters\n";
@@ -118,6 +131,7 @@ sub linux_objects
 		|| m:arch/ia64/lib/__umodsi3.o$:
 		|| m:arch/ia64/scripts/check_gas_for_hint.o$:
 		|| m:arch/ia64/sn/kernel/xp.o$:
+		|| m:arch/ia64/kernel/mca_recovery.o$:
 		|| m:boot/bbootsect.o$:
 		|| m:boot/bsetup.o$:
 		|| m:/bootsect.o$:
@@ -127,6 +141,7 @@ sub linux_objects
 		|| m:drivers/char/drm/tdfx_drv.o$:
 		|| m:drivers/ide/ide-detect.o$:
 		|| m:drivers/ide/pci/idedriver-pci.o$:
+		|| m:drivers/pci/hotplug/pci_hotplug.o$:
 		|| m:drivers/media/media.o$:
 		|| m:drivers/scsi/sd_mod.o$:
 		|| m:drivers/video/video.o$:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-18  5:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-18  5:50 [patch 2.6.14-rc1] Make scripts/namespace.pl work with shared source and object trees Keith Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®