diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-05-31 13:58:13 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-05-31 13:58:13 -0400 |
commit | 555bd5d6b8f805cf5921bb67466c632c9db005e9 (patch) | |
tree | 09d3f39006e35f0bbeb9c8959470efcef2e7f6f6 /Setup.hs | |
parent | a209897585b11bb93c2d56fab65a3b09e242d341 (diff) |
Remove Makefile from cabal tarball; man page building is now handled by a small haskell program.
This actually runs faster than building the man pages from the makefile
did. But the main purpose is to let Setup.hs import Build.Mans and so not
need the makefile.
Diffstat (limited to 'Setup.hs')
-rw-r--r-- | Setup.hs | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -14,11 +14,13 @@ import Control.Applicative import Control.Monad import System.Directory import Data.List +import Data.Maybe import Control.Exception import qualified System.Info import qualified Build.DesktopFile as DesktopFile import qualified Build.Configure as Configure +import Build.Mans (buildMans) import Utility.SafeCommand main :: IO () @@ -51,13 +53,10 @@ installManpages copyDest verbosity pkg lbi = installOrdinaryFiles verbosity dstManDir =<< srcManpages where dstManDir = mandir (absoluteInstallDirs pkg lbi copyDest) </> "man1" - srcManpages = do - havemans <- boolSystem "make" [Param "mans"] - if havemans - then zip (repeat "man") - . filter (".1" `isSuffixOf`) - <$> getDirectoryContents "man" - else return [] + -- If mdwn2man fails, perhaps because perl is not available, + -- we just skip installing man pages. + srcManpages = zip (repeat "man") . map takeFileName . catMaybes + <$> buildMans installDesktopFile :: CopyDest -> Verbosity -> PackageDescription -> LocalBuildInfo -> IO () installDesktopFile copyDest _verbosity pkg lbi |