mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: linux-kernel@vger.kernel.org
Subject: [patch 2.6.14-rc1] Make scripts/namespace.pl work with shared source and object trees
Date: Sun, 18 Sep 2005 15:50:49 +1000	[thread overview]
Message-ID: <21262.1127022649@ocs3.ocs.com.au> (raw)

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$:


                 reply	other threads:[~2005-09-18  5:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21262.1127022649@ocs3.ocs.com.au \
    --to=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®