summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile38
1 files changed, 15 insertions, 23 deletions
diff --git a/Makefile b/Makefile
index 0904f6a00..768e0ac78 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,3 @@
-mans=$(shell find doc -maxdepth 1 -name git-annex*.mdwn | sed -e 's/^doc/man/' -e 's/\.mdwn/\.1/')
all=git-annex mans docs
# set to "./Setup" if you lack a cabal program. Or can be set to "stack"
@@ -31,9 +30,6 @@ git-annex: Build/SysConfig.hs
ln -sf dist/build/git-annex/git-annex git-annex; \
fi
-man/%.1: doc/%.mdwn
- ./Build/mdwn2man $@ 1 $< > $@
-
# These are not built normally.
git-union-merge.1: doc/git-union-merge.mdwn
./Build/mdwn2man git-union-merge 1 doc/git-union-merge.mdwn > git-union-merge.1
@@ -42,7 +38,7 @@ git-union-merge:
install-mans: mans
install -d $(DESTDIR)$(PREFIX)/$(SHAREDIR)/man/man1
- install -m 0644 $(mans) $(DESTDIR)$(PREFIX)/$(SHAREDIR)/man/man1
+ install -m 0644 man/*.1 $(DESTDIR)$(PREFIX)/$(SHAREDIR)/man/man1
install-docs: docs install-mans
install -d $(DESTDIR)$(PREFIX)/$(SHAREDIR)/doc/git-annex
@@ -80,25 +76,19 @@ else
IKIWIKI=ikiwiki
endif
-mans: man $(mans)
-
-man:
- mkdir -p man
+mans: Build/Mans
+ ./Build/Mans
docs: mans
- @if [ ! -e doc/index.mdwn ]; then \
- echo "** doc/index.mdwn does not exist, skipping building docs (clone git-annex source to enable full docs build)" >&2; \
- else \
- LC_ALL=C TZ=UTC $(IKIWIKI) doc html -v --wikiname git-annex \
- --plugin=goodstuff \
- --no-usedirs --disable-plugin=openid --plugin=sidebar \
- --underlaydir=/dev/null --set deterministic=1 \
- --disable-plugin=shortcut --disable-plugin=smiley \
- --plugin=comments --set comments_pagespec="*" \
- --exclude='news/.*' --exclude='design/assistant/blog/*' \
- --exclude='bugs/*' --exclude='todo/*' --exclude='forum/*' \
- --exclude='users/*' --exclude='devblog/*' --exclude='thanks'; \
- fi
+ LC_ALL=C TZ=UTC $(IKIWIKI) doc html -v --wikiname git-annex \
+ --plugin=goodstuff \
+ --no-usedirs --disable-plugin=openid --plugin=sidebar \
+ --underlaydir=/dev/null --set deterministic=1 \
+ --disable-plugin=shortcut --disable-plugin=smiley \
+ --plugin=comments --set comments_pagespec="*" \
+ --exclude='news/.*' --exclude='design/assistant/blog/*' \
+ --exclude='bugs/*' --exclude='todo/*' --exclude='forum/*' \
+ --exclude='users/*' --exclude='devblog/*' --exclude='thanks'
clean:
if [ "$(BUILDER)" != ./Setup ] && [ "$(BUILDER)" != cabal ]; then $(BUILDER) clean; fi
@@ -106,7 +96,7 @@ clean:
doc/.ikiwiki html dist tags Build/SysConfig.hs \
Setup Build/InstallDesktopFile Build/EvilSplicer \
Build/Standalone Build/OSXMkLibs Build/LinuxMkLibs \
- Build/DistributionUpdate Build/BuildVersion \
+ Build/DistributionUpdate Build/BuildVersion Build/Mans \
git-union-merge .tasty-rerun-log
find . -name \*.o -exec rm {} \;
find . -name \*.hi -exec rm {} \;
@@ -121,6 +111,8 @@ Build/OSXMkLibs: Build/OSXMkLibs.hs
$(GHC) --make $@ -Wall -fno-warn-tabs
Build/LinuxMkLibs: Build/LinuxMkLibs.hs
$(GHC) --make $@ -Wall -fno-warn-tabs
+Build/Mans: Build/Mans.hs
+ $(GHC) --make $@ -Wall -fno-warn-tabs
# Upload to hackage.
hackage: