aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonmar <unknown>2004-05-25 10:41:46 +0000
committersimonmar <unknown>2004-05-25 10:41:46 +0000
commit4d29cdfc55ceb564e01f0e00f1bf8a8d8c5d38e6 (patch)
treecff2d97e95ad97592c9948d1538f32c72b83bb5b
parentcf2b9152dfad0a4e40be94a048e62d104e9e6506 (diff)
[haddock @ 2004-05-25 10:41:46 by simonmar]
Complain if -h is used with --gen-index or --gen-contents, because it'll overwrite the new index/contents.
-rw-r--r--src/Main.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 41612ed3..fa128388 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -205,6 +205,10 @@ run flags files = do
writeIORef saved_flags flags
+ when ((Flag_GenIndex `elem` flags || Flag_GenContents `elem` flags)
+ && Flag_Html `elem` flags) $
+ die ("-h cannot be used with --gen-index or --gen-contents")
+
when (Flag_GenContents `elem` flags) $ do
ppHtmlContents odir title maybe_index_url visible_read_ifaces prologue
copyHtmlBits odir libdir css_file