diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-10-08 20:52:56 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-10-08 20:52:56 -0700 |
commit | 627c54011b9492ab60d6080be3316187d13614b5 (patch) | |
tree | 6347f9f51f71b559411508de63fc5bc3579906fa | |
parent | ed061b91c8e3247e1d3b1538eca24687adf0e575 (diff) | |
download | pandoc-627c54011b9492ab60d6080be3316187d13614b5.tar.gz |
Revert "Setup.hs: Better way of handling man page building."
This reverts commit ed061b91c8e3247e1d3b1538eca24687adf0e575.
-rw-r--r-- | Setup.hs | 17 | ||||
-rw-r--r-- | pandoc.cabal | 4 |
2 files changed, 9 insertions, 12 deletions
@@ -4,7 +4,7 @@ import Distribution.Simple import Distribution.Simple.PreProcess import Distribution.Simple.Setup (copyDest, copyVerbosity, fromFlag, installVerbosity, BuildFlags(..)) -import Distribution.PackageDescription (PackageDescription(..), Executable(..), BuildInfo(..)) +import Distribution.PackageDescription (PackageDescription(..), Executable(..)) import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..), absoluteInstallDirs) import Distribution.Verbosity ( Verbosity, silent ) @@ -19,19 +19,18 @@ import System.Exit main :: IO () main = do defaultMainWithHooks $ simpleUserHooks { - buildHook = \pkgdescr -> - (buildHook simpleUserHooks) pkgdescr{ executables = - [x | x <- executables pkgdescr, - exeName x /= "make-pandoc-man-pages"] ++ - [x{ buildInfo = (buildInfo x){ buildable = True } } - | x <- executables pkgdescr, - exeName x == "make-pandoc-man-pages"] } - , postBuild = makeManPages + postBuild = makeManPages , postCopy = \ _ flags pkg lbi -> installManpages pkg lbi (fromFlag $ copyVerbosity flags) (fromFlag $ copyDest flags) , postInst = \ _ flags pkg lbi -> installManpages pkg lbi (fromFlag $ installVerbosity flags) NoCopyDest + , 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"] } , hookedPreProcessors = [ppBlobSuffixHandler] } exitWith ExitSuccess diff --git a/pandoc.cabal b/pandoc.cabal index 71f1b1f62..a18e1cff4 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -361,12 +361,10 @@ Executable pandoc Main-Is: pandoc.hs Buildable: True +-- NOTE: A trick in Setup.hs makes sure this won't be installed: Executable make-pandoc-man-pages Main-Is: make-pandoc-man-pages.hs Hs-Source-Dirs: man - Buildable: False - -- Setup.hs will make this look buildable in build phase, - -- but it won't be copied/installed Build-Depends: pandoc, base >= 4.2 && < 5, directory >= 1 && < 1.3, |