aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Setup.hs16
-rw-r--r--pandoc.cabal3
2 files changed, 4 insertions, 15 deletions
diff --git a/Setup.hs b/Setup.hs
index 9d671feae..4a08fdd84 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -10,7 +10,7 @@ import Data.List (isPrefixOf)
main = defaultMainWithHooks myHooks
-myHooks = defaultUserHooks { postConf = myPostConf, postClean = myPostClean }
+myHooks = defaultUserHooks { postConf = myPostConf }
pandocPath = combine "Text" "Pandoc"
@@ -47,20 +47,6 @@ fillDefaultHeadersTemplate = do
return . map (combine "headers") . filter (\x -> takeExtension x == ".header")
fillTemplate files "DefaultHeaders.hs" "DefaultHeaders.hs"
--- Post-clean: remove the files generated from templates.
-myPostClean :: Args -> CleanFlags -> PackageDescription -> Maybe LocalBuildInfo -> IO ()
-myPostClean _ _ _ _ = do
- putStrLn "Removing source files generated from templates:"
- removeGeneratedFile $ joinPath [pandocPath, "ASCIIMathML.hs"]
- removeGeneratedFile $ joinPath [pandocPath, "DefaultHeaders.hs"]
- removeGeneratedFile $ joinPath [pandocPath, "Writers", "S5.hs"]
-
--- Remove file and print message.
-removeGeneratedFile :: FilePath -> IO ()
-removeGeneratedFile fpath = do
- putStrLn $ " " ++ fpath
- removeFile fpath
-
-- Write the filled template file and print an explanatory message.
writeTemplate :: FilePath -> String -> IO ()
writeTemplate outfile contents = do
diff --git a/pandoc.cabal b/pandoc.cabal
index b27fee8ba..f3422a43b 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -54,6 +54,9 @@ Extra-Source-Files: README, INSTALL, COPYRIGHT, COPYRIGHT,
templates/ui/default/opera.css,
templates/ui/default/outline.css,
templates/ui/default/print.css
+Extra-Tmp-Files: Text/Pandoc/ASCIIMathML.hs,
+ Text/Pandoc/DefaultHeaders.hs,
+ Text/Pandoc/Writers/S5.hs
Flag splitBase
Description: Choose the new, smaller, split-up base package.
Default: True