diff --git a/mozilla/tools/module-deps/module-graph.pl b/mozilla/tools/module-deps/module-graph.pl index 60e48589479..9eb36c9a85f 100755 --- a/mozilla/tools/module-deps/module-graph.pl +++ b/mozilla/tools/module-deps/module-graph.pl @@ -3,9 +3,16 @@ # Todo: # - eliminate arcs implied by transitive dependancies # (i.e. in a -> b -> c; a->c;, eliminate a->c; +# (discovered that "tred" will do this, but isn't super-helpful) # - group together strongly-connected components, where strongly connected # means there exists a cycle, and all dependancies off the cycle. +if ($^O eq "linux") { + $makecommand = "make"; +} elsif ($^O eq "MSWin32") { + $makecommand = "nmake /nologo /f makefile.win"; +} + use Cwd; $curdir = getcwd(); if (!@ARGV) { @@ -26,7 +33,7 @@ while ($#dirs != -1) { chdir "$curdir"; $current_dirs = ""; - open(MAKEOUT, "nmake /nologo /f makefile.win echo-dirs echo-module echo-requires|") || die "Can't make: $!\n"; + open(MAKEOUT, "$makecommand echo-dirs echo-module echo-requires|") || die "Can't make: $!\n"; $current_dirs = ; $current_dirs && chop $current_dirs; $current_module = ; $current_module && chop $current_module;