From 7172dc3b5449b3f098ca2389e3c181d8a8a86802 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Tue, 6 Mar 2001 15:00:32 +0000 Subject: Pick up the environment variable ${NM} if it exists and use that to list symbols. This allows lorder to be used more easily in a cross-build environment. --- usr.bin/lorder/lorder.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.bin') diff --git a/usr.bin/lorder/lorder.sh b/usr.bin/lorder/lorder.sh index a284325fc3dce..7e6de599ba68d 100644 --- a/usr.bin/lorder/lorder.sh +++ b/usr.bin/lorder/lorder.sh @@ -49,6 +49,7 @@ esac # temporary files R=$(mktemp -t _reference_) S=$(mktemp -t _symbol_) +NM=${NM:-nm} # remove temporary files on HUP, INT, QUIT, PIPE, TERM trap "rm -f $R $S; exit 1" 1 2 3 13 15 @@ -63,7 +64,7 @@ done # # if the line has " U " it's a globally undefined symbol, put it into # the reference file. -nm -go $* | sed " +${NM} -go $* | sed " / [TD] / { s/:.* [TD] / / w $S -- cgit v1.3