diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Build.hs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Build.hs b/src/Build.hs index ce1f161..7646ed6 100644 --- a/src/Build.hs +++ b/src/Build.hs @@ -385,9 +385,9 @@ buildWithScript script projectDirectory buildDirectory compiler flags libraryNam absoluteLibraryDirectories <- mapM makeAbsolute otherLibraryDirectories setEnv "FC" compiler setEnv "FFLAGS" (intercalate " " flags) - setEnv "BUILD_DIR" absoluteBuildDirectory - setEnv "INCLUDE_DIRS" (intercalate " " absoluteLibraryDirectories) - let archiveFile = absoluteBuildDirectory </> "lib" ++ libraryName <.> "a" + setEnv "BUILD_DIR" $ removeDriveLetter absoluteBuildDirectory + setEnv "INCLUDE_DIRS" (intercalate " " (map removeDriveLetter absoluteLibraryDirectories)) + let archiveFile = (removeDriveLetter absoluteBuildDirectory) </> "lib" ++ libraryName <.> "a" withCurrentDirectory projectDirectory if @@ -401,3 +401,8 @@ isMakefile script | script == "Makefile" = True | script == "makefile" = True | ".mk" `isSuffixOf` script = True | otherwise = False + +removeDriveLetter :: String -> String +removeDriveLetter path + | ':' `elem` path = (tail . dropWhile (/= ':')) path + | otherwise = path |