diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-05-05 03:14:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-05 03:14:23 +0200 |
commit | 8a19eb24c97ef43e9fc7d45af180334ac8093545 (patch) | |
tree | 8657d73ae7c4018e24874f952d9b525bb6299027 /configure.ac | |
parent | e81e355a8e43956802211115e3f99859a1a29ecb (diff) | |
download | cpython-git-8a19eb24c97ef43e9fc7d45af180334ac8093545.tar.gz |
bpo-23404: make touch becomes make regen-all (#1466)
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-opcode-targets: Python/opcode_targets.h
* Add PYTHON_FOR_REGEN variable
* 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
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index aa74259ef5..780f2758c8 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,9 @@ AC_SUBST(host) # pybuilddir.txt will be created by --generate-posix-vars in the Makefile rm -f pybuilddir.txt +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]) if test -z "$PYTHON_FOR_BUILD"; then @@ -35,16 +38,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:$(srcdir)/Lib/$(PLATDIR) '$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 |