summaryrefslogtreecommitdiffabout
path: root/Makefile
authorLars Hjemli <hjemli@gmail.com>2009-02-12 09:53:31 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2009-02-12 09:53:31 (UTC)
commit5e57cb24fca398b1a8cbceb84d9e9649785459d2 (patch) (side-by-side diff)
treee841badd3abc7e6b444001bd39279419fbb3aaa8 /Makefile
parent6d2067aed3a68c692555e97a20f2998afeefab69 (diff)
downloadcgit-5e57cb24fca398b1a8cbceb84d9e9649785459d2.zip
cgit-5e57cb24fca398b1a8cbceb84d9e9649785459d2.tar.gz
cgit-5e57cb24fca398b1a8cbceb84d9e9649785459d2.tar.bz2
Makefile: add doc-related targets
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'Makefile') (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile19
1 files changed, 17 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0f0089a..056d516 100644
--- a/Makefile
+++ b/Makefile
@@ -97,13 +97,14 @@ OBJECTS += ui-tree.o
ifdef NEEDS_LIBICONV
EXTLIBS += -liconv
endif
-.PHONY: all libgit test install uninstall clean force-version get-git
+.PHONY: all libgit test install uninstall clean force-version get-git \
+ doc man-doc html-doc clean-doc
all: cgit
VERSION: force-version
@./gen-version.sh "$(CGIT_VERSION)"
-include VERSION
@@ -146,11 +147,25 @@ install: all
uninstall:
rm -f $(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME)
rm -f $(CGIT_DATA_PATH)/cgit.css
rm -f $(CGIT_DATA_PATH)/cgit.png
-clean:
+doc: man-doc html-doc pdf-doc
+
+man-doc: cgitrc.5.txt
+ a2x -f manpage cgitrc.5.txt
+
+html-doc: cgitrc.5.txt
+ a2x -f xhtml --stylesheet=cgit-doc.css cgitrc.5.txt
+
+pdf-doc: cgitrc.5.txt
+ a2x -f pdf cgitrc.5.txt
+
+clean: clean-doc
rm -f cgit VERSION *.o *.d
+clean-doc:
+ rm -f cgitrc.5 cgitrc.5.xhtml cgitrc.5.pdf
+
get-git:
curl $(GIT_URL) | tar -xj && rm -rf git && mv git-$(GIT_VER) git