diff options
Diffstat (limited to 'src')
-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 |