# libraries. The output of this script should periodically replace
# the similar content in the UsingLibraries.html document.
#
-# Syntax: GenLibDeps.pl [-flat] <directory_with_libraries_in_it>
+# Syntax: GenLibDeps.pl [-flat] <directory_with_libraries_in_it> [path_to_nm_binary]
#
# Parse arguments...
# Give first option a name.
my $Directory = $ARGV[0];
+my $nmPath = $ARGV[1];
# Find the "dot" program
my $DotPath="";
die "Can't find 'dot'" if (! -x "$DotPath");
}
-chomp(my $nmPath=`which nm`);
-die "Can't find 'nm'" if (! -x "$nmPath");
+if ($nmPath eq "") {
+ chomp($nmPath=`which nm`);
+ die "Can't find 'nm'" if (! -x "$nmPath");
+}
# Open the directory and read its contents, sorting by name and differentiating
# by whether its a library (.a) or an object file (.o)