diff --git a/utils/GenLibDeps.pl b/utils/GenLibDeps.pl index 33abe5446f5..d5f17962464 100755 --- a/utils/GenLibDeps.pl +++ b/utils/GenLibDeps.pl @@ -9,6 +9,16 @@ # Syntax: GenLibDeps.pl # +# Parse arguments... +while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { + shift; + last if /^--$/; # Stop processing arguments on -- + + # List command line options here... + if (/^-flat$/) { $FLAT = 1; next; } + print "Unknown option: $_ : ignoring!\n"; +} + # Give first option a name. my $Directory = $ARGV[0]; @@ -58,7 +68,11 @@ sub gen_one_entry { my $lib = $_[0]; my $lib_ns = $lib; $lib_ns =~ s/(.*)\.[oa]/$1/; - print "
$lib
\n"; + } } # Make sure we flush on write. This is slower but correct based on the way we @@ -98,7 +120,9 @@ sub gen_one_entry { $| = 1; # Print the definition list tag -print "
\n"; +if (!$FLAT) { + print "
\n"; +} open DOT, "| $DotPath -Tgif > libdeps.gif"; @@ -125,4 +149,6 @@ print DOT "}\n"; close DOT; # Print end tag of definition list element -print "
\n"; +if (!$FLAT) { + print "
\n"; +}