Unverified Commit a93c84f8 authored by Oleg Grenrus's avatar Oleg Grenrus Committed by GitHub
Browse files

Merge pull request #7216 from phadej/remove-outdated-info

Remove outdated sections from READMEs
parents 23ca3cb3 6a182269
......@@ -8,108 +8,6 @@ If you also want the `cabal` command-line program, you need the
[cabal-install]: ../cabal-install/README.md
Installing the Cabal library
============================
If you already have the `cabal` program
---------------------------------------
In this case run:
$ cabal install
However, if you do not have an existing version of the `cabal` program,
you first must install the Cabal library. To avoid this bootstrapping
problem, you can install the Cabal library directly as described below.
Installing as a user (no root or administrator access)
------------------------------------------------------
ghc -threaded --make Setup
./Setup configure --user
./Setup build
./Setup install
Note the use of the `--user` flag at the configure step.
Compiling 'Setup' rather than using `runghc Setup` is much faster and
works on Windows. For all packages other than Cabal itself, it is fine
to use `runghc`.
This will install into `$HOME/.cabal/` on Unix and into
`Documents and Settings\$User\Application Data\cabal\` on Windows.
If you want to install elsewhere, use the `--prefix=` flag at the
configure step.
Installing as root or Administrator
-----------------------------------
ghc -threaded --make Setup
./Setup configure
./Setup build
sudo ./Setup install
Compiling Setup rather than using `runghc Setup` is much faster and
works on Windows. For all packages other than Cabal itself, it is fine
to use `runghc`.
This will install into `/usr/local` on Unix, and on Windows it will
install into `$ProgramFiles/Haskell`. If you want to install elsewhere,
use the `--prefix=` flag at the configure step.
Using older versions of GHC and Cabal
======================================
It is recommended that you leave any pre-existing version of Cabal
installed. In particular, it is *essential* you keep the version that
came with GHC itself, since other installed packages require it (for
instance, the "ghc" API package).
Prior to GHC 6.4.2, however, GHC did not deal particularly well with
having multiple versions of packages installed at once. So if you are
using GHC 6.4.1 or older and you have an older version of Cabal
installed, you should probably remove it by running:
$ ghc-pkg unregister Cabal
or, if you had Cabal installed only for your user account, run:
$ ghc-pkg unregister Cabal --user
The `filepath` dependency
=========================
Cabal uses the [filepath] package, so it must be installed first.
GHC version 6.6.1 and later come with `filepath`, however, earlier
versions do not by default. If you do not already have `filepath`,
you need to install it. You can use any existing version of Cabal to do
that. If you have neither Cabal nor `filepath`, it is slightly
harder but still possible.
Unpack Cabal and `filepath` into separate directories. For example:
tar -xzf filepath-1.1.0.0.tar.gz
tar -xzf Cabal-1.6.0.0.tar.gz
# rename to make the following instructions simpler:
mv filepath-1.1.0.0/ filepath/
mv Cabal-1.6.0.0/ Cabal/
cd Cabal
ghc -i../filepath -cpp --make Setup.hs -o ../filepath/setup
cd ../filepath/
./setup configure --user
./setup build
./setup install
This installs `filepath` so that you can install Cabal with the normal
method.
[filepath]: http://hackage.haskell.org/package/filepath
More information
================
......
......@@ -10,40 +10,32 @@ This Cabal Git repository contains the following packages:
The canonical upstream repository is located at
https://github.com/haskell/cabal.
Installing Cabal (by downloading the binary)
--------------------------------------------
Installing cabal-install (by downloading the binary)
----------------------------------------------------
Prebuilt binary releases can be obtained from https://www.haskell.org/cabal/download.html.
The `cabal-install` binary download for your platform should contain the `cabal` executable.
Installing Cabal (with cabal)
-----------------------------
Installing cabal-install (preferred, with cabal-install)
--------------------------------------------------------
Assuming that you have a pre-existing, older version of `cabal-install`,
run:
Assuming that you have a pre-existing, recent version of `cabal-install`, run:
~~~~
cabal install cabal-install
~~~~
To get the latest version of `cabal-install`. (You may want to `cabal
update` first.)
To get the latest version of `cabal-install`. (You may want to `cabal update` first.)
To install the latest version from the Git repository, clone the
Git repository and then run:
~~~~
(cd Cabal; cabal install)
(cd cabal-install; cabal install)
cabal install --project-file=cabal.project.release cabal-install
~~~~
Installing Cabal (without cabal)
--------------------------------
Installing cabal-install without cabal-install
----------------------------------------------
Assuming you don't have a pre-existing copy of `cabal-install`, run:
~~~~
cabal-install $ ./bootstrap.sh # running ./bootstrap.sh from within in cabal-install folder.
~~~~
For more details, and non-unix like systems, see the [README.md in cabal-install](cabal-install/README.md) and [Contributing Guidelines](CONTRIBUTING.md).
Assuming you don't have a pre-existing copy of `cabal-install`,
look into `bootstrap` directory.
......@@ -11,145 +11,3 @@ dependencies.
[Cabal web site]: http://www.haskell.org/cabal/
[Cabal]: ../Cabal/README.md
Installing the `cabal` command-line tool
========================================
The `cabal-install` package requires a number of other packages, most of
which come with a standard GHC installation. It requires the [network]
package, which is sometimes packaged separately by Linux distributions;
for example, on Debian or Ubuntu, it is located in the
"libghc6-network-dev" package.
`cabal` requires a few other Haskell packages that are not always
installed. The exact list is specified in the [.cabal] file or in the
[bootstrap.sh] file. All these packages are available from [Hackage].
Note that on some Unix systems you may need to install an additional
zlib development package using your system package manager; for example,
on Debian or Ubuntu, it is located in the "zlib1g-dev" package; on
Fedora, it is located in the "zlib-devel" package. It is required
because the Haskell zlib package uses the system zlib C library and
header files.
The `cabal-install` package is now part of the [Haskell Platform], so you
do not usually need to install it separately. However, if you are
starting from a minimal GHC installation, you need to install
`cabal-install` manually. Since it is an ordinary Cabal package,
`cabal-install` can be built the standard way; to facilitate this, the
process has been partially automated. It is described below.
[.cabal]: cabal-install.cabal
[network]: http://hackage.haskell.org/package/network
[Haskell Platform]: http://www.haskell.org/platform/
Quick start on Unix-like systems
--------------------------------
As a convenience for users on Unix-like systems, there is a
[bootstrap.sh] script that will download and install each of
`cabal-install`'s dependencies in turn.
$ ./bootstrap.sh
It will download and install the dependencies. The script will install the
library packages (vanilla, profiling and shared) into `$HOME/.cabal/` and the
`cabal` program into `$HOME/.cabal/bin/`. If you don't want to install profiling
and shared versions of the libraries, use
$ EXTRA_CONFIGURE_OPTS="" ./bootstrap.sh
You then have the choice either to place `$HOME/.cabal/bin` on your
`$PATH` or move the `cabal` program to somewhere on your `$PATH`. Next,
you can get the latest list of packages by running:
$ cabal update
This will also create a default configuration file, if it does not
already exist, at `$HOME/.cabal/config`.
By default, `cabal` will install programs to `$HOME/.cabal/bin`. If you
do not want to add this directory to your `$PATH`, you can change
the setting in the config file; for example, you could use the
following:
installdir: $HOME/bin
Quick start on Windows systems
------------------------------
For Windows users, a precompiled program ([cabal.exe]) is provided.
Download and put it somewhere on your `%PATH%` (for example,
`C:\Program Files\Haskell\bin`.)
Next, you can get the latest list of packages by running:
$ cabal update
This will also create a default configuration file (if it does not
already exist) at
`C:\Documents and Settings\%USERNAME%\Application Data\cabal\config`.
[cabal.exe]: http://www.haskell.org/cabal/release/cabal-install-latest/
Using `cabal`
=============
There are two sets of commands: commands for working with a local
project build tree and those for working with packages distributed
from [Hackage].
For the list of the full set of commands and flags for each command,
run:
$ cabal help
Commands for developers for local build trees
---------------------------------------------
The commands for local project build trees are almost the same as the
`runghc Setup` command-line interface you may already be familiar with.
In particular, it has the following commands:
* `cabal configure`
* `cabal build`
* `cabal haddock`
* `cabal clean`
* `cabal sdist`
The `install` command is somewhat different; it is an all-in-one
operation. If you run `cabal install` in your build tree, it will
configure, build, and install. It takes all the flags that `configure`
takes such as `--global` and `--prefix`.
In addition, `cabal` will download and install any dependencies that are
not already installed. It can also rebuild packages to ensure a
consistent set of dependencies.
Commands for released Hackage packages
--------------------------------------
$ cabal update
This command gets the latest list of packages from the [Hackage] server.
On occasion, this command must be run manually--for instance, if you
want to install a newly released package.
$ cabal install xmonad
This command installs one or more named packages, and all their
dependencies, from Hackage. By default, it installs the latest available
version; however, you may specify exact versions or version ranges. For
example, `cabal install alex-2.2` or `cabal install parsec < 3`.
$ cabal list xml
This does a search of the installed and available packages. It does a
case-insensitive substring match on the package name.
[Hackage]: http://hackage.haskell.org
[bootstrap.sh]: bootstrap.sh
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment