@@ -18,6 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1818
1919import Distribution.Simple
2020import Distribution.Simple.PreProcess
21+import Distribution.PackageDescription (PackageDescription(..), Executable(..))
2122import System.Process ( rawSystem )
2223import System.FilePath ( (</>) )
2324import System.Directory ( findExecutable )
@@ -25,7 +26,16 @@ import Distribution.Simple.Utils (info)
2526
2627main :: IO ()
2728main = defaultMainWithHooks $ simpleUserHooks {
28− hookedPreProcessors = [ppBlobSuffixHandler] }
29+ -- enable hsb2hs preprocessor for .hsb files
30+ hookedPreProcessors = [ppBlobSuffixHandler]
31+ -- ensure that make-pandoc-man-pages doesn't get installed to bindir
32+ , copyHook = \pkgdescr ->
33+ (copyHook simpleUserHooks) pkgdescr{ executables =
34+ [x | x <- executables pkgdescr, exeName x /= "make-pandoc-man-pages"] }
35+ , instHook = \pkgdescr ->
36+ (instHook simpleUserHooks) pkgdescr{ executables =
37+ [x | x <- executables pkgdescr, exeName x /= "make-pandoc-man-pages"] }
38+ }
2939
3040ppBlobSuffixHandler :: PPSuffixHandler
3141ppBlobSuffixHandler = ("hsb", \_ _ ->