@@ -48,12 +48,42 @@ compileall=$(srcdir)/../Lib/compileall.py
4848installapps : install_PythonLauncher install_IDLE checkapplepython install_pythonw \
4949 install_versionedtools
5050
51+ installapps4way : install_Python4way install_BuildApplet install_PythonLauncher install_IDLE install_pythonw4way install_versionedtools
52+
53+
5154install_pythonw : pythonw
5255 $(INSTALL_PROGRAM ) $(STRIPFLAG ) pythonw " $( DESTDIR) $( prefix) /bin/pythonw$( VERSION) "
5356 $(INSTALL_PROGRAM ) $(STRIPFLAG ) pythonw " $( DESTDIR) $( prefix) /bin/python$( VERSION) "
5457 ln -sf python$(VERSION ) " $( DESTDIR) $( prefix) /bin/python"
5558 ln -sf pythonw$(VERSION ) " $( DESTDIR) $( prefix) /bin/pythonw"
5659
60+
61+ # Install 3 variants of python/pythonw:
62+ # - 32-bit (i386 and ppc)
63+ # - 64-bit (x86_64 and ppc64)
64+ # - all (all four architectures)
65+ # - Make 'python' and 'pythonw' aliases for the 32-bit variant
66+ install_pythonw4way : pythonw-32 pythonw-64 pythonw
67+ $(INSTALL_PROGRAM ) $(STRIPFLAG ) pythonw-64 " $( DESTDIR) $( prefix) /bin/pythonw$( VERSION) -64"
68+ $(INSTALL_PROGRAM ) $(STRIPFLAG ) pythonw-64 " $( DESTDIR) $( prefix) /bin/python$( VERSION) -64"
69+ ln -sf python$(VERSION ) -64 " $( DESTDIR) $( prefix) /bin/python-64"
70+ ln -sf pythonw$(VERSION ) -64 " $( DESTDIR) $( prefix) /bin/pythonw-64"
71+
72+ $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-32 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-32"
73+ $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-32 "$(DESTDIR)$(prefix)/bin/python$(VERSION)-32"
74+ ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python-32"
75+ ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw-32"
76+
77+ $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-all"
78+ $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/python$(VERSION)-all"
79+ ln -sf python$(VERSION)-all "$(DESTDIR)$(prefix)/bin/python-all"
80+ ln -sf pythonw$(VERSION)-all "$(DESTDIR)$(prefix)/bin/pythonw-all"
81+
82+ ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)"
83+ ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python$(VERSION)"
84+ ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw"
85+ ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python"
86+
5787#
5888# Install unix tools in /usr/local/bin. These are just aliases for the
5989# actual installation inside the framework.
@@ -64,11 +94,16 @@ installunixtools:
6494 fi
6595 for fn in python pythonw idle pydoc python-config smtpd.py \
6696 python$(VERSION ) pythonw$(VERSION ) idle$(VERSION ) \
67- pydoc$(VERSION ) python-config $(VERSION ) smtpd$(VERSION ) .py ; \
97+ pydoc$(VERSION ) python$(VERSION ) -config smtpd$(VERSION ) .py ; \
6898 do \
6999 ln -fs " $( prefix) /bin/$$ {fn}" " $( DESTDIR) $( FRAMEWORKUNIXTOOLSPREFIX) /bin/$$ {fn}" ; \
70100 done
71101
102+
103+ # TODO: install symlinks for -32, -64 and -all as well
104+ installunixtools4way : installunixtools
105+
106+
72107#
73108# Like installunixtools, but only install links to the versioned binaries.
74109#
@@ -77,25 +112,31 @@ altinstallunixtools:
77112 $(INSTALL ) -d -m $(DIRMODE ) " $( DESTDIR) $( FRAMEWORKUNIXTOOLSPREFIX) /bin" ; \
78113 fi
79114 for fn in python$( VERSION) pythonw$( VERSION) idle$( VERSION) \
80- pydoc$(VERSION ) python-config $(VERSION ) smtpd$(VERSION ) .py ; \
115+ pydoc$(VERSION ) python$(VERSION ) -config ) smtpd$(VERSION ) .py ; \
81116 do \
82117 ln -fs " $( prefix) /bin/$$ {fn}" " $( DESTDIR) $( FRAMEWORKUNIXTOOLSPREFIX) /bin/$$ {fn}" ; \
83118 done
84119
120+ # TODO: -32, -64 and -all variants
121+ altinstallunixtools4way : altinstallunixtools
85122
86123# By default most tools are installed without a version in their basename, to
87124# make it easier to install (and use) several python versions side-by-side move
88125# the tools to a version-specific name and add the non-versioned name as an
89126# alias.
90127install_versionedtools :
91- for fn in idle pydoc python-config ; \
128+ for fn in idle pydoc ; \
92129 do \
93130 if [ -h " $( DESTDIR) $( prefix) /bin/$$ {fn}" ]; then \
94131 continue ; \
95132 fi ; \
96133 mv " $( DESTDIR) $( prefix) /bin/$$ {fn}" " $( DESTDIR) $( prefix) /bin/$$ {fn}$( VERSION) " ; \
97134 ln -sf " $$ {fn}$( VERSION) " " $( DESTDIR) $( prefix) /bin/$$ {fn}" ; \
98135 done
136+ if [ ! -h " $( DESTDIR) $( prefix) /bin/python-config" ]; then \
137+ mv " $( DESTDIR) $( prefix) /bin/python-config" " $( DESTDIR) $( prefix) /bin/python$( VERSION) -config" ; \
138+ ln -sf " python$( VERSION) -config" " $( DESTDIR) $( prefix) /bin/python-config" ; \
139+ fi
99140 if [ ! -h " $( DESTDIR) $( prefix) /bin/smtpd.py" ]; then \
100141 mv " $( DESTDIR) $( prefix) /bin/smtpd.py" " $( DESTDIR) $( prefix) /bin/smtpd$( VERSION) .py" ; \
101142 ln -sf " smtpd$( VERSION) .py" " $( DESTDIR) $( prefix) /bin/smtpd.py" ; \
@@ -106,6 +147,13 @@ pythonw: $(srcdir)/Tools/pythonw.c Makefile
106147 $(CC ) $(LDFLAGS ) -o $@ $(srcdir ) /Tools/pythonw.c \
107148 -DPYTHONWEXECUTABLE=' "$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"'
108149
150+ pythonw-32 : $(srcdir ) /Tools/pythonw.c Makefile
151+ $(CC ) $(LDFLAGS ) -o $@ -arch i386 -arch ppc $(srcdir ) /Tools/pythonw.c \
152+ -DPYTHONWEXECUTABLE=' "$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-32"'
153+
154+ pythonw-64 : $(srcdir ) /Tools/pythonw.c Makefile
155+ $(CC ) $(LDFLAGS ) -o $@ -arch x86_64 -arch ppc64 $(srcdir ) /Tools/pythonw.c \
156+ -DPYTHONWEXECUTABLE=' "$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-64"'
109157
110158install_PythonLauncher :
111159 cd PythonLauncher && make install DESTDIR=$(DESTDIR )
@@ -158,6 +206,12 @@ install_Python:
158206 done
159207 $(INSTALL_PROGRAM ) $(STRIPFLAG ) $(BUILDPYTHON ) " $( DESTDIR) $( APPINSTALLDIR) /Contents/MacOS/$( PYTHONFRAMEWORK) "
160208
209+ install_Python4way : install_Python
210+ lipo -extract i386 -extract ppc7400 -output " $( DESTDIR) $( APPINSTALLDIR) /Contents/MacOS/$( PYTHONFRAMEWORK) -32" " $( DESTDIR) $( APPINSTALLDIR) /Contents/MacOS/$( PYTHONFRAMEWORK) "
211+ lipo -extract x86_64 -extract ppc64 -output " $( DESTDIR) $( APPINSTALLDIR) /Contents/MacOS/$( PYTHONFRAMEWORK) -64" " $( DESTDIR) $( APPINSTALLDIR) /Contents/MacOS/$( PYTHONFRAMEWORK) "
212+
213+
214+
161215install_IDLE :
162216 test -d " $( DESTDIR) $( PYTHONAPPSDIR) " || mkdir -p " $( DESTDIR) $( PYTHONAPPSDIR) "
163217 -test -d " $( DESTDIR) $( PYTHONAPPSDIR) /IDLE.app" && rm -r " $( DESTDIR) $( PYTHONAPPSDIR) /IDLE.app"
0 commit comments