automake-patches
[Top][All Lists]
Advanced

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

Re: bug#7944: Should AM_PATH_PYTHON call AC_ARG_VAR?


From: Stefano Lattarini
Subject: Re: bug#7944: Should AM_PATH_PYTHON call AC_ARG_VAR?
Date: Thu, 10 Feb 2011 10:59:45 +0100
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

On Sunday 06 February 2011, Ralf Wildenhues wrote:
> Hi Stefano,
>
Hi Ralf, and sorry for the delay.

> * Stefano Lattarini wrote on Mon, Jan 31, 2011 at 09:31:37PM CET:
> > On Monday 31 January 2011, Jack Kelly wrote:
> > > I've noticed that if you put AM_PATH_PYTHON in configure.ac, it
> > > doesn't add an entry for PYTHON in ./configure --help. Is PYTHON meant
> > > to be a user's variable?
> > > 
> > According to the comments in `m4/python.m4' and to the tests
> > `python{4,6,11}.test', it is (and I think that's a good policy).
> > Documenting the fact in the configure help screen and in the
> > manual would be a good idea too.  What about the attached patch?
> 
> The patch is OK with nits addressed, and without the doc/automake.texi
> change.  I will review that separately later, don't want to delay the
> good part because of that any longer.
>
If you don't mind, I'd rather wait for the documentation part to be
reviewed too, and then push this patch as a whole.  For the moment,
I've addressed your (partial) nits.

> BTW, the downside of AM_ARG_VAR is that './config.status --recheck'
> fails when the variable is not set to the same value as recorded in
> config.cache.  Yes, it's an upside and a downside.  I suppose since a
> few cache variables depend on it it's better to do it.
> 
> > Subject: [PATCH] python: report the 'PYTHON' influential environment 
> > variable
> > 
> > * m4/python.m4 (AM_PATH_PYTHON): Call AC_ARG_VAR on PYTHON.
> > * doc/automake.texi (Python): Update and extend.
> > * tests/help-python.test: New test.
> > * tests/Makefile.am (TESTS): Update.
> > Suggestion from Jack Kelly.
> 
> If you update THANKS, please mention it in the ChangeLog.
>
Yes, I had already done that as follows:

 * THANKS (Jack Kelly): Update e-mail address.

OK?

> > --- a/m4/python.m4
> > +++ b/m4/python.m4
> > @@ -40,6 +40,8 @@ AC_DEFUN([AM_PATH_PYTHON],
> >  [python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl
> >   python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
> >  
> > +  AC_ARG_VAR([PYTHON], [the Python interpreter])
> > +
> >    m4_if([$1],[],[
> >      dnl No version check is needed.
> >      # Find any Python interpreter.
> 
> > --- /dev/null
> > +++ b/tests/help-python.test
> 
> > +# Make sure that our private macro `AM_DEP_TRACK' adds proper text to
> 
> AM_DEP_TRACK?  private?
>
Copy & paste blunder, sorry.  Fixed.

> > +# the configure help screen.
> > +# Keep this in sync with sister test `help-depend2.test'
>
And this is another copy & paste blunder.  Fixed.

> This test needs a python interpreter to work.
>
No, why?  The checks in AM_PATH_PYTHON should be never run, as
we only use `./configure --help'.

> > +. ./defs || Exit 1
> > +
> > +set -e
> > +
> > +cat > configure.in <<END
> > +AC_INIT([$me], [1.0])
> > +AM_PATH_PYTHON
> > +END
> > +
> > +$ACLOCAL
> > +$AUTOCONF
> > +
> > +./configure --help >stdout || { cat stdout; Exit 1; }
> > +cat stdout
> > +
> > +grep '^  *PYTHON  *the Python interpreter$' stdout
> > +
> 

Regards,
  Stefano



reply via email to

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