diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -2,23 +2,28 @@ PREFIX=/usr GHCFLAGS=-O2 -Wall GHCMAKE=ghc -odir build -hidir build $(GHCFLAGS) --make -all: git-annex git-annex.1 docs +bins=git-annex git-annex-shell +mans=git-annex.1 git-annex-shell.1 + +all: $(bins) $(mans) docs SysConfig.hs: configure.hs $(GHCMAKE) configure ./configure +$(bins): SysConfig.hs + $(GHCMAKE) $@ + git-annex.1: ./mdwn2man git-annex 1 doc/git-annex.mdwn > git-annex.1 - -git-annex: SysConfig.hs - $(GHCMAKE) git-annex +git-annex-shell.1: + ./mdwn2man git-annex 1 doc/git-annex-shell.mdwn > git-annex-shell.1 install: all install -d $(DESTDIR)$(PREFIX)/bin - install git-annex $(DESTDIR)$(PREFIX)/bin + install $(bins) $(DESTDIR)$(PREFIX)/bin install -d $(DESTDIR)$(PREFIX)/share/man/man1 - install -m 0644 git-annex.1 $(DESTDIR)$(PREFIX)/share/man/man1 + install -m 0644 $(mans) $(DESTDIR)$(PREFIX)/share/man/man1 install -d $(DESTDIR)$(PREFIX)/share/doc/git-annex if [ -d html ]; then \ rsync -a --delete html/ $(DESTDIR)$(PREFIX)/share/doc/git-annex/html/; \ @@ -36,7 +41,7 @@ else IKIWIKI=ikiwiki endif -docs: git-annex.1 +docs: $(mans) $(IKIWIKI) doc html -v --wikiname git-annex --plugin=goodstuff \ --no-usedirs --disable-plugin=openid --plugin=sidebar \ --underlaydir=/dev/null --disable-plugin=shortcut \ @@ -44,7 +49,7 @@ docs: git-annex.1 --exclude='news/.*' clean: - rm -rf build git-annex git-annex.1 test configure SysConfig.hs + rm -rf build $(bins) $(mans) test configure SysConfig.hs rm -rf doc/.ikiwiki html -.PHONY: git-annex test install +.PHONY: $(bins) test install |