* [PATCH] subtree: Obey USE_ASCIIDOCTOR when present
@ 2017-06-28 2:49 A. Wilcox
2017-06-28 3:57 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: A. Wilcox @ 2017-06-28 2:49 UTC (permalink / raw)
To: git; +Cc: apenwarr, A. Wilcox
Defining USE_ASCIIDOCTOR=1 when building Git uses asciidoctor over
asciidoc when generating DocBook and man page documentation. However,
the contrib/subtree module does not presently honour that flag.
This causes a build failure when asciidoc is not present on the build
system. Instead, adapt the main Documentation/Makefile logic to use
asciidoctor when requested.
Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
---
contrib/subtree/Makefile | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
index 6afa9aa..1b8fcd1 100644
--- a/contrib/subtree/Makefile
+++ b/contrib/subtree/Makefile
@@ -19,15 +19,27 @@ htmldir ?= $(prefix)/share/doc/git-doc
INSTALL ?= install
RM ?= rm -f
-ASCIIDOC = asciidoc
-XMLTO = xmlto
+ASCIIDOC = asciidoc
+ASCIIDOC_CONF = -f ../../Documentation/asciidoc.conf
+ASCIIDOC_HTML = xhtml11
+ASCIIDOC_DOCBOOK = docbook
+ASCIIDOC_EXTRA =
+XMLTO = xmlto
+
+ifdef USE_ASCIIDOCTOR
+ASCIIDOC = asciidoctor
+ASCIIDOC_CONF =
+ASCIIDOC_HTML = xhtml5
+ASCIIDOC_DOCBOOK = docbook45
+ASCIIDOC_EXTRA += -I../../Documentation -rasciidoctor-extensions
+ASCIIDOC_EXTRA += -alitdd='&\#x2d;&\#x2d;'
+endif
ifndef SHELL_PATH
SHELL_PATH = /bin/sh
endif
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
-ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
MANPAGE_XSL = ../../Documentation/manpage-normal.xsl
GIT_SUBTREE_SH := git-subtree.sh
@@ -65,12 +77,12 @@ $(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
$(XMLTO) -m $(MANPAGE_XSL) man $^
$(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
- $(ASCIIDOC) -b docbook -d manpage -f $(ASCIIDOC_CONF) \
- -agit_version=$(GIT_VERSION) $^
+ $(ASCIIDOC) -b $(ASCIIDOC_DOCBOOK) -d manpage $(ASCIIDOC_CONF) \
+ -agit_version=$(GIT_VERSION) $(ASCIIDOC_EXTRA) $^
$(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
- $(ASCIIDOC) -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
- -agit_version=$(GIT_VERSION) $^
+ $(ASCIIDOC) -b $(ASCIIDOC_HTML) -d manpage $(ASCIIDOC_CONF) \
+ -agit_version=$(GIT_VERSION) $(ASCIIDOC_EXTRA) $^
$(GIT_SUBTREE_TEST): $(GIT_SUBTREE)
cp $< $@
--
2.10.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] subtree: Obey USE_ASCIIDOCTOR when present
2017-06-28 2:49 [PATCH] subtree: Obey USE_ASCIIDOCTOR when present A. Wilcox
@ 2017-06-28 3:57 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2017-06-28 3:57 UTC (permalink / raw)
To: A. Wilcox; +Cc: git, apenwarr
"A. Wilcox" <AWilcox@Wilcox-Tech.com> writes:
> Defining USE_ASCIIDOCTOR=1 when building Git uses asciidoctor over
> asciidoc when generating DocBook and man page documentation. However,
> the contrib/subtree module does not presently honour that flag.
>
> This causes a build failure when asciidoc is not present on the build
> system. Instead, adapt the main Documentation/Makefile logic to use
> asciidoctor when requested.
>
> Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
> ---
Makes sense. Thanks. Will queue.
> contrib/subtree/Makefile | 26 +++++++++++++++++++-------
> 1 file changed, 19 insertions(+), 7 deletions(-)
>
> diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
> index 6afa9aa..1b8fcd1 100644
> --- a/contrib/subtree/Makefile
> +++ b/contrib/subtree/Makefile
> @@ -19,15 +19,27 @@ htmldir ?= $(prefix)/share/doc/git-doc
> INSTALL ?= install
> RM ?= rm -f
>
> -ASCIIDOC = asciidoc
> -XMLTO = xmlto
> +ASCIIDOC = asciidoc
> +ASCIIDOC_CONF = -f ../../Documentation/asciidoc.conf
> +ASCIIDOC_HTML = xhtml11
> +ASCIIDOC_DOCBOOK = docbook
> +ASCIIDOC_EXTRA =
> +XMLTO = xmlto
> +
> +ifdef USE_ASCIIDOCTOR
> +ASCIIDOC = asciidoctor
> +ASCIIDOC_CONF =
> +ASCIIDOC_HTML = xhtml5
> +ASCIIDOC_DOCBOOK = docbook45
> +ASCIIDOC_EXTRA += -I../../Documentation -rasciidoctor-extensions
> +ASCIIDOC_EXTRA += -alitdd='&\#x2d;&\#x2d;'
> +endif
>
> ifndef SHELL_PATH
> SHELL_PATH = /bin/sh
> endif
> SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
>
> -ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
> MANPAGE_XSL = ../../Documentation/manpage-normal.xsl
>
> GIT_SUBTREE_SH := git-subtree.sh
> @@ -65,12 +77,12 @@ $(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
> $(XMLTO) -m $(MANPAGE_XSL) man $^
>
> $(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
> - $(ASCIIDOC) -b docbook -d manpage -f $(ASCIIDOC_CONF) \
> - -agit_version=$(GIT_VERSION) $^
> + $(ASCIIDOC) -b $(ASCIIDOC_DOCBOOK) -d manpage $(ASCIIDOC_CONF) \
> + -agit_version=$(GIT_VERSION) $(ASCIIDOC_EXTRA) $^
>
> $(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
> - $(ASCIIDOC) -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
> - -agit_version=$(GIT_VERSION) $^
> + $(ASCIIDOC) -b $(ASCIIDOC_HTML) -d manpage $(ASCIIDOC_CONF) \
> + -agit_version=$(GIT_VERSION) $(ASCIIDOC_EXTRA) $^
>
> $(GIT_SUBTREE_TEST): $(GIT_SUBTREE)
> cp $< $@
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-28 3:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-28 2:49 [PATCH] subtree: Obey USE_ASCIIDOCTOR when present A. Wilcox
2017-06-28 3:57 ` Junio C Hamano
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).