[project @ 2002-01-07 22:39:20 by ken]
[ghc-hetmet.git] / glafp-utils / mkdependC / mkdependC.prl
index 26ce208..2bce81e 100644 (file)
@@ -127,8 +127,15 @@ sub mangle_command_line_args {
                push(@Src_files, $_);
            }
 
-       } elsif ($Dashdashes_seen == 1) { # where we ignore unknown options
-           push(@Src_files,$_) if ! /^-/;
+       } elsif ($Dashdashes_seen == 1) {
+           if ( /^-package-name$/ ) {
+               # Skip option argument
+               shift(@ARGV);
+           } elsif ( /^-/ ) {
+               # Ignore unknown option
+           } else {
+               push(@Src_files,$_);
+           }
        }
     }
 }