From: Ian Campbell <Ian.Campbell@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Olaf Hering <olaf@aepfle.de>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH 2/2] tools: Clear private variables from configure --with-opt
Date: Thu, 23 Oct 2014 11:13:26 +0100 [thread overview]
Message-ID: <1414059206.19198.34.camel@citrix.com> (raw)
In-Reply-To: <21575.44007.860491.53690@mariner.uk.xensource.com>
On Wed, 2014-10-22 at 14:06 +0100, Ian Jackson wrote:
> Olaf Hering writes ("[PATCH 2/2] tools: Clear private variables from configure --with-opt"):
> > Configure will use variables from environment when substituting a
> > private variable if the corresponding --with*-foo option is omited.
> > This happens for seabios_path, ovmf_path and EXTRA_QEMUU_CONFIGURE_ARGS:
> >
> > git clean -dfx
> > env EXTRA_QEMUU_CONFIGURE_ARGS=XXXXXXXXXXXXXXXX ./configure
> > grep XXXXXXXXXXXXXXXX config/Tools.mk
> > CONFIG_QEMUU_EXTRA_ARGS:= XXXXXXXXXXXXXXXX
> >
> > The reason is the empty "action-if-not-given" case. Fix the bug by
> > clearing the variables in this case.
>
> Why on earth is this a problem ? My answer is `don't do that then'.
Is the patch harmful though? Do you think people are relying on this
behaviour?
The autoconf docs for AC_ARG_WITH don't really say what the default is
if you omit one of the option shell scripts, presumably it is to do
nothing.
https://autotools.io/autoconf/arguments.html talks about AC_ARG_VAR
which is supposed to be used for this sort of thing.
I've not confirmed this but
http://stackoverflow.com/questions/13848154/passing-environment-variables-to-autoconfs-configure suggests that passing something via the env causes config.status --recheck to do the wrong thing, which seems very plausible.
Ian.
prev parent reply other threads:[~2014-10-23 10:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-21 13:53 [PATCH 1/2 v2] Add configure --with-extra-cflags-* Olaf Hering
2014-10-21 13:53 ` [PATCH 2/2] tools: Clear private variables from configure --with-opt Olaf Hering
2014-10-22 13:06 ` Ian Jackson
2014-10-23 10:13 ` Ian Campbell [this message]
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=1414059206.19198.34.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=olaf@aepfle.de \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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.