X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FFilePath.hs;h=dba6b0fddd618ba1521a77aa74c19df66a5f996e;hb=2b7edca7f9f50651237f4a0f246cb986ddcabc27;hp=b27dd4f70a95dc76f92169cdb8393704fc30d05b;hpb=58d14b870a51520feb2269f8529904d3e8d09ecf;p=ghc-base.git diff --git a/System/FilePath.hs b/System/FilePath.hs index b27dd4f..dba6b0f 100644 --- a/System/FilePath.hs +++ b/System/FilePath.hs @@ -36,6 +36,11 @@ module System.FilePath , isPathSeparator , pathSeparator , searchPathSeparator + + -- * Filename extensions + , exeExtension + , objExtension + , dllExtension ) where import Prelude -- necessary to get dependencies right @@ -378,3 +383,27 @@ searchPathSeparator = ';' #else searchPathSeparator = ':' #endif + +-- ToDo: This should be determined via autoconf (AC_EXEEXT) +-- | Extension for executable files +-- (typically @""@ on Unix and @".exe"@ on Windows or OS/2) +exeExtension :: String + +-- ToDo: This should be determined via autoconf (AC_OBJEXT) +-- | Extension for object files +-- (typically @".o"@ on Unix and @".obj"@ on Windows) +objExtension :: String + +-- | Extension for dynamically linked (or shared) libraries +-- (typically @".so"@ on Unix and @".dll"@ on Windows) +dllExtension :: String + +#ifdef mingw32_TARGET_OS +exeExtension = ".exe" +objExtension = ".obj" +dllExtension = ".dll" +#else +exeExtension = "" +objExtension = ".o" +dllExtension = ".so" +#endif