about summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorTodd Zullinger2010-09-06 09:31:23 -0400
committerLars Hjemli2010-09-19 19:11:45 +0200
commit0c3130de9677ddb0a3e257dba8de4e066ac0db6b (patch)
tree9c4c75a573587ae3d8b243c7fc902047b224cf32 /Makefile
parentGeneralize doc generation (diff)
downloadcgit-0c3130de9677ddb0a3e257dba8de4e066ac0db6b.tar.gz
cgit-0c3130de9677ddb0a3e257dba8de4e066ac0db6b.zip
Add Makefile targets to install/uninstall docs
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile39
1 files changed, 38 insertions, 1 deletions
diff --git a/Makefile b/Makefile index db97ae3..3004e88 100644 --- a/Makefile +++ b/Makefile
@@ -4,6 +4,11 @@ CGIT_SCRIPT_PATH = /var/www/htdocs/cgit
4CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH) 4CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH)
5CGIT_CONFIG = /etc/cgitrc 5CGIT_CONFIG = /etc/cgitrc
6CACHE_ROOT = /var/cache/cgit 6CACHE_ROOT = /var/cache/cgit
7prefix = /usr
8docdir = $(prefix)/share/doc/cgit
9htmldir = $(docdir)
10pdfdir = $(docdir)
11mandir = $(prefix)/share/man
7SHA1_HEADER = <openssl/sha.h> 12SHA1_HEADER = <openssl/sha.h>
8GIT_VER = 1.7.3 13GIT_VER = 1.7.3
9GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 14GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2
@@ -115,7 +120,8 @@ endif
115 120
116 121
117.PHONY: all libgit test install uninstall clean force-version get-git \ 122.PHONY: all libgit test install uninstall clean force-version get-git \
118 doc clean-doc 123 doc clean-doc install-doc install-man install-html install-pdf \
124 uninstall-doc uninstall-man uninstall-html uninstall-pdf
119 125
120all: cgit 126all: cgit
121 127
@@ -170,11 +176,42 @@ install: all
170 $(INSTALL) -m 0644 cgit.css $(DESTDIR)$(CGIT_DATA_PATH)/cgit.css 176 $(INSTALL) -m 0644 cgit.css $(DESTDIR)$(CGIT_DATA_PATH)/cgit.css
171 $(INSTALL) -m 0644 cgit.png $(DESTDIR)$(CGIT_DATA_PATH)/cgit.png 177 $(INSTALL) -m 0644 cgit.png $(DESTDIR)$(CGIT_DATA_PATH)/cgit.png
172 178
179install-doc: install-man install-html install-pdf
180
181install-man: doc-man
182 $(INSTALL) -m 0755 -d $(DESTDIR)$(mandir)/man5
183 $(INSTALL) -m 0644 $(DOC_MAN5) $(DESTDIR)$(mandir)/man5
184
185install-html: doc-html
186 $(INSTALL) -m 0755 -d $(DESTDIR)$(htmldir)
187 $(INSTALL) -m 0644 $(DOC_HTML) $(DESTDIR)$(htmldir)
188
189install-pdf: doc-pdf
190 $(INSTALL) -m 0755 -d $(DESTDIR)$(pdfdir)
191 $(INSTALL) -m 0644 $(DOC_PDF) $(DESTDIR)$(pdfdir)
192
173uninstall: 193uninstall:
174 rm -f $(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) 194 rm -f $(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME)
175 rm -f $(CGIT_DATA_PATH)/cgit.css 195 rm -f $(CGIT_DATA_PATH)/cgit.css
176 rm -f $(CGIT_DATA_PATH)/cgit.png 196 rm -f $(CGIT_DATA_PATH)/cgit.png
177 197
198uninstall-doc: uninstall-man uninstall-html uninstall-pdf
199
200uninstall-man:
201 @for i in $(DOC_MAN5); do \
202 rm -fv $(DESTDIR)$(mandir)/man5/$$i; \
203 done
204
205uninstall-html:
206 @for i in $(DOC_HTML); do \
207 rm -fv $(DESTDIR)$(htmldir)/$$i; \
208 done
209
210uninstall-pdf:
211 @for i in $(DOC_PDF); do \
212 rm -fv $(DESTDIR)$(pdfdir)/$$i; \
213 done
214
178doc: doc-man doc-html doc-pdf 215doc: doc-man doc-html doc-pdf
179doc-man: doc-man5 216doc-man: doc-man5
180doc-man5: $(DOC_MAN5) 217doc-man5: $(DOC_MAN5)