From 91a649cdd80bf1062a03bcbc58715789ae0d3422 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Sun, 14 Jun 2020 19:18:26 -0700 Subject: Try escaping the colon in buildscript BUILD_DIR --- src/Build.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Build.hs b/src/Build.hs index ce1f161..96b58ab 100644 --- a/src/Build.hs +++ b/src/Build.hs @@ -15,6 +15,7 @@ import Data.Char ( isAsciiLower import Data.List ( intercalate , isSuffixOf ) +import Data.List.Utils (replace) import qualified Data.Map as Map import Data.Maybe ( fromMaybe , mapMaybe @@ -385,7 +386,7 @@ buildWithScript script projectDirectory buildDirectory compiler flags libraryNam absoluteLibraryDirectories <- mapM makeAbsolute otherLibraryDirectories setEnv "FC" compiler setEnv "FFLAGS" (intercalate " " flags) - setEnv "BUILD_DIR" absoluteBuildDirectory + setEnv "BUILD_DIR" (escapeColon absoluteBuildDirectory) setEnv "INCLUDE_DIRS" (intercalate " " absoluteLibraryDirectories) let archiveFile = absoluteBuildDirectory "lib" ++ libraryName <.> "a" withCurrentDirectory @@ -401,3 +402,6 @@ isMakefile script | script == "Makefile" = True | script == "makefile" = True | ".mk" `isSuffixOf` script = True | otherwise = False + +escapeColon :: String -> String +escapeColon = replace ":" "\\:" -- cgit v1.2.3