git-annex/Makefile

51 lines
1.3 KiB
Makefile
Raw Normal View History

2010-12-11 21:29:50 +00:00
PREFIX=/usr
2010-12-12 17:17:53 +00:00
GHCFLAGS=-O2 -Wall
GHCMAKE=ghc -odir build -hidir build $(GHCFLAGS) --make
2010-10-19 18:39:40 +00:00
all: git-annex git-annex.1 docs
SysConfig.hs: configure.hs
2010-12-11 21:29:50 +00:00
$(GHCMAKE) configure
./configure
git-annex.1:
./mdwn2man git-annex 1 doc/git-annex.mdwn > git-annex.1
git-annex: SysConfig.hs
2010-12-11 21:29:50 +00:00
$(GHCMAKE) git-annex
2010-10-10 04:18:16 +00:00
install: all
2010-12-11 21:29:50 +00:00
install -d $(DESTDIR)$(PREFIX)/bin
install git-annex $(DESTDIR)$(PREFIX)/bin
install -d $(DESTDIR)$(PREFIX)/share/man/man1
install -m 0644 git-annex.1 $(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/; \
fi
2010-10-16 20:41:24 +00:00
2010-12-11 21:37:24 +00:00
test:
$(GHCMAKE) test
./test
2010-10-19 18:39:40 +00:00
# If ikiwiki is available, build static html docs suitable for being
# shipped in the software package.
2010-10-19 18:37:19 +00:00
ifeq ($(shell which ikiwiki),)
IKIWIKI=@echo "** ikiwiki not found, skipping building docs" >&2; true
2010-10-19 18:37:19 +00:00
else
IKIWIKI=ikiwiki
endif
docs: git-annex.1
2010-10-19 18:39:40 +00:00
$(IKIWIKI) doc html -v --wikiname git-annex --plugin=goodstuff \
2010-10-19 23:28:29 +00:00
--no-usedirs --disable-plugin=openid --plugin=sidebar \
2010-10-22 19:12:48 +00:00
--underlaydir=/dev/null --disable-plugin=shortcut \
--disable-plugin=smiley \
--exclude='news/.*'
2010-10-10 04:18:16 +00:00
2010-10-19 19:59:40 +00:00
clean:
rm -rf build git-annex git-annex.1 test configure SysConfig.hs
2010-10-19 19:59:40 +00:00
rm -rf doc/.ikiwiki html
.PHONY: git-annex test install