git.iko.soy/typeable/pandoc
on master help sign in
Revert "Setup.hs: Better way of handling man page building."

This reverts commit ed061b91c8e3247e1d3b1538eca24687adf0e575.

commit627c54011b9492ab60d6080be3316187d13614b5 authorJohn MacFarlane <fiddlosopher@gmail.com> dateTue 8 Oct 2013, 20:52 (13 years ago) parented061b9
2 files changed+9−12
Setup.hs+8−9 pandoc.cabal+1−3
Setup.hs+8−9
@@ -4,7 +4,7 @@ import Distribution.Simple
44import Distribution.Simple.PreProcess
55import Distribution.Simple.Setup
66 (copyDest, copyVerbosity, fromFlag, installVerbosity, BuildFlags(..))
7−import Distribution.PackageDescription (PackageDescription(..), Executable(..), BuildInfo(..))
7+import Distribution.PackageDescription (PackageDescription(..), Executable(..))
88import Distribution.Simple.LocalBuildInfo
99 (LocalBuildInfo(..), absoluteInstallDirs)
1010import Distribution.Verbosity ( Verbosity, silent )
@@ -19,19 +19,18 @@ import System.Exit
1919main :: IO ()
2020main = do
2121 defaultMainWithHooks $ simpleUserHooks {
22− buildHook = \pkgdescr ->
23− (buildHook simpleUserHooks) pkgdescr{ executables =
24− [x | x <- executables pkgdescr,
25− exeName x /= "make-pandoc-man-pages"] ++
26− [x{ buildInfo = (buildInfo x){ buildable = True } }
27− | x <- executables pkgdescr,
28− exeName x == "make-pandoc-man-pages"] }
29− , postBuild = makeManPages
22+ postBuild = makeManPages
3023 , postCopy = \ _ flags pkg lbi ->
3124 installManpages pkg lbi (fromFlag $ copyVerbosity flags)
3225 (fromFlag $ copyDest flags)
3326 , postInst = \ _ flags pkg lbi ->
3427 installManpages pkg lbi (fromFlag $ installVerbosity flags) NoCopyDest
28+ , copyHook = \pkgdescr ->
29+ (copyHook simpleUserHooks) pkgdescr{ executables =
30+ [x | x <- executables pkgdescr, exeName x /= "make-pandoc-man-pages"] }
31+ , instHook = \pkgdescr ->
32+ (instHook simpleUserHooks) pkgdescr{ executables =
33+ [x | x <- executables pkgdescr, exeName x /= "make-pandoc-man-pages"] }
3534 , hookedPreProcessors = [ppBlobSuffixHandler]
3635 }
3736 exitWith ExitSuccess
pandoc.cabal+1−3
@@ -361,12 +361,10 @@ Executable pandoc
361361 Main-Is: pandoc.hs
362362 Buildable: True
363363
364+-- NOTE: A trick in Setup.hs makes sure this won't be installed:
364365Executable make-pandoc-man-pages
365366 Main-Is: make-pandoc-man-pages.hs
366367 Hs-Source-Dirs: man
367− Buildable: False
368− -- Setup.hs will make this look buildable in build phase,
369− -- but it won't be copied/installed
370368 Build-Depends: pandoc,
371369 base >= 4.2 && < 5,
372370 directory >= 1 && < 1.3,