Repository navigation
Expand file tree
/
Copy pathmakefile.locale
More file actions
81 lines (61 loc) · 2.92 KB
/
Copy pathmakefile.locale
File metadata and controls
81 lines (61 loc) · 2.92 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
vpath GIT-VERSION-FILE . ..
MAN1_SOURCE = $(wildcard git-*.adoc)
MAN1_SOURCE += $(wildcard git.adoc*)
MAN7_SOURCE = $(wildcard gitglossary.adoc*)
MAN_FILTER = $(MAN1_SOURCE) $(MAN7_SOURCE)
HTML_FILTER = $(patsubst %.adoc,%.html,$(MAN_FILTER))
-include make-deps.mk
ifndef V
QUIET_ASCIIDOC = @echo ' ' ASCIIDOC $(lang) $@;
QUIET_ASCIIDOC_ERR = 2>/dev/null
endif
-include ../GIT-VERSION-FILE
ASCIIDOC_EXTRA = -d manpage -I.. -I. -rasciidoctor-extensions
ASCIIDOC_EXTRA += -amanmanual='Git Manual' \
-amansource='Git $(GIT_VERSION)' \
-amanversion=$(GIT_VERSION)
ASCIIDOC_EXTRA += -alitdd='\--'
ASCIIDOC_EXTRA += -acompat-mode -atabsize=8 -abuild_dir=.
$(HTML_FILTER): %.html: %.adoc ../GIT-VERSION-FILE ../asciidoctor-extensions.rb ../makefile.locale
$(QUIET_ASCIIDOC)asciidoctor -b xhtml5 \
$(ASCIIDOC_EXTRA) $< $(QUIET_ASCIIDOC_ERR)
MAN1_PAGES=$(patsubst %.adoc,%.1,$(MAN1_SOURCE))
MAN5_PAGES=$(patsubst %.adoc,%.5,$(MAN5_SOURCE))
MAN7_PAGES=$(patsubst %.adoc,%.7,$(MAN7_SOURCE))
MANPAGES=$(MAN1_PAGES) $(MAN5_PAGES) $(MAN7_PAGES)
$(MAN1_PAGES): %.1: %.adoc ../GIT-VERSION-FILE ../asciidoctor-extensions.rb ../makefile.locale
$(QUIET_ASCIIDOC)asciidoctor -b manpage -o $@ \
$(ASCIIDOC_EXTRA) -amanvolnum=1 $< $(QUIET_ASCIIDOC_ERR)
$(MAN5_PAGES): %.5: %.adoc ../GIT-VERSION-FILE ../asciidoctor-extensions.rb ../makefile.locale
$(QUIET_ASCIIDOC)asciidoctor -b manpage -o $@ \
$(ASCIIDOC_EXTRA) -amanvolnum=5 $< $(QUIET_ASCIIDOC_ERR)
$(MAN7_PAGES): %.7: %.adoc ../GIT-VERSION-FILE ../asciidoctor-extensions.rb ../makefile.locale
$(QUIET_ASCIIDOC)asciidoctor -b manpage -o $@ \
$(ASCIIDOC_EXTRA) -amanvolnum=7 $< $(QUIET_ASCIIDOC_ERR)
man: $(MANPAGES)
html: $(HTML_FILTER)
all doc-l10n: man html
install-translated:
@ echo INSTALL $(lang) adoc files
@install -d -m 755 $(prefix)/$(lang)
@[ -n "$$(ls *.adoc 2>/dev/null)" ] && install *.adoc -m 644 $(prefix)/$(lang) || true
@install -d -m 755 $(prefix)/$(lang)/includes
@[ -n "$$(ls includes/*.adoc 2>/dev/null)" ] && install includes/*.adoc -m 644 $(prefix)/$(lang)/includes || true
@install -d -m 755 $(prefix)/$(lang)/config
@[ -n "$$(ls config/*.adoc 2>/dev/null)" ] && install config/*.adoc -m 644 $(prefix)/$(lang)/config || true
install-html:
@ echo INSTALL $(lang) adoc files
@install -d -m 755 $(prefix)/$(lang)
@[ -n "$$(ls *.html 2>/dev/null)" ] && install *.html -m 644 $(prefix)/$(lang) || true
install-man:
@ echo INSTALL $(lang) man files
@install -d -m 755 $(mandir)/$(lang)/man1
@[ -n "$$(ls *.1 2>/dev/null)" ] && install *.1 -m 644 $(mandir)/$(lang)/man1 || true
@install -d -m 755 $(mandir)/$(lang)/man5
@[ -n "$$(ls *.5 2>/dev/null)" ] && install *.5 -m 644 $(mandir)/$(lang)/man5 || true
@install -d -m 755 $(mandir)/$(lang)/man7
@[ -n "$$(ls *.7 2>/dev/null)" ] && install *.7 -m 644 $(mandir)/$(lang)/man7 || true
clean:
rm -f *.1 *.5 *7 *.html .man .html .all .translated
mrproper: clean
rm -f *.adoc