summaryrefslogtreecommitdiff
path: root/Setup.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Setup.hs')
-rw-r--r--Setup.hs29
1 files changed, 0 insertions, 29 deletions
diff --git a/Setup.hs b/Setup.hs
index c51c53bb1..9be68f8ce 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -12,7 +12,6 @@ import Data.Maybe ( fromJust, isNothing, catMaybes )
main = defaultMainWithHooks $
simpleUserHooks { runTests = runTestSuite
- , preConf = checkReferenceODT
, postBuild = makeManPages }
-- | Run test suite.
@@ -20,34 +19,6 @@ runTestSuite _ _ _ _ = do
inDirectory "tests" $ runCommand "runhaskell -i.. RunTests.hs" >>= waitForProcess
return ()
--- | If reference.odt needs rebuilding, build it.
-checkReferenceODT _ _ = inDirectory "odt-styles" $ do
- let refodt = "reference.odt"
- let deps = [ "meta.xml", "content.xml", "settings.xml", "META-INF/manifest.xml",
- "Thumbnails/thumbnail.png", "styles.xml", "mimetype" ]
- modifiedDeps <- modifiedDependencies refodt deps
- if null modifiedDeps
- then return ()
- else makeReferenceODT modifiedDeps
- return emptyHookedBuildInfo
-
--- | Create reference.odt by zipping up sources in odt-styles directory.
-makeReferenceODT :: [FilePath] -> IO ()
-makeReferenceODT sources = do
- zipPathMaybe <- findExecutable "zip"
- if isNothing zipPathMaybe
- then error $ "The 'zip' command, which is needed to build reference.odt\n" ++
- "from sources in the odt-styles directory, was not found.\n" ++
- "Try again after installing zip (http://www.info-zip.org/Zip.html).\n" ++
- "Or use the pandoc source tarball, which contains a prebuilt reference.odt."
- else do
- putStrLn "Creating reference.odt:"
- ec <- runProcess (fromJust zipPathMaybe) (["-9", "-r", "reference.odt"] ++ sources)
- Nothing Nothing Nothing Nothing (Just stderr) >>= waitForProcess
- case ec of
- ExitSuccess -> return ()
- _ -> error "Error creating ODT."
-
-- | Build man pages from markdown sources in man/man1/.
makeManPages _ _ _ _ = do
mapM makeManPage ["pandoc.1", "hsmarkdown.1", "html2markdown.1", "markdown2pdf.1"]