From 100d30c57ffafb06b13d655bce5a09b518f732f1 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Sun, 14 Jun 2020 20:01:44 -0700 Subject: See if removing the drive letter works --- src/Build.hs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/Build.hs') 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 -- cgit v1.2.3