@@ -74,7 +74,9 @@ buildMakeActions outputDir filePathMap foreigns usePrefix =
7474 getInputTimestamp :: P.ModuleName -> Make (Either P.RebuildPolicy (Maybe UTCTime))
7575 getInputTimestamp mn = do
7676 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
7880
7981 getOutputTimestamp :: P.ModuleName -> Make (Maybe UTCTime)
8082 getOutputTimestamp mn = do