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: Ralf Wildenhues
Subject: Re: bug#7944: Should AM_PATH_PYTHON call AC_ARG_VAR?
Date: Sun, 6 Feb 2011 23:26:27 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

Hi Stefano,

* 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.

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.

> --- 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?

> +# the configure help screen.
> +# Keep this in sync with sister test `help-depend2.test'

This test needs a python interpreter to work.

> +. ./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
> +




reply via email to

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