qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
	Paolo Bonzini <pbonzini@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Eric Blake <eblake@redhat.com>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH v2] Makefile: Do not generate files if "configure" has not been run yet
Date: Thu, 8 Jun 2017 14:43:48 +0200	[thread overview]
Message-ID: <9b595fb3-e73e-92a8-559d-c55382545879@redhat.com> (raw)
In-Reply-To: <20170608111616.GA14424@lemon.lan>

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

On 08.06.2017 13:16, Fam Zheng wrote:
> On Thu, 06/08 09:40, Thomas Huth wrote:
>> When doing a "make -j10" in the vanilla QEMU source tree (without
>> running "configure first), the Makefile currently generates two
>> 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 targets that use python  can not be executed without the
>> $(PYTHON) from config-host.mak, so these should depend on the config-
>> host.mak file, too (these targets generate some ugly error messages
>> otherwise during "make -j10").
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  v2:
>>  - Add the dependency to the targets that use $(PYTHON) instead of
>>    adding it to $(qapi-py)
>>
>>  Makefile | 23 ++++++++++++-----------
>>  1 file changed, 12 insertions(+), 11 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index c830d7a..b5e0731 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -286,7 +286,7 @@ endif
>>  
>>  all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules
> 
> Is it enough to add a
> 
>     $(filter-out $(GENERATED_FILES),config-host.mak): config-host.mak
> 
> after the variable is fully built?  (Seems config-host.mak is not included, but
> filtering out is safer.)

That works for the files that I've mentioned in the patch description,
but I then suddenly see lots of *.pyc files in scripts/tracetool instead...

Anyway, I think I've now found a way that works even more reliable:
Simply disable the "Makefile: $(GENERATED_FILES)" rule if
config-host.mak is missing. I'll send a v3 patch in a minute...

 Thomas


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2017-06-08 12:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08  7:40 [Qemu-trivial] [PATCH v2] Makefile: Do not generate files if "configure" has not been run yet Thomas Huth
2017-06-08 11:16 ` [Qemu-trivial] [Qemu-devel] " Fam Zheng
2017-06-08 12:43   ` Thomas Huth [this message]
2017-06-08 12:21 ` [Qemu-trivial] " Eric Blake

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=9b595fb3-e73e-92a8-559d-c55382545879@redhat.com \
    --to=thuth@redhat.com \
    --cc=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 \
    /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).