mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
Documentation/Makefile add optional targets for l10n
The standard doc lists can be filtered to allow using the compilation rules with translated manpages where all the pages of the original version may not be present. The install variable are reused in the secondary repo so that the configured paths can be used for translated manpages too. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
ecbdaf0899
commit
3d5b568f1a
|
@ -36,14 +36,19 @@ MAN7_TXT += gittutorial-2.txt
|
||||||
MAN7_TXT += gittutorial.txt
|
MAN7_TXT += gittutorial.txt
|
||||||
MAN7_TXT += gitworkflows.txt
|
MAN7_TXT += gitworkflows.txt
|
||||||
|
|
||||||
|
ifdef MAN_FILTER
|
||||||
|
MAN_TXT = $(filter $(MAN_FILTER),$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT))
|
||||||
|
else
|
||||||
MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)
|
MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)
|
||||||
|
MAN_FILTER = $(MAN_TXT)
|
||||||
|
endif
|
||||||
|
|
||||||
MAN_XML = $(patsubst %.txt,%.xml,$(MAN_TXT))
|
MAN_XML = $(patsubst %.txt,%.xml,$(MAN_TXT))
|
||||||
MAN_HTML = $(patsubst %.txt,%.html,$(MAN_TXT))
|
MAN_HTML = $(patsubst %.txt,%.html,$(MAN_TXT))
|
||||||
GIT_MAN_REF = master
|
GIT_MAN_REF = master
|
||||||
|
|
||||||
OBSOLETE_HTML += everyday.html
|
OBSOLETE_HTML += everyday.html
|
||||||
OBSOLETE_HTML += git-remote-helpers.html
|
OBSOLETE_HTML += git-remote-helpers.html
|
||||||
DOC_HTML = $(MAN_HTML) $(OBSOLETE_HTML)
|
|
||||||
|
|
||||||
ARTICLES += howto-index
|
ARTICLES += howto-index
|
||||||
ARTICLES += git-tools
|
ARTICLES += git-tools
|
||||||
|
@ -89,11 +94,13 @@ TECH_DOCS += technical/trivial-merge
|
||||||
SP_ARTICLES += $(TECH_DOCS)
|
SP_ARTICLES += $(TECH_DOCS)
|
||||||
SP_ARTICLES += technical/api-index
|
SP_ARTICLES += technical/api-index
|
||||||
|
|
||||||
DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
|
ARTICLES_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
|
||||||
|
HTML_FILTER ?= $(ARTICLES_HTML) $(OBSOLETE_HTML)
|
||||||
|
DOC_HTML = $(MAN_HTML) $(filter $(HTML_FILTER),$(ARTICLES_HTML) $(OBSOLETE_HTML))
|
||||||
|
|
||||||
DOC_MAN1 = $(patsubst %.txt,%.1,$(MAN1_TXT))
|
DOC_MAN1 = $(patsubst %.txt,%.1,$(filter $(MAN_FILTER),$(MAN1_TXT)))
|
||||||
DOC_MAN5 = $(patsubst %.txt,%.5,$(MAN5_TXT))
|
DOC_MAN5 = $(patsubst %.txt,%.5,$(filter $(MAN_FILTER),$(MAN5_TXT)))
|
||||||
DOC_MAN7 = $(patsubst %.txt,%.7,$(MAN7_TXT))
|
DOC_MAN7 = $(patsubst %.txt,%.7,$(filter $(MAN_FILTER),$(MAN7_TXT)))
|
||||||
|
|
||||||
prefix ?= $(HOME)
|
prefix ?= $(HOME)
|
||||||
bindir ?= $(prefix)/bin
|
bindir ?= $(prefix)/bin
|
||||||
|
@ -457,4 +464,9 @@ print-man1:
|
||||||
lint-docs::
|
lint-docs::
|
||||||
$(QUIET_LINT)$(PERL_PATH) lint-gitlink.perl
|
$(QUIET_LINT)$(PERL_PATH) lint-gitlink.perl
|
||||||
|
|
||||||
|
ifeq ($(wildcard po/Makefile),po/Makefile)
|
||||||
|
doc-l10n install-l10n::
|
||||||
|
$(MAKE) -C po $@
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: FORCE
|
.PHONY: FORCE
|
||||||
|
|
Loading…
Reference in a new issue