diff --git a/Shake.hs b/Shake.hs index 30b1031b4..3c2745422 100755 --- a/Shake.hs +++ b/Shake.hs @@ -331,15 +331,21 @@ main = do in if "hledger_" `isPrefixOf` h then drop 8 h ++ " format" else h - -- assume all other m4 files in dir are included by this one XXX not true in hledger-lib - deps <- liftIO $ filter (/= src) . filter (".m4.md" `isSuffixOf`) . map (dir ) <$> S.getDirectoryContents dir - need $ [src, commonm4, packagem4] ++ deps + -- assume any other m4 files in dir are included by this one XXX not true in hledger-lib + subfiles <- liftIO $ filter (/= src) . filter (".m4.md" `isSuffixOf`) . map (dir ) <$> S.getDirectoryContents dir + let deps = [src, commonm4, packagem4] ++ subfiles + need deps when (manual=="hledger") $ need commandmds -- add the web page's heading. -- XXX Might be nice to do this atomically with the below, so -- make avoid any double refresh when watch docs with entr/livereload. -- But cmd Shell doesn't handle arguments containing spaces properly. - liftIO $ writeFile out $ "# " ++ heading ++ "\n\n" + liftIO $ writeFile out $ unlines [ + "" + ,"" + ,"# " ++ heading + ,"" + ] cmd Shell "m4 -P -DMAN -DWEB -I" dir commonm4 packagem4 src "|" pandoc fromsrcmd towebmd