X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDriverMkDepend.hs;h=ffb89c15d96294d11fe899061ca81b9792b832e3;hb=cae75f82226638691cfa1e85fc168f4b65ddce4d;hp=052c138b269c27121032e5717c7d69de9653d661;hpb=95b686571a3dc625b6e331417be24747c8552132;p=ghc-hetmet.git diff --git a/compiler/main/DriverMkDepend.hs b/compiler/main/DriverMkDepend.hs index 052c138..ffb89c1 100644 --- a/compiler/main/DriverMkDepend.hs +++ b/compiler/main/DriverMkDepend.hs @@ -1,3 +1,5 @@ +{-# OPTIONS -fno-cse #-} +-- -fno-cse is needed for GLOBAL_VAR's to behave properly ----------------------------------------------------------------------------- -- @@ -38,7 +40,7 @@ import System.Exit ( ExitCode(..), exitWith ) import System.Directory import System.FilePath import System.IO -import SYSTEM_IO_ERROR ( isEOFError ) +import System.IO.Error ( isEOFError ) import Control.Monad ( when ) import Data.Maybe ( isJust ) @@ -395,17 +397,23 @@ depEndMarker = "# DO NOT DELETE: End of Haskell dependencies" -- for compatibility with the old mkDependHS, we accept options of the form -- -optdep-f -optdep.depend, etc. -dep_opts :: [(String, OptKind IO)] +dep_opts :: [Flag IO] dep_opts = - [ ( "s", SepArg (consIORef v_Dep_suffixes) ) - , ( "f", SepArg (writeIORef v_Dep_makefile) ) - , ( "w", NoArg (writeIORef v_Dep_warnings False) ) - - , ( "-include-prelude", NoArg (writeIORef v_Dep_include_pkg_deps True) ) - -- -include-prelude is the old name for -include-pkg-deps, kept around - -- for backward compatibility, but undocumented - - , ( "-include-pkg-deps", NoArg (writeIORef v_Dep_include_pkg_deps True) ) - , ( "-exclude-module=", Prefix (consIORef v_Dep_exclude_mods . mkModuleName) ) - , ( "x", Prefix (consIORef v_Dep_exclude_mods . mkModuleName) ) + [ Flag "s" (SepArg (consIORef v_Dep_suffixes)) + Supported + , Flag "f" (SepArg (writeIORef v_Dep_makefile)) + Supported + , Flag "w" (NoArg (writeIORef v_Dep_warnings False)) + Supported + + , Flag "-include-prelude" (NoArg (writeIORef v_Dep_include_pkg_deps True)) + (Deprecated "Use --include-pkg-deps instead") + + , Flag "-include-pkg-deps" (NoArg (writeIORef v_Dep_include_pkg_deps True)) + Supported + , Flag "-exclude-module=" (Prefix (consIORef v_Dep_exclude_mods . mkModuleName)) + Supported + , Flag "x" (Prefix (consIORef v_Dep_exclude_mods . mkModuleName)) + Supported ] +