summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-05-03 16:21:48 (GMT)
committerGitHub <noreply@github.com>2017-05-03 16:21:48 (GMT)
commita5c62a8e9f0de6c4133825a5710984a3cd5e102b (patch)
treeb9b98dd5cac24a8e0d84cbe66097039c051245b5 /configure.ac
parent13f1f423fac39f8f14a3ce919dd236975517d5c6 (diff)
downloadcpython-a5c62a8e9f0de6c4133825a5710984a3cd5e102b.zip
cpython-a5c62a8e9f0de6c4133825a5710984a3cd5e102b.tar.gz
cpython-a5c62a8e9f0de6c4133825a5710984a3cd5e102b.tar.bz2
bpo-23404: make touch becomes make regen-all (#1405)
Don't rebuild generated files based on file modification time anymore, the action is now explicit. Replace "make touch" with "make regen-all". Changes: * Remove "make touch", Tools/hg/hgtouch.py and .hgtouch * Add a new "make regen-all" command to rebuild all generated files * Add subcommands to only generate specific files: - regen-ast: Include/Python-ast.h and Python/Python-ast.c - regen-grammar: Include/graminit.h and Python/graminit.c - regen-importlib: Python/importlib_external.h and Python/importlib.h - regen-opcode: Include/opcode.h - regen-opcode-targets: Python/opcode_targets.h - regen-typeslots: Objects/typeslots.inc * Rename PYTHON_FOR_GEN to PYTHON_FOR_REGEN * pgen is now only built by by "make regen-grammar" * Add $(srcdir)/ prefix to paths to source files to handle correctly compilation outside the source directory Note: $(PYTHON_FOR_REGEN) is no more used nor needed by "make" default target building Python.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 2 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 69d2c13..e065ce5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,13 +56,8 @@ 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)
+AC_CHECK_PROGS(PYTHON_FOR_REGEN, python$PACKAGE_VERSION python3 python, python3)
+AC_SUBST(PYTHON_FOR_REGEN)
if test "$cross_compiling" = yes; then
AC_MSG_CHECKING([for python interpreter for cross build])
@@ -80,16 +75,12 @@ if test "$cross_compiling" = yes; then
AC_MSG_RESULT($interp)
PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
fi
- # Used to comment out stuff for rebuilding generated files
- GENERATED_COMMENT='#'
elif test "$cross_compiling" = maybe; then
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
else
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
- GENERATED_COMMENT=''
fi
AC_SUBST(PYTHON_FOR_BUILD)
-AC_SUBST(GENERATED_COMMENT)
dnl Ensure that if prefix is specified, it does not end in a slash. If
dnl it does, we get path names containing '//' which is both ugly and