Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile « subtree « contrib - git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 21130af6f665599ff324b918b76023fa91b3f0a9 (plain)
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
39
40
41
42
43
44
45
46
47
48
prefix ?= /usr/local
mandir ?= $(prefix)/share/man
gitdir ?= $(shell git --exec-path)

gitver ?= $(word 3,$(shell git --version))

# this should be set to a 'standard' bsd-type install program
INSTALL ?= install
INSTALL_DATA = $(INSTALL) -c -m 0644
INSTALL_EXE = $(INSTALL) -c -m 0755
INSTALL_DIR = $(INSTALL) -c -d -m 0755

ASCIIDOC_CONF      = ../../Documentation/asciidoc.conf
MANPAGE_NORMAL_XSL =  ../../Documentation/manpage-normal.xsl

default:
	@echo "git-subtree doesn't need to be built."
	@echo "Just copy it somewhere on your PATH, like /usr/local/bin."
	@echo
	@echo "Try: make doc"
	@echo " or: make test"
	@false

install: install-exe install-doc

install-exe: git-subtree.sh
	$(INSTALL_DIR) $(DESTDIR)/$(gitdir)
	$(INSTALL_EXE) $< $(DESTDIR)/$(gitdir)/git-subtree

install-doc: git-subtree.1
	$(INSTALL_DIR) $(DESTDIR)/$(mandir)/man1/
	$(INSTALL_DATA) $< $(DESTDIR)/$(mandir)/man1/

doc: git-subtree.1

%.1: %.xml
	xmlto -m $(MANPAGE_NORMAL_XSL)  man $^

%.xml: %.txt
	asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \
		-agit_version=$(gitver) $^

test:
	./test.sh

clean:
	rm -f *~ *.xml *.html *.1
	rm -rf subproj mainline