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 /Setup.hs | |
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
Diffstat (limited to 'Setup.hs')
-rw-r--r-- | Setup.hs | 16 |
1 files changed, 1 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 |