qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 06/11] build-sys: add qapi doc generation tar


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 06/11] build-sys: add qapi doc generation targets
Date: Thu, 27 Oct 2016 18:16:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Marc-André Lureau <address@hidden> writes:

> Add qapi doc generation targets, qemu-qapi.texi, qemu-ga-qapi.texi
> (implicit pdf works too) and qemu-qapi.txt. The generated
> documentation isn't complete yet, so don't bother to build it by
> default or install it yet.
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
>  Makefile | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index f103616..6e00559 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -269,6 +269,7 @@ qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated
>  gen-out-type = $(subst .,-,$(suffix $@))
>  
>  qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
> +qapi-py += $(SRC_PATH)/scripts/qapi2texi.py
>  
>  qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\
>  $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
> @@ -558,9 +559,23 @@ qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx 
> $(SRC_PATH)/scripts/hxtool
>  qemu-monitor-info.texi: $(SRC_PATH)/hmp-commands-info.hx 
> $(SRC_PATH)/scripts/hxtool
>       $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"  GEN  
>  $@")
>  
> +qemu-qapi.txt: qemu-qapi.texi
> +     $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --plaintext 
> $< -o $@,\
> +     "  GEN   $@")

Do it with a pattern rule?  Next to the %.info: %.texi rule:

   %.txt: %.texi
        $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --plaintext 
$< -o $@,\
        "  GEN   $@")

> +
>  qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
>       $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"  GEN  
>  $@")
>  
> +qemu-qapi.texi: $(qapi-modules) $(qapi-py) \
> +     $(SRC_PATH)/docs/qemu-qapi.template.texi
> +     $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi2texi.py \
> +     $(SRC_PATH)/docs/qemu-qapi.template.texi $(VERSION) $< > $@,"  GEN   
> $@")

Confusing indentation.  Elsewhere in this file, we indent like this:

   qemu-qapi.texi: $(qapi-modules) $(qapi-py) \
   $(SRC_PATH)/docs/qemu-qapi.template.texi
        $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi2texi.py \
        $(SRC_PATH)/docs/qemu-qapi.template.texi $(VERSION) $< > $@,"  GEN   
$@")

> +
> +qemu-ga-qapi.texi: $(SRC_PATH)/qga/qapi-schema.json $(qapi-py) \
> +     $(SRC_PATH)/docs/qemu-ga-qapi.template.texi
> +     $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi2texi.py \
> +     $(SRC_PATH)/docs/qemu-ga-qapi.template.texi $(VERSION) $< > $@,"  GEN   
> $@")

Likewise.

> +
>  qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi 
> qemu-monitor-info.texi
>       $(call quiet-command, \
>         perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \

Shouldn't you add the two generated .texi to .gitignore?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]