By popular demand the frameworkinstall target now installs everything:

the framework, the MacOSX apps and the unix tools.
Most of the hard work is done by Mac/OSX/Makefile.

Also, it should now be possible to install in a different directory,
such as /tmp/dist/Library/Frameworks, for building binary installers.
The fink crowd wanted this.
This commit is contained in:
Jack Jansen 2002-08-09 00:18:21 +00:00
parent 7bed213224
commit cb4321eb17
2 changed files with 52 additions and 31 deletions

View file

@ -1,18 +1,20 @@
# This file can be invoked from the "python.app" target in the
# main Makefile. The next two variables are overridden on the
# This file can be invoked from the various frameworkinstall... targets in the
# main Makefile. The next couple of variables are overridden on the
# commandline in that case.
# assume user was invoking from Mac/OSX directory and building in source tree
VERSION=2.3
builddir = ../..
srcdir = ../..
VERSION=2.3
LIBDEST=$(prefix)/lib/python$(VERSION)
prefix=/Library/Frameworks/Python.framework/Versions/$(VERSION)
PYTHONAPPSDIR=/Applications/Python
dstroot=/.
# These are normally glimpsed from the previous set
bindir=$(dstroot)/usr/local/bin
PYTHONAPPSDIR=$(dstroot)/Applications/Python
APPINSTALLDIR=$(prefix)/Resources/Python.app
# Variables for installing the "normal" unix binaries
UNIXBINDIR=/usr/local/bin
INSTALLED_PYTHON=$(prefix)/bin/python
INSTALLED_PYTHONW=$(APPINSTALLDIR)/Contents/MacOS/python
@ -27,7 +29,7 @@ STRIPFLAG=-s
OPT=-g -O3 -Wall -Wstrict-prototypes -Wno-long-double -no-cpp-precomp \
-fno-common -dynamic
INCLUDES=-I$(builddir) -I$(srcdir)/Include -I$(srcdir)/Mac/Include
DEFINES=-DHAVE_CONFIG_H
DEFINES=
CFLAGS=$(OPT) $(DEFINES) $(INCLUDES)
LDFLAGS=-F$(builddir) -framework System -framework Python -framework Carbon \
@ -44,11 +46,11 @@ RESOURCEDIR=$(srcdir)/Mac/Resources
RESOURCEFILE=python.rsrc
RFCONVERTER=$(srcdir)/Mac/Lib/applesingle.py
install_all: install_PythonLauncher install_Python install_BuildApplet install_IDE
installapps: install_PythonLauncher install_Python install_BuildApplet install_IDE
install_PythonLauncher:
cd $(srcdir)/Mac/OSX/PythonLauncher/PythonLauncher.pbproj ; \
pbxbuild -target PythonLauncher -buildstyle Deployment DSTROOT=/ install
pbxbuild -target PythonLauncher -buildstyle Deployment DSTROOT=$(dstroot) install
install_Python: $(PYTHON)
@for i in $(PYTHONAPPSDIR) $(APPINSTALLDIR) $(APPINSTALLDIR)/Contents; do \
@ -221,20 +223,22 @@ installmacsubtree:
done; \
done
$(INSTALL_DATA) $(srcdir)/Mac/OSX/Mac.pth $(prefix)/lib/python$(VERSION)/site-packages/
$(INSTALL_DATA) $(srcdir)/Mac/OSX/Mac.pth $(LIBDEST)/site-packages/
# Put symlinks "python" and "pythonw" in the standard place
$(INSTALLED_PYTHONW): install_Python
# $(INSTALLED_PYTHON) has to be done by the main Makefile, we cannot do that here.
installunixprograms: $(INSTALLED_PYTHON) $(INSTALLED_PYTHONW) pythonw.sh
$(INSTALL) -d $(UNIXBINDIR)
$(INSTALL_SYMLINK) $(INSTALLED_PYTHON) $(UNIXBINDIR)/python
$(INSTALL) pythonw.sh $(UNIXBINDIR)/pythonw
# $(INSTALLED_PYTHON) has to be done by the main Makefile, we cannot do that here.
# At least this rule will give an error if it doesn't exist.
installunixtools: $(INSTALLED_PYTHON) $(INSTALLED_PYTHONW) $(srcdir)/Mac/OSX/pythonw.sh
$(INSTALL) -d $(bindir)
$(INSTALL_SYMLINK) $(INSTALLED_PYTHON) $(bindir)/python
$(INSTALL) $(srcdir)/Mac/OSX/pythonw.sh $(bindir)/pythonw
# This is for development purposes: create a Mac.pth that refers to the source
# directories
dontinstallmacsubtree:
l=`cd $(srcdir)/Mac/Lib; pwd`; \
echo $$l > $(prefix)/lib/python$(VERSION)/site-packages/Mac.pth ; \
echo $$l/lib-scriptpackages >> $(prefix)/lib/python$(VERSION)/site-packages/Mac.pth
echo $$l > $(LIBDEST)/site-packages/Mac.pth ; \
echo $$l/lib-scriptpackages >> $(LIBDEST)/site-packages/Mac.pth

View file

@ -770,43 +770,60 @@ sharedinstall:
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED)
# Here are a couple of targets for MacOSX again, to install a full
# framework-based Python. frameworkinstall installs everything, the
# subtargets install specific parts. Much of the actual work is offloaded to
# the Makefile in Mac/OSX
#
frameworkinstall: frameworkinstallframework \
frameworkinstallapps frameworkinstallunixtools
# On install, we re-make the framework
# structure in the install location, /Library/Frameworks/ or the argument to
# --enable-framework. If --enable-framework has been specified then we have
# automatically set prefix to the location deep down in the framework, so we
# only have to cater for the structural bits of the framework.
frameworkinstall: frameworkinfrastructureinstall install
FRAMEWORKFINALDEST=$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)
frameworkinfrastructureinstall: $(LDLIBRARY)
frameworkinstallframework: frameworkinstallstructure install frameworkinstallmaclib
frameworkinstallstructure: $(LDLIBRARY)
@if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
echo Not configured with --enable-framework; \
exit 1; \
else true; \
fi
@for i in $(FRAMEWORKFINALDEST)/Resources/English.lproj $(FRAMEWORKFINALDEST)/lib; do\
@for i in $(prefix)/Resources/English.lproj $(prefix)/lib; do\
if test ! -d $$i; then \
echo "Creating directory $$i"; \
$(INSTALL) -d -m $(DIRMODE) $$i; \
else true; \
fi; \
done
$(LN) -fsn include/python$(VERSION) $(FRAMEWORKFINALDEST)/Headers
$(INSTALL_DATA) $(RESSRCDIR)/Info.plist $(FRAMEWORKFINALDEST)/Resources/Info.plist
$(INSTALL_DATA) $(RESSRCDIR)/version.plist $(FRAMEWORKFINALDEST)/Resources/version.plist
$(LN) -fsn include/python$(VERSION) $(prefix)/Headers
$(INSTALL_DATA) $(RESSRCDIR)/Info.plist $(prefix)/Resources/Info.plist
$(INSTALL_DATA) $(RESSRCDIR)/version.plist $(prefix)/Resources/version.plist
$(INSTALL_DATA) $(RESSRCDIR)/English.lproj/InfoPlist.strings \
$(FRAMEWORKFINALDEST)/Resources/English.lproj/InfoPlist.strings
$(prefix)/Resources/English.lproj/InfoPlist.strings
$(LN) -fsn $(VERSION) $(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
$(LN) -fsn Versions/Current/Python $(PYTHONFRAMEWORKINSTALLDIR)/Python
$(LN) -fsn Versions/Current/Headers $(PYTHONFRAMEWORKINSTALLDIR)/Headers
$(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKINSTALLDIR)/Resources
$(INSTALL_DATA) $(LDLIBRARY) $(PYTHONFRAMEWORKPREFIX)/$(LDLIBRARY)
# Build Python executable that can run GUI code. Another MacOSX pseudo
# target.
osxapps:
$(MAKE) -f $(srcdir)/Mac/OSX/Makefile installmacsubtree install_all \
srcdir=$(srcdir) builddir=.
# This installs Mac/Lib into the framework
frameworkinstallmaclib:
$(MAKE) -f $(srcdir)/Mac/OSX/Makefile installmacsubtree \
srcdir=$(srcdir) builddir=. prefix=$(prefix) LIBDEST=$(LIBDEST)
# This installs the IDE, the Launcher and other apps into /Applications
frameworkinstallapps:
$(MAKE) -f $(srcdir)/Mac/OSX/Makefile installapps \
srcdir=$(srcdir) builddir=. dstroot=$(PYTHONFRAMEWORKPREFIX)/../..
# This install the unix python and pythonw tools in /usr/local/bin
frameworkinstallunixtools:
$(MAKE) -f $(srcdir)/Mac/OSX/Makefile installunixtools \
srcdir=$(srcdir) builddir=. dstroot=$(PYTHONFRAMEWORKPREFIX)/../..
# Build the toplevel Makefile
Makefile.pre: Makefile.pre.in config.status