Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/usr.bin/gdb Use the value of environment variable NM as ...



details:   https://anonhg.NetBSD.org/src/rev/7e1adf785849
branches:  trunk
changeset: 476693:7e1adf785849
user:      enami <enami%NetBSD.org@localhost>
date:      Sat Sep 25 05:29:27 1999 +0000

description:
Use the value of environment variable NM as a name of nm command.
This makes us gdb built on cross compile environment.  (part of PR#8369).

diffstat:

 gnu/usr.bin/gdb/mkinit.sh |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r b91da65d6937 -r 7e1adf785849 gnu/usr.bin/gdb/mkinit.sh
--- a/gnu/usr.bin/gdb/mkinit.sh Sat Sep 25 05:27:42 1999 +0000
+++ b/gnu/usr.bin/gdb/mkinit.sh Sat Sep 25 05:29:27 1999 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: mkinit.sh,v 1.1.1.1 1997/09/26 04:37:02 gwr Exp $
+# $NetBSD: mkinit.sh,v 1.2 1999/09/25 05:29:27 enami Exp $
 #
 # Generate the init.c file on stdout.
 # Arguments are names of *.o files.
@@ -12,8 +12,12 @@
 # Which awk do we use? (awk,gawk,nawk?)
 awk=${AWK:-awk}
 
+# $NM may be a name of nm command for cross compilation.  The default
+# value here is a default when you invoke this script manually.
+nm=${NM:-nm}
+
 # Does the compiler prepend an underscore?
-if (nm version.o |grep -q ' _version')
+if ($nm version.o |grep -q ' _version')
 then
  sedarg='s/ _/ /'
 else
@@ -27,7 +31,7 @@
 
 for f
 do
-  nm -p $f
+  $nm -p $f
 done |
 sed -e "$sedarg" |
 $awk '



Home | Main Index | Thread Index | Old Index