diff options
author | Richardson <BRichardson@structint.com> | 2020-03-02 21:01:58 -0800 |
---|---|---|
committer | Richardson <BRichardson@structint.com> | 2020-03-02 21:01:58 -0800 |
commit | 92923f59d36726a99f9bb8435805a41ac5ba1388 (patch) | |
tree | 28ffeac4b0968334f3025534ee2105bf6ec47078 | |
parent | 12020ca91a0adf04c9ba4675e0126f042da4c121 (diff) | |
download | fpm-92923f59d36726a99f9bb8435805a41ac5ba1388.tar.gz fpm-92923f59d36726a99f9bb8435805a41ac5ba1388.zip |
Fix for windows
-rw-r--r-- | src/Build.hs | 13 |
1 files changed, 7 insertions, 6 deletions
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 |