mirror of
https://github.com/python/cpython.git
synced 2025-11-27 13:45:25 +00:00
- Precompile py files in Mac subtree after installing
- Pre-cache .rsrc files in Mac subtree after installing - Fixed nameclash in Make variables
This commit is contained in:
parent
ccd8e8d741
commit
45c8e92728
1 changed files with 34 additions and 28 deletions
|
|
@ -45,6 +45,7 @@ APPSUBDIRS=MacOS Resources Resources/English.lproj
|
||||||
RESOURCEDIR=$(srcdir)/Mac/Resources
|
RESOURCEDIR=$(srcdir)/Mac/Resources
|
||||||
RESOURCEFILE=python.rsrc
|
RESOURCEFILE=python.rsrc
|
||||||
RFCONVERTER=$(srcdir)/Mac/Lib/applesingle.py
|
RFCONVERTER=$(srcdir)/Mac/Lib/applesingle.py
|
||||||
|
CACHERSRC=$(srcdir)/Mac/scripts/cachersrc.py
|
||||||
|
|
||||||
installapps: install_PythonLauncher install_Python install_BuildApplet install_IDE
|
installapps: install_PythonLauncher install_Python install_BuildApplet install_IDE
|
||||||
|
|
||||||
|
|
@ -114,9 +115,9 @@ install_BuildApplet: $(INSTALLED_PYTHONW)
|
||||||
--output $(PYTHONAPPSDIR)/BuildApplet.app \
|
--output $(PYTHONAPPSDIR)/BuildApplet.app \
|
||||||
$(srcdir)/Mac/scripts/BuildApplet.py
|
$(srcdir)/Mac/scripts/BuildApplet.py
|
||||||
|
|
||||||
LIBDEST=$(prefix)/Mac/Lib
|
MACLIBDEST=$(prefix)/Mac/Lib
|
||||||
LIBSRC=$(srcdir)/Mac/Lib
|
MACLIBSRC=$(srcdir)/Mac/Lib
|
||||||
LIBSUBDIRS= \
|
MACLIBSUBDIRS= \
|
||||||
Carbon \
|
Carbon \
|
||||||
lib-scriptpackages \
|
lib-scriptpackages \
|
||||||
lib-scriptpackages/_builtinSuites \
|
lib-scriptpackages/_builtinSuites \
|
||||||
|
|
@ -130,11 +131,11 @@ LIBSUBDIRS= \
|
||||||
mkcwproject/template \
|
mkcwproject/template \
|
||||||
mkcwproject/template-carbon \
|
mkcwproject/template-carbon \
|
||||||
mkcwproject/template-ppc
|
mkcwproject/template-ppc
|
||||||
TOOLSDEST=$(prefix)/Mac/Tools
|
MACTOOLSDEST=$(prefix)/Mac/Tools
|
||||||
TOOLSSRC=$(srcdir)/Mac/Tools
|
MACTOOLSSRC=$(srcdir)/Mac/Tools
|
||||||
TOOLSSUBDIRS=IDE
|
MACTOOLSSUBDIRS=IDE
|
||||||
installmacsubtree:
|
installmacsubtree: $(INSTALLED_PYTHON)
|
||||||
@for i in $(LIBDEST) $(TOOLSDEST); \
|
@for i in $(MACLIBDEST) $(MACTOOLSDEST); \
|
||||||
do \
|
do \
|
||||||
if test ! -d $$i; then \
|
if test ! -d $$i; then \
|
||||||
echo "Creating directory $$i"; \
|
echo "Creating directory $$i"; \
|
||||||
|
|
@ -142,32 +143,32 @@ installmacsubtree:
|
||||||
else true; \
|
else true; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
@for d in $(LIBSUBDIRS); \
|
@for d in $(MACLIBSUBDIRS); \
|
||||||
do \
|
do \
|
||||||
a=$(LIBSRC)/$$d; \
|
a=$(MACLIBSRC)/$$d; \
|
||||||
if test ! -d $$a; then continue; else true; fi; \
|
if test ! -d $$a; then continue; else true; fi; \
|
||||||
b=$(LIBDEST)/$$d; \
|
b=$(MACLIBDEST)/$$d; \
|
||||||
if test ! -d $$b; then \
|
if test ! -d $$b; then \
|
||||||
echo "Creating directory $$b"; \
|
echo "Creating directory $$b"; \
|
||||||
$(INSTALL) -d -m $(DIRMODE) $$b; \
|
$(INSTALL) -d -m $(DIRMODE) $$b; \
|
||||||
else true; \
|
else true; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
@for i in $(LIBSRC)/*.py $(LIBSRC)/*.rsrc; \
|
@for i in $(MACLIBSRC)/*.py $(MACLIBSRC)/*.rsrc; \
|
||||||
do \
|
do \
|
||||||
if test -x $$i; then \
|
if test -x $$i; then \
|
||||||
$(INSTALL_SCRIPT) $$i $(LIBDEST); \
|
$(INSTALL_SCRIPT) $$i $(MACLIBDEST); \
|
||||||
echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \
|
echo $(INSTALL_SCRIPT) $$i $(MACLIBDEST); \
|
||||||
else \
|
else \
|
||||||
$(INSTALL_DATA) $$i $(LIBDEST); \
|
$(INSTALL_DATA) $$i $(MACLIBDEST); \
|
||||||
echo $(INSTALL_DATA) $$i $(LIBDEST); \
|
echo $(INSTALL_DATA) $$i $(MACLIBDEST); \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
@for d in $(LIBSUBDIRS); \
|
@for d in $(MACLIBSUBDIRS); \
|
||||||
do \
|
do \
|
||||||
a=$(LIBSRC)/$$d; \
|
a=$(MACLIBSRC)/$$d; \
|
||||||
if test ! -d $$a; then continue; else true; fi; \
|
if test ! -d $$a; then continue; else true; fi; \
|
||||||
b=$(LIBDEST)/$$d; \
|
b=$(MACLIBDEST)/$$d; \
|
||||||
for i in $$a/*; \
|
for i in $$a/*; \
|
||||||
do \
|
do \
|
||||||
case $$i in \
|
case $$i in \
|
||||||
|
|
@ -187,22 +188,22 @@ installmacsubtree:
|
||||||
esac; \
|
esac; \
|
||||||
done; \
|
done; \
|
||||||
done
|
done
|
||||||
@for d in $(TOOLSSUBDIRS); \
|
@for d in $(MACTOOLSSUBDIRS); \
|
||||||
do \
|
do \
|
||||||
a=$(TOOLSSRC)/$$d; \
|
a=$(MACTOOLSSRC)/$$d; \
|
||||||
if test ! -d $$a; then continue; else true; fi; \
|
if test ! -d $$a; then continue; else true; fi; \
|
||||||
b=$(TOOLSDEST)/$$d; \
|
b=$(MACTOOLSDEST)/$$d; \
|
||||||
if test ! -d $$b; then \
|
if test ! -d $$b; then \
|
||||||
echo "Creating directory $$b"; \
|
echo "Creating directory $$b"; \
|
||||||
$(INSTALL) -d -m $(DIRMODE) $$b; \
|
$(INSTALL) -d -m $(DIRMODE) $$b; \
|
||||||
else true; \
|
else true; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
@for d in $(TOOLSSUBDIRS); \
|
@for d in $(MACTOOLSSUBDIRS); \
|
||||||
do \
|
do \
|
||||||
a=$(TOOLSSRC)/$$d; \
|
a=$(MACTOOLSSRC)/$$d; \
|
||||||
if test ! -d $$a; then continue; else true; fi; \
|
if test ! -d $$a; then continue; else true; fi; \
|
||||||
b=$(TOOLSDEST)/$$d; \
|
b=$(MACTOOLSDEST)/$$d; \
|
||||||
for i in $$a/*; \
|
for i in $$a/*; \
|
||||||
do \
|
do \
|
||||||
case $$i in \
|
case $$i in \
|
||||||
|
|
@ -222,8 +223,13 @@ installmacsubtree:
|
||||||
esac; \
|
esac; \
|
||||||
done; \
|
done; \
|
||||||
done
|
done
|
||||||
|
|
||||||
$(INSTALL_DATA) $(srcdir)/Mac/OSX/Mac.pth $(LIBDEST)/site-packages/
|
$(INSTALL_DATA) $(srcdir)/Mac/OSX/Mac.pth $(LIBDEST)/site-packages/
|
||||||
|
|
||||||
|
$(PYTHON) $(CACHERSRC) -v $(MACLIBDEST) $(MACTOOLSDEST)
|
||||||
|
$(INSTALLED_PYTHON) $(srcdir)/Lib/compileall.py $(MACLIBDEST) $(MACTOOLSDEST)
|
||||||
|
$(INSTALLED_PYTHON) -O $(srcdir)/Lib/compileall.py $(MACLIBDEST) $(MACTOOLSDEST)
|
||||||
|
|
||||||
|
|
||||||
# Put symlinks "python" and "pythonw" in the standard place
|
# Put symlinks "python" and "pythonw" in the standard place
|
||||||
$(INSTALLED_PYTHONW): install_Python
|
$(INSTALLED_PYTHONW): install_Python
|
||||||
|
|
@ -240,5 +246,5 @@ installunixtools: $(INSTALLED_PYTHON) $(INSTALLED_PYTHONW) $(srcdir)/Mac/OSX/pyt
|
||||||
# directories
|
# directories
|
||||||
dontinstallmacsubtree:
|
dontinstallmacsubtree:
|
||||||
l=`cd $(srcdir)/Mac/Lib; pwd`; \
|
l=`cd $(srcdir)/Mac/Lib; pwd`; \
|
||||||
echo $$l > $(LIBDEST)/site-packages/Mac.pth ; \
|
echo $$l > $(MACLIBDEST)/site-packages/Mac.pth ; \
|
||||||
echo $$l/lib-scriptpackages >> $(LIBDEST)/site-packages/Mac.pth
|
echo $$l/lib-scriptpackages >> $(MACLIBDEST)/site-packages/Mac.pth
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue