Skip to content

Commit c808102

Browse files
committed
Add 'regen-configure' make target
1 parent 6c2f34f commit c808102

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Makefile.pre.in

+13
Original file line numberDiff line numberDiff line change
@@ -1868,6 +1868,19 @@ autoconf:
18681868
# Regenerate pyconfig.h.in from configure.ac using autoheader
18691869
(cd $(srcdir); autoheader -Wall)
18701870

1871+
# See https://github.com/tiran/cpython_autoconf container
1872+
.PHONY: regen-configure
1873+
regen-configure:
1874+
@if command -v podman >/dev/null; then RUNTIME="podman"; else RUNTIME="docker"; fi; \
1875+
if ! command -v $$RUNTIME; then echo "$@ needs either Podman or Docker container runtime." >&2; exit 1; fi; \
1876+
if command -v selinuxenabled >/dev/null && selinuxenabled; then OPT=":Z"; fi; \
1877+
CMD="$$RUNTIME run --rm --pull=always -v $(abs_srcdir):/src$$OPT quay.io/tiran/cpython_autoconf:269"; \
1878+
# Manifest corresponds with tag '269' \
1879+
CPYTHON_AUTOCONF_MANIFEST="sha256:f370fee95eefa3d57b00488bce4911635411fa83e2d293ced8cf8a3674ead939" \
1880+
CMD="$$RUNTIME run --rm --pull=missing -v $(abs_srcdir):/src$$OPT quay.io/tiran/cpython_autoconf@$$CPYTHON_AUTOCONF_MANIFEST"; \
1881+
echo $$CMD; \
1882+
$$CMD || exit $?
1883+
18711884
# Create a tags file for vi
18721885
tags::
18731886
ctags -w $(srcdir)/Include/*.h $(srcdir)/Include/cpython/*.h $(srcdir)/Include/internal/*.h

0 commit comments

Comments
 (0)