From f5261f60c3d4462088768959014189a3aa61ff30 Mon Sep 17 00:00:00 2001 From: Nathan Collins Date: Sun, 3 Jun 2012 15:05:59 -0700 Subject: [PATCH] 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. --- Makefile | 12 ++++++++---- doc/install.mdwn | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 94dc05a819..26367aa46d 100644 --- a/Makefile +++ b/Makefile @@ -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; \ diff --git a/doc/install.mdwn b/doc/install.mdwn index fe0522aa05..1f4b54f542 100644 --- a/doc/install.mdwn +++ b/doc/install.mdwn @@ -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: