diff options
author | Brad Richardson <brichardson@structint.com> | 2020-06-14 20:01:44 -0700 |
---|---|---|
committer | Brad Richardson <brichardson@structint.com> | 2020-06-14 20:01:44 -0700 |
commit | 100d30c57ffafb06b13d655bce5a09b518f732f1 (patch) | |
tree | 34f221e89f515572d2025436988c7d77af26a508 | |
parent | ac01e266362251ba6c10443aeacf2e13061e4a05 (diff) | |
download | fpm-100d30c57ffafb06b13d655bce5a09b518f732f1.tar.gz fpm-100d30c57ffafb06b13d655bce5a09b518f732f1.zip |
See if removing the drive letter works
-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 |