Skip to content

Commit

Permalink
Setup.hs: ensure make-man-pages not installed in bindir.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Aug 13, 2014
1 parent fc17b3b commit 0492ab8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Setup.hs
Expand Up @@ -18,14 +18,24 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

import Distribution.Simple
import Distribution.Simple.PreProcess
import Distribution.PackageDescription (PackageDescription(..), Executable(..))
import System.Process ( rawSystem )
import System.FilePath ( (</>) )
import System.Directory ( findExecutable )
import Distribution.Simple.Utils (info)

main :: IO ()
main = defaultMainWithHooks $ simpleUserHooks {
hookedPreProcessors = [ppBlobSuffixHandler] }
-- enable hsb2hs preprocessor for .hsb files
hookedPreProcessors = [ppBlobSuffixHandler]
-- ensure that make-pandoc-man-pages doesn't get installed to bindir
, copyHook = \pkgdescr ->
(copyHook simpleUserHooks) pkgdescr{ executables =
[x | x <- executables pkgdescr, exeName x /= "make-pandoc-man-pages"] }
, instHook = \pkgdescr ->
(instHook simpleUserHooks) pkgdescr{ executables =
[x | x <- executables pkgdescr, exeName x /= "make-pandoc-man-pages"] }
}

ppBlobSuffixHandler :: PPSuffixHandler
ppBlobSuffixHandler = ("hsb", \_ _ ->
Expand Down

0 comments on commit 0492ab8

Please sign in to comment.