X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Futils%2FmkdependHS%2FmkdependHS.prl;fp=ghc%2Futils%2FmkdependHS%2FmkdependHS.prl;h=4919a0a3922a54829684026c6b803133e009c50f;hb=bb1bbea72892d66604f4da929ce84b9ba9ae4fda;hp=37c2a6bcb121f719a09271f99209a403876e6bb4;hpb=d66d409bf68f9562f1eb2884c9a8f6b3903069f4;p=ghc-hetmet.git diff --git a/ghc/utils/mkdependHS/mkdependHS.prl b/ghc/utils/mkdependHS/mkdependHS.prl index 37c2a6b..4919a0a 100644 --- a/ghc/utils/mkdependHS/mkdependHS.prl +++ b/ghc/utils/mkdependHS/mkdependHS.prl @@ -104,6 +104,7 @@ $Makefile = ''; @Src_files = (); $Include_prelude = 0; @Defines = (); +$WarnOddOptions=1; # Delete temp. file if script is halted. sub quit_upon_signal { print STDERR "Deleting $Tmp_prefix.hs .. \n"; unlink "$Tmp_prefix.hs"; } @@ -265,8 +266,10 @@ sub mangle_command_line_args { local($suff) = &grab_arg_arg(*Args,'-s',$1); push(@File_suffix, $suff); } elsif ( /^-/ ) { - print STDERR "$Pgm: unknown option ignored: $_\n"; - $Status++; + if ($WarnOddOptions) { + print STDERR "$Pgm: unknown option ignored: $_\n"; + $Status++; + } } else { push(@Src_files, $_); } @@ -413,6 +416,7 @@ sub slurp_file_for_imports { $options = &check_for_source_options($file_to_read); if ($options ne "") { @Old_Syslibs=@Syslibs; + $WarnOddOptions=0; &mangle_command_line_args(split(/ /,$options)); if (@Old_Syslibs ne @Syslibs) { $found_options=1;