Skip to content

Commit f518518

Browse files
committed
Add 'regen-configure' make target
1 parent c1c6bed commit f518518

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ jobs:
7676
- uses: actions/setup-python@v4
7777
- name: Install Dependencies
7878
run: sudo ./.github/workflows/posix-deps-apt.sh
79+
- name: Check Autoconf version 2.69 and aclocal 1.16.3
80+
run: |
81+
grep "Generated by GNU Autoconf 2.69" configure
82+
grep "aclocal 1.16.3" aclocal.m4
83+
grep -q "runstatedir" configure
84+
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
85+
- name: Regenerate autoconf files
86+
run: make regen-configure
7987
- name: Build CPython
8088
run: |
8189
./configure --with-pydebug

Makefile.pre.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,6 +1742,18 @@ autoconf:
17421742
# Regenerate pyconfig.h.in from configure.ac using autoheader
17431743
(cd $(srcdir); autoheader -Wall)
17441744

1745+
# See https://github.com/tiran/cpython_autoconf container
1746+
.PHONY: regen-configure
1747+
regen-configure:
1748+
@if command -v podman >/dev/null; then RUNTIME="podman"; else RUNTIME="docker"; fi; \
1749+
if ! command -v $$RUNTIME; then echo "$@ needs either Podman or Docker container runtime." >&2; exit 1; fi; \
1750+
if command -v selinuxenabled >/dev/null && selinuxenabled; then OPT=":Z"; fi; \
1751+
# Manifest corresponds with tag '269' \
1752+
CPYTHON_AUTOCONF_MANIFEST="sha256:f370fee95eefa3d57b00488bce4911635411fa83e2d293ced8cf8a3674ead939" \
1753+
CMD="$$RUNTIME run --rm --pull=missing -v $(abs_srcdir):/src$$OPT quay.io/tiran/cpython_autoconf@$$CPYTHON_AUTOCONF_MANIFEST"; \
1754+
echo $$CMD; \
1755+
$$CMD || exit $?
1756+
17451757
# Create a tags file for vi
17461758
tags::
17471759
ctags -w $(srcdir)/Include/*.h $(srcdir)/Include/cpython/*.h $(srcdir)/Include/internal/*.h

0 commit comments

Comments
 (0)