All of lore.kernel.org
 help / color / mirror / Atom feed
From: "罗勇刚(Yonggang Luo)" <luoyonggang@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	qemu-level <qemu-devel@nongnu.org>,
	"Peter Maydell" <peter.maydell@linaro.org>
Subject: Re: [RFC PATCH 0/3] Automatically convert configure options to meson build options
Date: Sun, 13 Sep 2020 18:15:52 +0800	[thread overview]
Message-ID: <CAE2XoE8sgGfeoxn7+g4vEnYF52Axx3DOA=37hCO05sCkf+cEdw@mail.gmail.com> (raw)
In-Reply-To: <20200913100534.22084-1-pbonzini@redhat.com>

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

On Sun, Sep 13, 2020 at 6:07 PM Paolo Bonzini <pbonzini@redhat.com> wrote:

> Right now meson_options.txt lists less than a dozen options, but about
> 40 more could come as configure tests are converted and moved to
> meson.build.  Each option needs code in configure to parse it and pass
> the option down to Meson as a -D command-line argument; in addition the
> default must be duplicated between configure and meson_options.txt.
>
> This series tries to remove the code duplication by passing unknown
> --enable and --disable options to a Python program, and using
> Meson's introspection support to match those to meson_options.txt
>
> The disadvantages are:
>
> - because we parse command-line options before meson is available,
> the introspection output is stored in the source tree.  The output
> is slightly modified using the "jq" tool in order to ensure that it's
> stable and that modifications to meson_buildoptions.txt do not cause
> horrible conflicts.  This is the main reason for the unattractive
> diffstat (the number of JSON lines added is higher than the number
> of configure lines removed, though of course the latter are code
> that must be maintained manually and the former is not).
>
> - we now need Python to generate the full help, so if Python is
> missing we can only print a partial message and direct the user
> to specify the interpreter with --python.  It would be possible to fix
> this by rewriting the script in Perl (at least on Fedora, JSON::PP is
> always installed if Perl is, because it's a dependency for CPAN; I'd
> have to check Ubuntu and the BSDs), or if we want to write it as a
> Bourne shell script, to further massage the introspection output into
> for example TAB-separated values.
>
I am confusing about this? we were converting configure to meson, and
python is a
force dependencies, why we need rewrite the script in Perl? If we wanna
build qemu, the first thing
we need to install is python+meson, so there is no need convert to Perl or
bash script.
And perl/bash will incur msys2/mingw user, the ideal way is we only depends
on python+meson to building qemu

>
> Opinions are welcome on whether this is worthwhile and how to solve
> the above doubts.
>
> Paolo
>
> Paolo Bonzini (3):
>   configure: quote command line arguments in config.status
>   configure: early test for Python
>   configure: automatically parse command line for meson -D options
>
>  Makefile                                |   6 ++
>  configure                               | 107 ++++++++-----------
>  docs/devel/build-system.rst             |  35 +------
>  meson-buildoptions.json                 | 130 ++++++++++++++++++++++++
>  scripts/configure-parse-buildoptions.py |  94 +++++++++++++++++
>  5 files changed, 280 insertions(+), 92 deletions(-)
>  create mode 100644 meson-buildoptions.json
>  create mode 100644 scripts/configure-parse-buildoptions.py
>
> --
> 2.26.2
>
>
>

-- 
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

[-- Attachment #2: Type: text/html, Size: 3830 bytes --]

  parent reply	other threads:[~2020-09-13 10:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-13 10:05 [RFC PATCH 0/3] Automatically convert configure options to meson build options Paolo Bonzini
2020-09-13 10:05 ` [PATCH 1/3] configure: quote command line arguments in config.status Paolo Bonzini
2020-09-14 19:17   ` Eric Blake
2020-09-13 10:05 ` [PATCH 2/3] configure: early test for Python Paolo Bonzini
2020-09-13 10:05 ` [PATCH 3/3] configure: automatically parse command line for meson -D options Paolo Bonzini
2020-09-14 19:20   ` Eric Blake
2020-09-13 10:15 ` 罗勇刚(Yonggang Luo) [this message]
2020-09-13 13:57   ` [RFC PATCH 0/3] Automatically convert configure options to meson build options Paolo Bonzini
2020-09-14  9:12 ` Daniel P. Berrangé
2020-09-14 10:49   ` Paolo Bonzini
2020-09-14  9:57 ` Stefan Hajnoczi
2020-09-14 10:00   ` 罗勇刚(Yonggang Luo)
2020-09-16 11:24     ` Stefan Hajnoczi
2020-09-14 10:27   ` Paolo Bonzini
2020-09-16 11:25     ` Stefan Hajnoczi
2020-09-16 13:15       ` Paolo Bonzini

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='CAE2XoE8sgGfeoxn7+g4vEnYF52Axx3DOA=37hCO05sCkf+cEdw@mail.gmail.com' \
    --to=luoyonggang@gmail.com \
    --cc=berrange@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.