summaryrefslogtreecommitdiff
path: root/Setup.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-08-13 12:20:01 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-08-13 12:20:01 -0700
commit0492ab868ba6881e6fbd943dbeb8daf1087cb1f5 (patch)
tree73b4466ca885e0cfe6c9cfe1ea9a1569de9dfc70 /Setup.hs
parentfc17b3bd410fba5046a385519d603233c9a39285 (diff)
Setup.hs: ensure make-man-pages not installed in bindir.
Diffstat (limited to 'Setup.hs')
-rw-r--r--Setup.hs12
1 files changed, 11 insertions, 1 deletions
diff --git a/Setup.hs b/Setup.hs
index d3a816948..7777a5133 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -18,6 +18,7 @@ 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 )
@@ -25,7 +26,16 @@ 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", \_ _ ->