From bb1bbea72892d66604f4da929ce84b9ba9ae4fda Mon Sep 17 00:00:00 2001 From: sof Date: Thu, 28 Oct 1999 08:21:15 +0000 Subject: [PATCH] [project @ 1999-10-28 08:21:15 by sof] Don't warn user of unrecognised options when processing {-# OPTIONS .. #-} pragmas. --- ghc/utils/mkdependHS/mkdependHS.prl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; -- 1.7.10.4