summaryrefslogtreecommitdiffstats
path: root/Makefile.pre.in
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in17
1 files changed, 15 insertions, 2 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 5605a88..fa0b9d8 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -252,7 +252,7 @@ PYTHON= python$(EXE)
BUILDPYTHON= python$(BUILDEXE)
PYTHON_FOR_REGEN?=@PYTHON_FOR_REGEN@
-UPDATE_FILE=@PYTHON_FOR_REGEN@ $(srcdir)/Tools/scripts/update_file.py
+UPDATE_FILE=$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/update_file.py
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
_PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
BUILD_GNU_TYPE= @build@
@@ -757,6 +757,8 @@ regen-limited-abi: all
regen-all: regen-opcode regen-opcode-targets regen-typeslots \
regen-token regen-ast regen-keyword regen-importlib clinic \
regen-pegen-metaparser regen-pegen
+ @echo
+ @echo "Note: make regen-module-names and autoconf should be run manually"
############################################################################
# Special rules for object files
@@ -896,6 +898,15 @@ regen-keyword:
$(srcdir)/Lib/keyword.py.new
$(UPDATE_FILE) $(srcdir)/Lib/keyword.py $(srcdir)/Lib/keyword.py.new
+.PHONY: regen-module-names
+regen-module-names: build_all
+ # Regenerate Python/module_names.h
+ # using Tools/scripts/generate_module_names.py
+ $(RUNSHARED) ./$(BUILDPYTHON) \
+ $(srcdir)/Tools/scripts/generate_module_names.py \
+ > $(srcdir)/Python/module_names.h.new
+ $(UPDATE_FILE) $(srcdir)/Python/module_names.h $(srcdir)/Python/module_names.h.new
+
Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o Python/future.o: $(srcdir)/Include/Python-ast.h
Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -1145,7 +1156,9 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/pycore_ucnhash.h \
$(srcdir)/Include/internal/pycore_unionobject.h \
$(srcdir)/Include/internal/pycore_warnings.h \
- $(DTRACE_HEADERS)
+ $(DTRACE_HEADERS) \
+ \
+ $(srcdir)/Python/module_names.h
$(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)