@@ -74,7 +74,9 @@ buildMakeActions outputDir filePathMap foreigns usePrefix =
74 getInputTimestamp :: P.ModuleName -> Make (Either P.RebuildPolicy (Maybe UTCTime))
74 getInputTimestamp :: P.ModuleName -> Make (Either P.RebuildPolicy (Maybe UTCTime))
75 getInputTimestamp mn = do
75 getInputTimestamp mn = do
76 let path = fromMaybe (error "Module has no filename in 'make'") $ M.lookup mn filePathMap
76 let path = fromMaybe (error "Module has no filename in 'make'") $ M.lookup mn filePathMap
77− traverseEither getTimestamp path
77+ e1 <- traverseEither getTimestamp path
78+ fPath <- maybe (return Nothing) (getTimestamp . fst) $ M.lookup mn foreigns
79+ return $ fmap (max fPath) e1
79 getOutputTimestamp :: P.ModuleName -> Make (Maybe UTCTime)
81 getOutputTimestamp :: P.ModuleName -> Make (Maybe UTCTime)
80 getOutputTimestamp mn = do
82 getOutputTimestamp mn = do