doc: update build instructions

This commit is contained in:
Simon Michael 2015-07-13 21:56:39 -07:00
parent b993716222
commit 852c4115fa
3 changed files with 59 additions and 11 deletions

View File

@ -200,6 +200,46 @@ and the default view given by [bugs.hledger.org](http://bugs.hledger.org) exclud
### Set up for development
1. Download and install [stack](https://github.com/commercialhaskell/stack/wiki/Downloads).
This builds haskell projects and can also install GHC (and on windows, git) if needed.
2. Get the hledger repo:
```{.shell .bold}
$ git clone https://github.com/simonmichael/hledger.git
$ cd hledger
```
3. Install optional extra tools (see the Makefile for a list):
```shell
$ stack install shelltestrunner hasktags profiteur
```
4. Run `make` or `stack --help` to see some suggested commands:
```{.shell .bold}
$ make
Makefile:37: -------------------- hledger make rules --------------------
Makefile:39: make [help] -- list documented rules in this makefile. make -n RULE shows more detail.
Makefile:204: (INSTALLING:)
Makefile:206: make install -- download dependencies and install hledger executables to ~/.local/bin or equivalent (with stack)
Makefile:231: (BUILDING:)
Makefile:235: make build -- download dependencies and build hledger executables (with stack)
Makefile:304: make hledgerdev -- quickly build the hledger executable (with ghc and -DDEVELOPMENT)
...
$ stack --help
Available commands:
build Build the project(s) in this directory/configuration
install Build executables and install to a user path
test Build and test the project(s) in this
directory/configuration
bench Build and benchmark the project(s) in this
directory/configuration
...
```
Old instructions:
1. Get [GHC](https://www.haskell.org/ghc/) and [cabal-install](http://hackage.haskell.org/package/cabal-install) installed.
I recommend the [stackage.org install guide](http://www.stackage.org/install).
You can see which GHC versions are officially supported in the `tested-with` field in
@ -235,7 +275,6 @@ and the default view given by [bugs.hledger.org](http://bugs.hledger.org) exclud
6. Install haskell libs required by hledger:
```{.shell .bold}
$ cabal update
$ cd hledger
$ cabal sandbox init # optional
$ make installdeps # or cabal install --only-dep ./hledger-lib ./hledger [./hledger-web]

View File

@ -1,6 +1,6 @@
# Download
## I want to download and run
## I want to download and run a recent release
<!-- <sub>(If the download is out of date or doesn't run on my system, I might troubleshoot or donate to fund improvements)</sub> -->
<table>
@ -70,20 +70,29 @@ Use cabal
</tr>
</table>
## I want to build the [latest release](http://hackage.haskell.org/package/hledger) with [GHC](http://haskell.org/ghc) and [cabal](http://haskell.org/cabal/download.html)
## I want to build the [latest release](http://hackage.haskell.org/package/hledger):
`cabal install alex happy` *(if you don't already have these in your path)*\
`cabal sandbox init; cabal update; cabal install hledger-web` *(use cabal 1.20+)*\
<!-- [cabal install guide](cabal-install.html) -->
Recommended:
Or just cabal install `hledger` if you don't need the web interface.\
The [Installation Guide](installing.html) describes how to install using cabal in more detail.\
1. Download and install [stack](https://github.com/commercialhaskell/stack/wiki/Downloads)
2. `stack --resolver nightly-2015-07-13 install hledger [hledger-web]`
Or:
1. Install [GHC](http://haskell.org/ghc) and [cabal](http://haskell.org/cabal/download.html)
2. `cabal install alex happy` *(if these are not already in your PATH)*
3. `cabal update`
4. `cabal sandbox init`
5. `cabal install hledger[-web]`
The old [Installation Guide](installing.html) has more notes on this process.
[Release Notes](release-notes.html) shows what's new in the hledger packages.
## I want to build the [latest development version](https://github.com/simonmichael/hledger/commits/master)
`cabal install alex happy` (if you don't already have these in your path)\
`git clone https://github.com/simonmichael/hledger; cd hledger; make sandbox install`
1. `git clone https://github.com/simonmichael/hledger.git`
2. `cd hledger`
3. `stack install` (or cabal install as shown above)
## I want to run the Ubuntu hledger packages in a virtual machine

View File

@ -27,7 +27,7 @@ Get a command prompt, and run hledger to check the version. It should be reasona
```shell
$ hledger --version
hledger 0.23
hledger 0.26
```
## BASIC DATA ENTRY & REPORTING