diff options
Diffstat (limited to 'Mac/Makefile.in')
-rw-r--r-- | Mac/Makefile.in | 108 |
1 files changed, 17 insertions, 91 deletions
diff --git a/Mac/Makefile.in b/Mac/Makefile.in index 18db6415a8..5e57b57942 100644 --- a/Mac/Makefile.in +++ b/Mac/Makefile.in @@ -15,6 +15,8 @@ LDFLAGS=@LDFLAGS@ FRAMEWORKUNIXTOOLSPREFIX=@FRAMEWORKUNIXTOOLSPREFIX@ PYTHONFRAMEWORK=@PYTHONFRAMEWORK@ PYTHONFRAMEWORKIDENTIFIER=@PYTHONFRAMEWORKIDENTIFIER@ +LIPO_32BIT_FLAGS=@LIPO_32BIT_FLAGS@ +CC=@CC@ MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ export MACOSX_DEPLOYMENT_TARGET @@ -22,7 +24,7 @@ export MACOSX_DEPLOYMENT_TARGET # These are normally glimpsed from the previous set bindir=$(prefix)/bin -PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION) +PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION) APPINSTALLDIR=$(prefix)/Resources/Python.app # Variables for installing the "normal" unix binaries @@ -44,45 +46,20 @@ APPTEMPLATE=$(srcdir)/Resources/app APPSUBDIRS=MacOS Resources compileall=$(srcdir)/../Lib/compileall.py -installapps: install_Python install_PythonLauncher install_IDLE \ - checkapplepython install_pythonw install_versionedtools - -installapps4way: install_Python4way install_PythonLauncher \ - install_IDLE4way install_pythonw4way install_versionedtools - +installapps: install_Python install_pythonw install_PythonLauncher install_IDLE \ + checkapplepython install_pythonw: pythonw $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)" $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/python$(VERSION)" ln -sf python$(VERSION) "$(DESTDIR)$(prefix)/bin/python3" ln -sf pythonw$(VERSION) "$(DESTDIR)$(prefix)/bin/pythonw3" - - -# Install 3 variants of python/pythonw: -# - 32-bit (i386 and ppc) -# - 64-bit (x86_64 and ppc64) -# - all (all four architectures) -# - Make 'python' and 'pythonw' aliases for the 32-bit variant -install_pythonw4way: pythonw-32 pythonw-64 pythonw - $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-64 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-64" - $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-64 "$(DESTDIR)$(prefix)/bin/python$(VERSION)-64" - ln -sf python$(VERSION)-64 "$(DESTDIR)$(prefix)/bin/python3-64" - ln -sf pythonw$(VERSION)-64 "$(DESTDIR)$(prefix)/bin/pythonw3-64" - - $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-32 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-32" - $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-32 "$(DESTDIR)$(prefix)/bin/python$(VERSION)-32" - ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python3-32" - ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw3-32" - - $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-all" - $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/python$(VERSION)-all" - ln -sf python$(VERSION)-all "$(DESTDIR)$(prefix)/bin/python3-all" - ln -sf pythonw$(VERSION)-all "$(DESTDIR)$(prefix)/bin/pythonw3-all" - - ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)" - ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python$(VERSION)" - ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw3" - ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python3" +ifneq ($(LIPO_32BIT_FLAGS),) + lipo $(LIPO_32BIT_FLAGS) -output $(DESTDIR)$(prefix)/bin/python$(VERSION)-32 pythonw + lipo $(LIPO_32BIT_FLAGS) -output $(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-32 pythonw + ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw3-32" + ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python3-32" +endif # # Install unix tools in /usr/local/bin. These are just aliases for the @@ -101,10 +78,6 @@ installunixtools: done -# TODO: install symlinks for -32, -64 and -all as well -installunixtools4way: installunixtools - - # # Like installunixtools, but only install links to the versioned binaries. # @@ -118,43 +91,8 @@ altinstallunixtools: ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\ done -# TODO: -32, -64 and -all variants -altinstallunixtools4way: altinstallunixtools - -# By default most tools are installed without a version in their basename, to -# make it easier to install (and use) several python versions side-by-side move -# the tools to a version-specific name and add the non-versioned name as an -# alias. -install_versionedtools: - for fn in idle pydoc ;\ - do \ - if [ -h "$(DESTDIR)$(prefix)/bin/$${fn}3" ]; then \ - continue ;\ - fi ;\ - mv "$(DESTDIR)$(prefix)/bin/$${fn}3" "$(DESTDIR)$(prefix)/bin/$${fn}$(VERSION)" ;\ - ln -sf "$${fn}$(VERSION)" "$(DESTDIR)$(prefix)/bin/$${fn}3" ;\ - done - mv "$(DESTDIR)$(prefix)/bin/2to3" "$(DESTDIR)$(prefix)/bin/2to3-$(VERSION)" - ln -sf "2to3-$(VERSION)" "$(DESTDIR)$(prefix)/bin/2to3" - if [ ! -h "$(DESTDIR)$(prefix)/bin/python3-config" ]; then \ - mv "$(DESTDIR)$(prefix)/bin/python3-config" "$(DESTDIR)$(prefix)/bin/python$(VERSION)-config" ;\ - ln -sf "python$(VERSION)-config" "$(DESTDIR)$(prefix)/bin/python3-config" ; \ - fi - - pythonw: $(srcdir)/Tools/pythonw.c Makefile - $(CC) $(LDFLAGS) -o $@ $(srcdir)/Tools/pythonw.c \ - -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"' - -pythonw-32: $(srcdir)/Tools/pythonw.c Makefile - $(CC) $(LDFLAGS) -o pythonw-tmp.o $(srcdir)/Tools/pythonw.c \ - -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-32"' ;\ - lipo @LIPO_32BIT_FLAGS@ -output $@ pythonw-tmp.o ; rm pythonw-tmp.o - -pythonw-64: $(srcdir)/Tools/pythonw.c Makefile - $(CC) $(LDFLAGS) -o pythonw-tmp.o $(srcdir)/Tools/pythonw.c \ - -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-64"' ;\ - lipo @LIPO_64BIT_FLAGS@ -output $@ pythonw-tmp.o ; rm pythonw-tmp.o + $(CC) $(LDFLAGS) -DPYTHONFRAMEWORK='"$(PYTHONFRAMEWORK)"' -o $@ $(srcdir)/Tools/pythonw.c -I.. -I$(srcdir)/../Include ../$(PYTHONFRAMEWORK).framework/Versions/$(VERSION)/$(PYTHONFRAMEWORK) install_PythonLauncher: cd PythonLauncher && make install DESTDIR=$(DESTDIR) @@ -210,11 +148,6 @@ install_Python: > "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist" rm "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist.in" -install_Python4way: install_Python - lipo @LIPO_32BIT_FLAGS@ -output "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-32" "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)" - lipo @LIPO_64BIT_FLAGS@ -output "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-64" "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)" - - install_IDLE: test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)" @@ -242,20 +175,13 @@ install_IDLE: fi touch "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" -install_IDLE4way: install_IDLE - ln -sf "$(INSTALLED_PYTHONAPP)-32" "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/Python" - sed -e "s!%prefix%!$(prefix)!g" -e 's!%exe%!$(PYTHONFRAMEWORK)-32!g' < "$(srcdir)/IDLE/IDLE.app/Contents/MacOS/IDLE" > "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/IDLE" - touch "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" - $(INSTALLED_PYTHONAPP): install_Python -installextras: $(srcdir)/Extras.ReadMe.txt $(srcdir)/Extras.install.py - $(INSTALL) -d "$(DESTDIR)$(PYTHONAPPSDIR)/Extras" - $(INSTALL) $(srcdir)/Extras.ReadMe.txt "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/ReadMe.txt" - $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Extras.install.py $(srcdir)/../Demo \ - "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/Demo" - $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Extras.install.py $(srcdir)/Demo \ - "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/Demo.Mac" +installextras: $(srcdir)/Extras.install.py + $(INSTALL) -d "$(DESTDIR)$(prefix)/share/doc/python$(VERSION)/examples" + $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Extras.install.py $(srcdir)/../Tools \ + "$(DESTDIR)$(prefix)/share/doc/python$(VERSION)/examples/Tools" ; \ + chmod -R ugo+rX,go-w "$(DESTDIR)$(prefix)/share/doc/python$(VERSION)/examples/Tools" checkapplepython: $(srcdir)/Tools/fixapplepython23.py |