X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=examples%2Fdepmod.pl;h=809dc08b39e85de8b384ccaeddc237262162ac27;hb=778794d1dd99f29d099eb80ae2750381bc5e0059;hp=8c6548d280c8dc9660a22a4e138948cc6f464e18;hpb=4c8a721b45ed1a9bfd83ec87e26a8c60550a15e7;p=oweals%2Fbusybox.git diff --git a/examples/depmod.pl b/examples/depmod.pl index 8c6548d28..809dc08b3 100755 --- a/examples/depmod.pl +++ b/examples/depmod.pl @@ -173,6 +173,9 @@ sub add_mod_deps $depth .= " "; warn "${depth}loading deps of module: $this_module\n" if $verbose; + if (length($depth) > 50) { + die "too much recursion (circular dependencies in modules?)"; + } foreach my $md (keys %{$mod->{$this_module}}) { add_mod_deps ($depth, $mod, $mod2, $module, $md); @@ -196,7 +199,7 @@ if ($stdout == 0) { open(STDOUT, ">$basedir/modules.dep") or die "cannot open $basedir/modules.dep: $!"; } -my $kseries = $basedir =~ m,/2\.6\.[^/]*, ? '2.6' : '2.4'; +my $kseries = $basedir =~ m,/2\.4\.[^/]*, ? '2.4' : 'others'; foreach my $module ( keys %$mod ) { if($kseries eq '2.4') {