summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-05-04 22:46:56 (GMT)
committerGitHub <noreply@github.com>2017-05-04 22:46:56 (GMT)
commit9d02f562961efd12d3c8317a10916db7f77330cc (patch)
tree56d96d482ac666e4ba20674323de9dd479f64b6b /configure
parenta7e48b544becc01dbf9059ed01f38997c6d0156c (diff)
downloadcpython-9d02f562961efd12d3c8317a10916db7f77330cc.zip
cpython-9d02f562961efd12d3c8317a10916db7f77330cc.tar.gz
cpython-9d02f562961efd12d3c8317a10916db7f77330cc.tar.bz2
[3.6] bpo-23404: make touch becomes make regen-all (#1405) (#1461)
* 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. (cherry picked from commit a5c62a8e9f0de6c4133825a5710984a3cd5e102b) * bpo-30273: Update sysconfig (#1464) The AST_H_DIR variable was removed from Makefile.pre.in by the commit a5c62a8e9f0de6c4133825a5710984a3cd5e102b (bpo-23404). AST_H_DIR was hardcoded to "Include", so replace the removed variable by its content. Remove also ASDLGEN variable from sysconfig example since this variable was also removed. (cherry picked from commit b109a1d3360fc4bb87b9887264e3634632d392ca)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure32
1 files changed, 11 insertions, 21 deletions
diff --git a/configure b/configure
index 3c611d6..97d3301 100755
--- a/configure
+++ b/configure
@@ -750,9 +750,8 @@ UNIVERSALSDK
CONFIG_ARGS
SOVERSION
VERSION
-GENERATED_COMMENT
PYTHON_FOR_BUILD
-PYTHON_FOR_GEN
+PYTHON_FOR_REGEN
host_os
host_vendor
host_cpu
@@ -2881,11 +2880,11 @@ do
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
+if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -n "$PYTHON_FOR_GEN"; then
- ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
+ if test -n "$PYTHON_FOR_REGEN"; then
+ ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -2894,7 +2893,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
+ ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -2904,25 +2903,20 @@ IFS=$as_save_IFS
fi
fi
-PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
-if test -n "$PYTHON_FOR_GEN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
-$as_echo "$PYTHON_FOR_GEN" >&6; }
+PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
+if test -n "$PYTHON_FOR_REGEN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
+$as_echo "$PYTHON_FOR_REGEN" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
- test -n "$PYTHON_FOR_GEN" && break
+ test -n "$PYTHON_FOR_REGEN" && break
done
-test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
+test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
-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
if test "$cross_compiling" = yes; then
@@ -2943,18 +2937,14 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; }
$as_echo "$interp" >&6; }
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
as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
else
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
- GENERATED_COMMENT=''
fi
-
if test "$prefix" != "/"; then
prefix=`echo "$prefix" | sed -e 's/\/$//g'`
fi