From: Eric Blake <eblake@redhat.com>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Fam Zheng <famz@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] Makefile: Do not generate files if "configure" has not been run yet
Date: Wed, 7 Jun 2017 15:59:54 -0500 [thread overview]
Message-ID: <df973d1f-cbb1-22c1-5763-f29001a16fd8@redhat.com> (raw)
In-Reply-To: <1496862674-23626-1-git-send-email-thuth@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1753 bytes --]
On 06/07/2017 02:11 PM, Thomas Huth wrote:
> When doing a "make -j10" in the vanilla QEMU source tree (without
> running "configure first), the Makefile currently generates two
s/"configure/"configure"/
> files already, qemu-version.h and qemu-options.def. This should not
> happen, so let's make these targets depend on config-host.mak.
> Also the python files can not be executed without $(PYTHON), so
> these scripts should depend on config-host.mak, too.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> Makefile | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index c830d7a..6786dc2 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -286,7 +286,7 @@ endif
>
> all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules
>
> -qemu-version.h: FORCE
> +qemu-version.h: config-host.mak FORCE
This one makes sense.
> @@ -393,6 +394,8 @@ gen-out-type = $(subst .,-,$(suffix $@))
>
> qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
>
> +$(qapi-py): config-host.mak
But this one is weird. How can a pre-existing file have a dependency?
Remember, $(qapi-py) is not the list of built files, but the list of
files used to build other files. It seems like you either want
config-host.mak includes in $(qapi-py), or...
> +
> 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)
...that THIS should be the rule that depends on config-host.mak in
addition do depending on $(qapi-py).
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2017-06-07 21:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 19:11 [Qemu-devel] [PATCH] Makefile: Do not generate files if "configure" has not been run yet Thomas Huth
2017-06-07 20:59 ` Eric Blake [this message]
2017-06-08 4:31 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=df973d1f-cbb1-22c1-5763-f29001a16fd8@redhat.com \
--to=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).