diff options
author | Xavier de Gaye <xdegaye@users.sourceforge.net> | 2016-07-26 10:48:08 (GMT) |
---|---|---|
committer | Xavier de Gaye <xdegaye@users.sourceforge.net> | 2016-07-26 10:48:08 (GMT) |
commit | fd0d5939bd7dd36ad84fb4c14c84f4386295da9d (patch) | |
tree | 0e496d505c2e2139390967795d5e880a6014775f /configure.ac | |
parent | 254da19d0ea80faf9671d78b092eb14622510c1a (diff) | |
download | cpython-fd0d5939bd7dd36ad84fb4c14c84f4386295da9d.zip cpython-fd0d5939bd7dd36ad84fb4c14c84f4386295da9d.tar.gz cpython-fd0d5939bd7dd36ad84fb4c14c84f4386295da9d.tar.bz2 |
Issue #26662: Set PYTHON_FOR_GEN in configure
as the Python program to be used for file generation during the build.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index 0aec481..bf27ab8 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,14 @@ AC_SUBST(host) # pybuilddir.txt will be created by --generate-posix-vars in the Makefile rm -f pybuilddir.txt +AC_CHECK_PROGS(PYTHON_FOR_GEN, python$PACKAGE_VERSION python3 python, not-found) +if test "$PYTHON_FOR_GEN" = not-found; then + PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \ + echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \ + echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&' +fi +AC_SUBST(PYTHON_FOR_GEN) + if test "$cross_compiling" = yes; then AC_MSG_CHECKING([for python interpreter for cross build]) if test -z "$PYTHON_FOR_BUILD"; then @@ -1178,23 +1186,6 @@ if test "$cross_compiling" = yes; then fi AC_SUBST(READELF) -AC_SUBST(ASDLGEN) -AC_CHECK_PROGS(PYTHON, python$PACKAGE_VERSION python3 python, not-found) -if test "$PYTHON" = not-found; then - ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #" -else - ASDLGEN="$PYTHON" -fi - -AC_SUBST(OPCODEHGEN) -AC_CHECK_PROGS(PYTHON, python$PACKAGE_VERSION python3 python, not-found) -if test "$PYTHON" = not-found; then - OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py" -else - OPCODEHGEN="$PYTHON" -fi - - case $MACHDEP in bsdos*|hp*|HP*) |