on master help sign in
Merge pull request #3092 from jfdm/installable-manpages

Fix #1957 Make man page installable.

commit1599242082066b726922d9122f75c7a6a494f9e3 authorJan de Muijnck-Hughes <jfdm@users.noreply.github.com> dateWed 6 Apr 2016, 09:26 (11 years ago) parent7f21388129b7d3
3 files changed+16−7
CHANGELOG.md+5−3 Setup.hs+9−2 idris.cabal+2−2
CHANGELOG.md+5−3
@@ -5,7 +5,7 @@
55* `rewrite` can now be used to rewrite equalities on functions over
66 dependent types
77* `rewrite` can now be given an optional rewriting lemma, with the syntax
8− `rewrite [rule] using [rewrite_lemma] in [scope]`.
8+ `rewrite [rule] using [rewrite_lemma] in [scope]`.
99* Experimental extended `with` syntax, which allows calling functions defined
1010 in a with block directly. For example:
1111
@@ -13,9 +13,9 @@
1313 data SnocList : List a -> Type where
1414 Empty : SnocList []
1515 Snoc : SnocList xs -> SnocList (xs ++ [x])
16−
16+
1717 snocList : (xs : List a) -> SnocList a
18−
18+
1919 my_reverse : List a -> List a
2020 my_reverse xs with (snocList xs)
2121 my_reverse [] | Empty = []
@@ -28,6 +28,8 @@
2828
2929## Miscellaneous updates
3030
31+* The Idris man page is now installed as part of the cabal/stack build process.
32+
3133* Improved startup performance by reducing the processing of an already imported
3234 module that has changed accessibility.
3335
Setup.hs+9−2
@@ -9,7 +9,7 @@ import Distribution.Simple.InstallDirs as I
99import Distribution.Simple.LocalBuildInfo as L
1010import qualified Distribution.Simple.Setup as S
1111import qualified Distribution.Simple.Program as P
12−import Distribution.Simple.Utils (createDirectoryIfMissingVerbose, rewriteFile)
12+import Distribution.Simple.Utils (createDirectoryIfMissingVerbose, rewriteFile, notice, installOrdinaryFiles)
1313import Distribution.Compiler
1414import Distribution.PackageDescription
1515import Distribution.Text
@@ -228,7 +228,7 @@ idrisBuild _ flags _ local = unless (execOnly (configFlags local)) $ do
228228 where
229229 makeBuild dir = make verbosity [ "-C", dir, "build" , "IDRIS=" ++ idrisCmd local]
230230
231− buildRTS = make verbosity (["-C", "rts", "build"] ++
231+ buildRTS = make verbosity (["-C", "rts", "build"] ++
232232 gmpflag (usesGMP (configFlags local)))
233233
234234 gmpflag False = []
@@ -242,6 +242,7 @@ idrisBuild _ flags _ local = unless (execOnly (configFlags local)) $ do
242242idrisInstall verbosity copy pkg local = unless (execOnly (configFlags local)) $ do
243243 installStdLib
244244 installRTS
245+ installManPage
245246 where
246247 target = datadir $ L.absoluteInstallDirs pkg local copy
247248
@@ -254,6 +255,12 @@ idrisInstall verbosity copy pkg local = unless (execOnly (configFlags local)) $
254255 putStrLn $ "Installing run time system in " ++ target'
255256 makeInstall "rts" target'
256257
258+ installManPage = do
259+ let mandest = (mandir $ L.absoluteInstallDirs pkg local copy) ++ "/man1"
260+ notice verbosity $ unwords ["Copying man page to", mandest]
261+ installOrdinaryFiles verbosity mandest [("man", "idris.1")]
262+
263+
257264 makeInstall src target =
258265 make verbosity [ "-C", src, "install" , "TARGET=" ++ target, "IDRIS=" ++ idrisCmd local]
259266
idris.cabal+2−2
@@ -81,7 +81,6 @@ Extra-doc-files:
8181 CONTRIBUTORS
8282 README.md
8383 idris-tutorial.pdf
84− man/idris.1
8584 samples/effects/*.idr
8685 samples/misc/*.idr
8786 samples/misc/*.lidr
@@ -91,7 +90,8 @@ Extra-source-files:
9190 Makefile
9291 config.mk
9392 stack.yaml
94−
93+ man/idris.1
94+
9595 rts/*.c
9696 rts/*.h
9797 rts/arduino/*.c