]> granicus.if.org Git - python/commitdiff
Issue #14605 and #14642: Issue a warning in case Python\importlib.h needs to
authorMarc-Andre Lemburg <mal@egenix.com>
Wed, 25 Apr 2012 17:45:11 +0000 (19:45 +0200)
committerMarc-Andre Lemburg <mal@egenix.com>
Wed, 25 Apr 2012 17:45:11 +0000 (19:45 +0200)
be rebuilt, but there's no Python interpreter around to freeze the bootstrap
script.

Forgot to include Makefile.pre.in in changeset 76549:acfdf46b8de1.

Makefile.pre.in

index 3f43837cf393b6837f061203d4f8bbb91e991a72..e6b37f85eca3d294aca1ac9f6ace437e666fe77c 100644 (file)
@@ -573,12 +573,23 @@ Modules/Setup: $(srcdir)/Modules/Setup.dist
 
 Modules/_testembed: Modules/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
        $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+
 ############################################################################
 # Importlib
 
 Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py $(srcdir)/Python/freeze_importlib.py
-       ./$(BUILDPYTHON) $(srcdir)/Python/freeze_importlib.py \
-           $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h
+       @if test -f ./$(BUILDPYTHON); then \
+           ./$(BUILDPYTHON) $(srcdir)/Python/freeze_importlib.py \
+               $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h; \
+       else \
+           echo "----------------------------------------------------------"; \
+           echo "Python/importlib.h needs to be rebuilt, but no interpreter"; \
+           echo "is available to do so. Leaving the previous version in"; \
+           echo "place. You may want to run ''make'' a second time after"; \
+           echo "this build is complete."; \
+           echo "----------------------------------------------------------"; \
+       fi
+
 ############################################################################
 # Special rules for object files