There were several glaring inconsistencies in Idris' paths for system installation. For example, one could override Idris' default data directory, but the system would ignore this for some paths.
This commit makes data directory and sub directory access consistent.
+ Default location is `<getDataDir>/docs`.
+ Flag `--info` has been updated to show doc location.
+ New flag `--installdoc <ipkg>` provided to install documentation
+ New flag `--docdir` provided to show documentation installation location.
+ New environment variable `IDRIS_DOC_PATH` to allow alternate means of customisation.
+ Installation for Idris' std libraries has been augmented to install library documentation as well.
- A test hook in `Setup.hs` allows using the new test infrastructure with
`cabal test`. Without it, cabal couldn't find the idris libraries.
- Make rules related to testing now call `cabal test`.
- The `test_timed` rule is removed because timings are given by default
- We introduce the `test_update` rule to update the golden files
- We introduce the `test_clean` rule to remove artifacts created when
running the test suite. This is far from perfect ;
a careful `git clean -f` should remove whatever is left
- The TEST-JOBS variable specifies the number of parallel jobs to
the test program. By default, it relies on the Haskell RTS to find an
optimal number. Set to 1 to disable parallelism.
- The TEST-ARGS variable can be used to pass arguments to the test
program.
- Travis CI uses the new infrasctructure. It uses `travis_wait`
to prevent timeouts because cabal only prints the output when
the test suite is done running.
Idris comes with a man page, this commit uses cabal (or stack) to
install it to an appropriate place. Once installed you may need to
add the location to `$MANPATH` if you haven't done so already.
Because Cabal doesn't resolve unset flags using their defaults, we have to keep
the usesFoo functions in sync with idris.cabal. Somewhere along the line GMP got
switched from default on to default off. This patch brings Setup.hs into sync.
Before this, the C files would get -DIDRIS_GMP set even when the flag was off.
Currently, build-depends are not expected to be ready at the time Setup.hs
is run. This may change in a future version of Cabal; meanwhile, removing
these unused imports fixes failures at `cabal copy` time on OS X.
Control.Exception.catch clashes with Prelude.catch on older versions of base.
Newer versions of base don’t have Prelude.catch, so it’s probably not possible
to import Prelude hiding (catch) .
A new Cabal flag `release` is added, and is off by default.
When the flag is on, version strings show the version from
idris.cabal. When the flag is off, version strings are given a
prerelease suffix. If the build system can determine the short Git hash
for HEAD, then this is the suffix. If it cannot, then the suffix is a
generic "-PRE" suffix.
This removes the last common obstacle to getting Idris built, at the
expense of using mini-gmp which is supposedly slower (but I haven't yet
measured how much this is likely to affect us).
* Refactored the Setup.hs script into a much simpler layout.
* Simplified the idris.cabal file, alphabetizing the modules,
build dependencies, simplifying the indentation, standardizing the
flags, and normalizing the formatting of lists.
* Fixed a bug in the generation of the executable_pom.xml file for
the Java backend.
Apparently Cabal normalizes the flags to lower case, and the
lookup for "LLVM" does nothing. Commit
2972b75a18 isn't wrong, but the problem
is that it ever gets to the Nothing case. The flag should always
be there.