33# commandline in that case.
44
55# assume user was invoking from Mac/OSX directory and building in source tree
6- PYTHONBUILDDIR = ../..
7- PYTHONSRCDIR = ../..
6+ builddir = ../..
7+ srcdir = ../..
8+ VERSION =2.3
89
9- INSTALLDIR =/Library/Frameworks/Python.framework/Versions/Current
10+ prefix =/Library/Frameworks/Python.framework/Versions/$( VERSION )
1011PYTHONAPPSDIR =/Applications/Python
11- APPINSTALLDIR =$(PYTHONAPPSDIR ) /Python.app
12+ APPINSTALLDIR =$(prefix ) /Resources /Python.app
1213
1314# Variables for installing the "normal" unix binaries
1415UNIXBINDIR =/usr/local/bin
15- INSTALLED_PYTHON =$(INSTALLDIR ) /bin/python
16+ INSTALLED_PYTHON =$(prefix ) /bin/python
1617INSTALLED_PYTHONW =$(APPINSTALLDIR ) /Contents/MacOS/python
1718
1819# Items more-or-less copied from the main Makefile
19- VERSION =2.3
2020DIRMODE =755
2121INSTALL =/usr/bin/install -c
2222INSTALL_SYMLINK =/usr/bin/install -l as
@@ -26,32 +26,31 @@ INSTALL_DATA= ${INSTALL} -m 644
2626STRIPFLAG =-s
2727OPT =-g -O3 -Wall -Wstrict-prototypes -Wno-long-double -no-cpp-precomp \
2828 -fno-common -dynamic
29- INCLUDES =-I$(PYTHONBUILDDIR ) -I$(PYTHONSRCDIR ) /Include \
30- -I$(PYTHONSRCDIR ) /Mac/Include
29+ INCLUDES =-I$(builddir ) -I$(srcdir ) /Include -I$(srcdir ) /Mac/Include
3130DEFINES =-DHAVE_CONFIG_H
3231
3332CFLAGS =$(OPT ) $(DEFINES ) $(INCLUDES )
34- LDFLAGS =-F$(PYTHONBUILDDIR ) -framework System -framework Python -framework Carbon \
33+ LDFLAGS =-F$(builddir ) -framework System -framework Python -framework Carbon \
3534 -framework Foundation
3635CC =cc
3736LD =cc
3837REZ =/Developer/Tools/Rez
3938DEREZ =/Developer/Tools/DeRez
4039
41- OBJECTS =$(PYTHONBUILDDIR ) /Mac/Python/macmain.o \
42- $(PYTHONBUILDDIR ) /Mac/Python/macgetargv.o
40+ OBJECTS =$(builddir ) /Mac/Python/macmain.o \
41+ $(builddir ) /Mac/Python/macgetargv.o
4342
44- PYTHON =$(PYTHONBUILDDIR ) /python.exe
45- APPTEMPLATE =$(PYTHONSRCDIR ) /Mac/OSXResources/app
43+ PYTHON =$(builddir ) /python.exe
44+ APPTEMPLATE =$(srcdir ) /Mac/OSXResources/app
4645APPSUBDIRS =MacOS Resources Resources/English.lproj
47- RESOURCEDIR =$(PYTHONSRCDIR ) /Mac/Resources
46+ RESOURCEDIR =$(srcdir ) /Mac/Resources
4847RESOURCEFILE =python.rsrc
49- RFCONVERTER =$(PYTHONSRCDIR ) /Mac/Lib/applesingle.py
48+ RFCONVERTER =$(srcdir ) /Mac/Lib/applesingle.py
5049
5150install_all : install_PythonLauncher install_Python install_IDE
5251
5352install_PythonLauncher :
54- cd $(PYTHONSRCDIR ) /Mac/OSX/PythonLauncher/PythonLauncher.pbproj ; \
53+ cd $(srcdir ) /Mac/OSX/PythonLauncher/PythonLauncher.pbproj ; \
5554 pbxbuild -target PythonLauncher -buildstyle Deployment DSTROOT=/ install
5655
5756install_Python : pythonforbundle
@@ -102,12 +101,12 @@ install_Python: pythonforbundle
102101 $(INSTALL_DATA ) $(RESOURCEFILE ) $(APPINSTALLDIR ) /Contents/Resources/$(RESOURCEFILE )
103102
104103install_IDE : $(INSTALLED_PYTHONW )
105- $(INSTALLED_PYTHONW ) $(PYTHONSRCDIR ) /Mac/scripts/BuildApplet.py \
104+ $(INSTALLED_PYTHONW ) $(srcdir ) /Mac/scripts/BuildApplet.py \
106105 --output $(PYTHONAPPSDIR ) /PythonIDE.app --noargv \
107- $(PYTHONSRCDIR ) /Mac/Tools/IDE/PythonIDE.py
106+ $(srcdir ) /Mac/Tools/IDE/PythonIDE.py
108107
109- LIBDEST =$(INSTALLDIR ) /Mac/Lib
110- LIBSRC =$(PYTHONSRCDIR ) /Mac/Lib
108+ LIBDEST =$(prefix ) /Mac/Lib
109+ LIBSRC =$(srcdir ) /Mac/Lib
111110LIBSUBDIRS = \
112111 Carbon \
113112 lib-scriptpackages \
@@ -122,8 +121,8 @@ LIBSUBDIRS= \
122121 mkcwproject/template \
123122 mkcwproject/template-carbon \
124123 mkcwproject/template-ppc
125- TOOLSDEST =$(INSTALLDIR ) /Mac/Tools
126- TOOLSSRC =$(PYTHONSRCDIR ) /Mac/Tools
124+ TOOLSDEST =$(prefix ) /Mac/Tools
125+ TOOLSSRC =$(srcdir ) /Mac/Tools
127126TOOLSSUBDIRS =IDE
128127installmacsubtree :
129128 @for i in $(LIBDEST ) $(TOOLSDEST ) ; \
@@ -215,7 +214,7 @@ installmacsubtree:
215214 done ; \
216215 done
217216
218- $(INSTALL_DATA) $(PYTHONSRCDIR )/Mac/OSX/Mac.pth $(INSTALLDIR )/lib/python$(VERSION)/site-packages/
217+ $(INSTALL_DATA) $(srcdir )/Mac/OSX/Mac.pth $(prefix )/lib/python$(VERSION)/site-packages/
219218
220219# Put symlinks "python" and "pythonw" in the standard place
221220$(INSTALLED_PYTHONW ) : install_Python
@@ -229,17 +228,17 @@ installunixprograms: $(INSTALLED_PYTHON) $(INSTALLED_PYTHONW) pythonw.sh
229228# This is for development purposes: create a Mac.pth that refers to the source
230229# directories
231230dontinstallmacsubtree :
232- l=` cd $( PYTHONSRCDIR ) /Mac/Lib; pwd` ; \
233- echo $$ l > $(INSTALLDIR ) /lib/python$(VERSION ) /site-packages/Mac.pth ; \
234- echo $$ l/lib-scriptpackages >> $(INSTALLDIR ) /lib/python$(VERSION ) /site-packages/Mac.pth
231+ l=` cd $( srcdir ) /Mac/Lib; pwd` ; \
232+ echo $$ l > $(prefix ) /lib/python$(VERSION ) /site-packages/Mac.pth ; \
233+ echo $$ l/lib-scriptpackages >> $(prefix ) /lib/python$(VERSION ) /site-packages/Mac.pth
235234
236235pythonforbundle : $(OBJECTS )
237236 $(LD ) $(LDFLAGS ) $(OBJECTS ) -o pythonforbundle
238237
239238# Rules to build each file in OBJECTS - is there a better way?
240- $(PYTHONBUILDDIR ) /Mac/Python/macmain.o : $(PYTHONSRCDIR ) /Mac/Python/macmain.c
241- $(CC ) $(CFLAGS ) -c $(PYTHONSRCDIR ) /Mac/Python/macmain.c -o $@
239+ $(builddir ) /Mac/Python/macmain.o : $(srcdir ) /Mac/Python/macmain.c
240+ $(CC ) $(CFLAGS ) -c $(srcdir ) /Mac/Python/macmain.c -o $@
242241
243- $(PYTHONBUILDDIR ) /Mac/Python/macgetargv.o : $(PYTHONSRCDIR ) /Mac/Python/macgetargv.c
244- $(CC ) $(CFLAGS ) -c $(PYTHONSRCDIR ) /Mac/Python/macgetargv.c -o $@
242+ $(builddir ) /Mac/Python/macgetargv.o : $(srcdir ) /Mac/Python/macgetargv.c
243+ $(CC ) $(CFLAGS ) -c $(srcdir ) /Mac/Python/macgetargv.c -o $@
245244
0 commit comments