aboutsummaryrefslogtreecommitdiff
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-03-10 19:03:27 +0200
committerGitHub <noreply@github.com>2022-03-10 18:03:27 +0100
commit434ffb7f1f86e6b0cdfad3ede59993934d86e464 (patch)
tree9e4251c3ac27d5d137b90e6000628cb03e14e31c /Makefile.pre.in
parenta0eb69c1a2e3aee75cb48e9868ef06a531b94a70 (diff)
downloadcpython3-434ffb7f1f86e6b0cdfad3ede59993934d86e464.tar.gz
bpo-46973: Add regen-configure make target (GH-31792)
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in16
1 files changed, 11 insertions, 5 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 9deffadb88..c4034dc248 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1196,7 +1196,7 @@ regen-all: regen-opcode regen-opcode-targets regen-typeslots \
regen-pegen-metaparser regen-pegen regen-test-frozenmain \
regen-global-objects
@echo
- @echo "Note: make regen-stdlib-module-names and make autoconf should be run manually"
+ @echo "Note: make regen-stdlib-module-names and make regen-configure should be run manually"
############################################################################
# Special rules for object files
@@ -2294,10 +2294,16 @@ recheck:
# Regenerate configure and pyconfig.h.in
.PHONY: autoconf
autoconf:
- # Regenerate the configure script from configure.ac using autoconf
- (cd $(srcdir); autoconf -Wall)
- # Regenerate pyconfig.h.in from configure.ac using autoheader
- (cd $(srcdir); autoheader -Wall)
+ (cd $(srcdir); autoreconf -ivf -Werror)
+
+.PHONY: regen-configure
+regen-configure:
+ @if command -v podman >/dev/null; then RUNTIME="podman"; else RUNTIME="docker"; fi; \
+ if ! command -v $$RUNTIME; then echo "$@ needs either Podman or Docker container runtime." >&2; exit 1; fi; \
+ if command -v selinuxenabled >/dev/null && selinuxenabled; then OPT=":Z"; fi; \
+ CMD="$$RUNTIME run --rm --pull=always -v $(abs_srcdir):/src$$OPT quay.io/tiran/cpython_autoconf:269"; \
+ echo $$CMD; \
+ $$CMD || exit $?
# Create a tags file for vi
tags::