diff options
author | H. Peter Anvin <hpa@zytor.com> | 2002-06-04 00:44:15 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2002-06-04 00:44:15 +0000 |
commit | 9afe07415c4f4c3907da327fabed2ced149e0b66 (patch) | |
tree | 15b4fc2a88f6844d1b9bd93ace6965f3f3d81b32 /mkdep.pl | |
parent | 6ebdada0bdb82f26cda01d1214ee6f9bbf62ffdc (diff) | |
download | nasm-9afe07415c4f4c3907da327fabed2ced149e0b66.tar.gz nasm-9afe07415c4f4c3907da327fabed2ced149e0b66.tar.bz2 nasm-9afe07415c4f4c3907da327fabed2ced149e0b66.zip |
Allow multiple Makefiles to be specified
Diffstat (limited to 'mkdep.pl')
-rwxr-xr-x | mkdep.pl | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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); + } } } |