eval '(exit $?0)' && eval '[ -f /usr/local/bin/perl ] && exec /usr/local/bin/perl -S $0 ${1+"$@"}; exec perl -S $0 ${1+"$@"};'
& eval 'if ( -f /usr/local/bin/perl ) exec /usr/local/bin/perl -S $0 $argv:q ; exec perl -S $0 $argv:q'
     if 0;

#  Gerald Pani

#
#  makedepend.pl
#
# $Id: makedepend.pl,v 1.2 1995/11/28 17:12:18 root Exp $
#

@args1 = ();
while (@ARGV) {
    $_ = shift(@ARGV);
    /^-s$/ && ($sstring = shift(@ARGV),next);
    /^--$/ && (last);
    push(@args1, $_);
}

@args2 = ();
while (@ARGV) {
    $_ = shift(@ARGV);
    /^--$/ && (last);
    push(@args2, $_);
}

$sstring = '# DO NOT DELETE THIS LINE -- make depend depends on it' unless $sstring;

if (@ARGV) {
  $src = shift(@ARGV);
  $comm = join(' ', 'makedepend', @args1, '-s', "\"$sstring\"", '--', @args2, '--', $src);
  system($comm);
}

$cnt = 1;
while (@ARGV) {
  $s = $sstring . $cnt;
  $cnt++;
  $src = shift(@ARGV);
  $comm = join( ' ', 'makedepend', @args1, '-s', "\"$s\"", '--', @args2, '--', $src);
  system($comm);
}

exit(0);
  
