From 92923f59d36726a99f9bb8435805a41ac5ba1388 Mon Sep 17 00:00:00 2001 From: Richardson Date: Mon, 2 Mar 2020 21:01:58 -0800 Subject: Fix for windows --- src/Build.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Build.hs b/src/Build.hs index 813c10e..d4432bb 100644 --- a/src/Build.hs +++ b/src/Build.hs @@ -88,10 +88,11 @@ buildPrograms programDirectory libraryDirectories sourceExtensions buildDirector } $ do buildDirectory "*" <.> "o" %> \objectFile -> do - let - sourceFile = fromMaybe + let realObjectFile = foldl () "" $ splitDirectories objectFile + let sourceFile = fromMaybe undefined - (Map.lookup objectFile sourceFileLookupMap) + (Map.lookup realObjectFile sourceFileLookupMap + ) need [sourceFile] modulesUsed <- liftIO $ getModulesUsed sourceFile let @@ -139,10 +140,10 @@ buildLibrary libraryDirectory sourceExtensions buildDirectory compiler flags lib $ do map (\ext -> buildDirectory "*" <.> ext) ["o", "mod"] &%> \[objectFile, moduleFile] -> do - let - sourceFile = fromMaybe + let realObjectFile = foldl () "" $ splitDirectories objectFile + let sourceFile = fromMaybe undefined - (Map.lookup objectFile sourceFileLookupMap + (Map.lookup realObjectFile sourceFileLookupMap ) need [sourceFile] modulesUsed <- liftIO $ getModulesUsed sourceFile -- cgit v1.2.3