aboutsummaryrefslogtreecommitdiff
path: root/src/Build.hs
diff options
context:
space:
mode:
authorRichardson <BRichardson@structint.com>2020-03-02 21:01:58 -0800
committerRichardson <BRichardson@structint.com>2020-03-02 21:01:58 -0800
commit92923f59d36726a99f9bb8435805a41ac5ba1388 (patch)
tree28ffeac4b0968334f3025534ee2105bf6ec47078 /src/Build.hs
parent12020ca91a0adf04c9ba4675e0126f042da4c121 (diff)
downloadfpm-92923f59d36726a99f9bb8435805a41ac5ba1388.tar.gz
fpm-92923f59d36726a99f9bb8435805a41ac5ba1388.zip
Fix for windows
Diffstat (limited to 'src/Build.hs')
-rw-r--r--src/Build.hs13
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