summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorenami <enami@NetBSD.org>1999-09-25 05:29:27 +0000
committerenami <enami@NetBSD.org>1999-09-25 05:29:27 +0000
commitbb37a5d97f588008de8013e45fd3fc2f41c1d24a (patch)
tree0856948deb8b609a4e85891478a1f2e8a558eadf /gnu/usr.bin
parent152dfd29121ada93ab1258e61414b27d92e78643 (diff)
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 (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/gdb/mkinit.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/gnu/usr.bin/gdb/mkinit.sh b/gnu/usr.bin/gdb/mkinit.sh
index 033af98b45c..baa001f3735 100644
--- a/gnu/usr.bin/gdb/mkinit.sh
+++ b/gnu/usr.bin/gdb/mkinit.sh
@@ -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 @@ echo 'void initialize_all_files () {'
for f
do
- nm -p $f
+ $nm -p $f
done |
sed -e "$sedarg" |
$awk '