diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-07-31 07:44:45 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-07-31 07:44:45 +0000 |
commit | 40e7280a52def5b5079b9f539f479f2bae4f1e60 (patch) | |
tree | 1966cd0b54ccb8a4f9a70acd0f5b7d48aba36b33 | |
parent | 66910eeccdf4a0262130af2380bb1ced89cb7bb4 (diff) | |
download | pandoc-40e7280a52def5b5079b9f539f479f2bae4f1e60.tar.gz |
Simplified Setup.hs by removing PostClean hooks.
Added Extra-Tmp-Files to pandoc.cabal; this does the same thing.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1342 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r-- | Setup.hs | 16 | ||||
-rw-r--r-- | pandoc.cabal | 3 |
2 files changed, 4 insertions, 15 deletions
@@ -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 |