-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
38 lines (29 loc) · 1.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2016, Mattias Bengtsson <[email protected]>
# Copyright 2017, Jonas Ådahl <[email protected]>
USER_INSTALL_PREFIX=$(HOME)/.local
USER_COMPLETION_INSTALL_PATH=$(HOME)/.config/bash_completion.d/
SYSTEM_INSTALL_PREFIX=/usr/local
SYSTEM_COMPLETION_INSTALL_PATH=/etc/bash_completion.d/
COMPLETION=git-wip-completion.bash
DOC_FILES=git-wip.xml git-wip.1
%.xml: %.txt
asciidoc -f asciidoc.conf -d manpage -b docbook -o $@ $<
%.1: %.xml
xmlto man $<
user-install: $(DOC_FILES)
install -D git-wip $(USER_INSTALL_PREFIX)/bin/
install -DT git-wip $(USER_INSTALL_PREFIX)/bin/git-local
install -m 644 -D \
$(COMPLETION) \
$(USER_COMPLETION_INSTALL_PATH)/$(COMPLETION)
install -m 0644 -DT git-wip.1 $(USER_INSTALL_PREFIX)/share/man/man1/git-wip.1
install: $(DOC_FILES)
install -D git-wip $(SYSTEM_INSTALL_PREFIX)/bin/
install -DT git-wip $(SYSTEM_INSTALL_PREFIX)/bin/git-local
install -m 644 -D \
$(COMPLETION) \
$(SYSTEM_COMPLETION_INSTALL_PATH)/$(COMPLETION)
install -m 0644 -D git-wip.1 $(SYSTEM_INSTALL_PREFIX)/share/man/man1/git-wip.1
clean:
rm -f $(DOC_FILES)