Documentation/Makefile: make $(wildcard howto/*.txt) a var
Refactor occurrences of $(wildcard howto/*.txt) into a single HOWTO_TXT variable for readability and consistency. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
89b43f80a5
commit
824c621b76
@ -2,6 +2,7 @@
|
|||||||
MAN1_TXT =
|
MAN1_TXT =
|
||||||
MAN5_TXT =
|
MAN5_TXT =
|
||||||
MAN7_TXT =
|
MAN7_TXT =
|
||||||
|
HOWTO_TXT =
|
||||||
TECH_DOCS =
|
TECH_DOCS =
|
||||||
ARTICLES =
|
ARTICLES =
|
||||||
SP_ARTICLES =
|
SP_ARTICLES =
|
||||||
@ -42,6 +43,8 @@ MAN7_TXT += gittutorial-2.txt
|
|||||||
MAN7_TXT += gittutorial.txt
|
MAN7_TXT += gittutorial.txt
|
||||||
MAN7_TXT += gitworkflows.txt
|
MAN7_TXT += gitworkflows.txt
|
||||||
|
|
||||||
|
HOWTO_TXT += $(wildcard howto/*.txt)
|
||||||
|
|
||||||
ifdef MAN_FILTER
|
ifdef MAN_FILTER
|
||||||
MAN_TXT = $(filter $(MAN_FILTER),$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT))
|
MAN_TXT = $(filter $(MAN_FILTER),$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT))
|
||||||
else
|
else
|
||||||
@ -428,9 +431,9 @@ $(patsubst %.txt,%.texi,$(MAN_TXT)): %.texi : %.xml
|
|||||||
$(DOCBOOK2X_TEXI) --to-stdout $*.xml >$@+ && \
|
$(DOCBOOK2X_TEXI) --to-stdout $*.xml >$@+ && \
|
||||||
mv $@+ $@
|
mv $@+ $@
|
||||||
|
|
||||||
howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
|
howto-index.txt: howto-index.sh $(HOWTO_TXT)
|
||||||
$(QUIET_GEN)$(RM) $@+ $@ && \
|
$(QUIET_GEN)$(RM) $@+ $@ && \
|
||||||
'$(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(wildcard howto/*.txt)) >$@+ && \
|
'$(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(HOWTO_TXT)) >$@+ && \
|
||||||
mv $@+ $@
|
mv $@+ $@
|
||||||
|
|
||||||
$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
|
$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
|
||||||
@ -439,7 +442,7 @@ $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
|
|||||||
WEBDOC_DEST = /pub/software/scm/git/docs
|
WEBDOC_DEST = /pub/software/scm/git/docs
|
||||||
|
|
||||||
howto/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
|
howto/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
|
||||||
$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt GIT-ASCIIDOCFLAGS
|
$(patsubst %.txt,%.html,$(HOWTO_TXT)): %.html : %.txt GIT-ASCIIDOCFLAGS
|
||||||
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
|
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
|
||||||
sed -e '1,/^$$/d' $< | \
|
sed -e '1,/^$$/d' $< | \
|
||||||
$(TXT_TO_HTML) - >$@+ && \
|
$(TXT_TO_HTML) - >$@+ && \
|
||||||
|
Reference in New Issue
Block a user