Make standalone man-page installation possible

The `cabal install git-annex` doesn't install the man pages, and the
Makefile only installed the man pages as part of a full build/install.
So, I factored out the documentation parts of the Makefile.
This commit is contained in:
Nathan Collins 2012-06-03 15:05:59 -07:00
parent d41c1134cb
commit f5261f60c3
2 changed files with 30 additions and 4 deletions

View file

@ -47,17 +47,21 @@ git-annex-shell.1: doc/git-annex-shell.mdwn
git-union-merge.1: doc/git-union-merge.mdwn
./mdwn2man git-union-merge 1 doc/git-union-merge.mdwn > git-union-merge.1
install: all
install -d $(DESTDIR)$(PREFIX)/bin
install $(bins) $(DESTDIR)$(PREFIX)/bin
ln -sf git-annex $(DESTDIR)$(PREFIX)/bin/git-annex-shell
install-mans: $(mans)
install -d $(DESTDIR)$(PREFIX)/share/man/man1
install -m 0644 $(mans) $(DESTDIR)$(PREFIX)/share/man/man1
install-docs: docs install-mans
install -d $(DESTDIR)$(PREFIX)/share/doc/git-annex
if [ -d html ]; then \
rsync -a --delete html/ $(DESTDIR)$(PREFIX)/share/doc/git-annex/html/; \
fi
install: all install-docs
install -d $(DESTDIR)$(PREFIX)/bin
install $(bins) $(DESTDIR)$(PREFIX)/bin
ln -sf git-annex $(DESTDIR)$(PREFIX)/bin/git-annex-shell
test:
@if ! $(GHCMAKE) -O0 test $(clibs); then \
echo "** failed to build the test suite" >&2; \

View file

@ -20,6 +20,28 @@ As a haskell package, git-annex can be installed using cabal. For example:
The above downloads the latest release. Alternatively, you can [[download]]
it yourself and [[manually_build_with_cabal|install/cabal]].
### Man pages
Cabal does not install the man pages. Do:
cd /tmp
cabal unpack git-annex
cd git-annex*
make install-mans PREFIX=~/.cabal
to install man pages under ~/.cabal/share/man (or $PREFIX/share/man
generally). If ~/.cabal/bin is on your PATH, and you're on a Debian
derivative, you're probably set.
On Debian systems, `manpath` will print the paths searched for manual
pages. The paths searched are inferred from your PATH. Experiments
indicate that, on Ubuntu, D/share/man will be searched for manual
pages whenever D/bin is on your PATH. So, having ~/.cabal/bin on your
PATH is enough to make the above example work. The `man manpath` does
not document this, but see
http://linux.derkeiler.com/Mailing-Lists/Debian/2003-08/0956.html for
some other special cases.
## Installation by hand
To build and use git-annex, you will need: