From 9afe07415c4f4c3907da327fabed2ced149e0b66 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 4 Jun 2002 00:44:15 +0000 Subject: Allow multiple Makefiles to be specified --- mkdep.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mkdep.pl') diff --git a/mkdep.pl b/mkdep.pl index 1385d84..45a09ac 100755 --- a/mkdep.pl +++ b/mkdep.pl @@ -130,15 +130,24 @@ sub insert_deps($) { %deps = (); @files = (); @mkfiles = (); +$mkmode = 0; while ( defined($arg = shift(@ARGV)) ) { if ( $arg eq '-m' ) { $arg = shift(@ARGV); push(@mkfiles, $arg); + } elsif ( $arg eq '-M' ) { + $mkmode = 1; # Futher filenames are output Makefile names } elsif ( $arg =~ /^-/ ) { die "Unknown option: $arg\n"; + } elsif ( $arg eq '--' && $mkmode ) { + $mkmode = 0; } else { - push(@files, $arg); + if ( $mkmode ) { + push(@mkfiles, $arg); + } else { + push(@files, $arg); + } } } -- cgit v1.2.3