diff options
Diffstat (limited to 'Mac/Makefile.in')
-rw-r--r-- | Mac/Makefile.in | 90 |
1 files changed, 24 insertions, 66 deletions
diff --git a/Mac/Makefile.in b/Mac/Makefile.in index 949e229034..5ab0ae5f09 100644 --- a/Mac/Makefile.in +++ b/Mac/Makefile.in @@ -15,13 +15,14 @@ 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 - # 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 @@ -40,19 +41,12 @@ STRIPFLAG=-s CPMAC=/Developer/Tools/CpMac APPTEMPLATE=$(srcdir)/Resources/app -APPSUBDIRS=MacOS Resources Resources/English.lproj \ - Resources/English.lproj/Documentation \ - Resources/English.lproj/Documentation/doc \ - Resources/English.lproj/Documentation/ide -DOCDIR=$(srcdir)/Resources/app/Resources/English.lproj/Documentation -DOCINDEX=$(DOCDIR)/"Documentation idx" +APPSUBDIRS=MacOS Resources CACHERSRC=$(srcdir)/scripts/cachersrc.py compileall=$(srcdir)/../Lib/compileall.py -installapps: install_Python install_BuildApplet install_PythonLauncher \ - install_IDLE checkapplepython install_pythonw install_versionedtools - -installapps4way: install_Python4way install_BuildApplet install_PythonLauncher install_IDLE install_pythonw4way install_versionedtools +installapps: install_Python install_pythonw install_BuildApplet install_PythonLauncher \ + install_IDLE checkapplepython install_versionedtools install_pythonw: pythonw @@ -60,33 +54,13 @@ install_pythonw: pythonw $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/python$(VERSION)" ln -sf python$(VERSION) "$(DESTDIR)$(prefix)/bin/python" ln -sf pythonw$(VERSION) "$(DESTDIR)$(prefix)/bin/pythonw" - - -# 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/python-64" - ln -sf pythonw$(VERSION)-64 "$(DESTDIR)$(prefix)/bin/pythonw-64" - - $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-32 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-32" - $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-32 "$(DESTDIR)$(prefix)/bin/python$(VERSION)-32" +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 python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python-32" ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw-32" +endif - $(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/python-all" - ln -sf pythonw$(VERSION)-all "$(DESTDIR)$(prefix)/bin/pythonw-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/pythonw" - ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python" # # Install unix tools in /usr/local/bin. These are just aliases for the @@ -96,18 +70,15 @@ installunixtools: if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then \ $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\ fi - for fn in python pythonw idle pydoc python-config smtpd.py \ + for fn in python pythonw idle pydoc python-config smtpd.py 2to3 \ python$(VERSION) pythonw$(VERSION) idle$(VERSION) \ - pydoc$(VERSION) python$(VERSION)-config smtpd$(VERSION).py ;\ + pydoc$(VERSION) python$(VERSION)-config smtpd$(VERSION).py \ + 2to3-$(VERSION) ;\ do \ ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\ done -# TODO: install symlinks for -32, -64 and -all as well -installunixtools4way: installunixtools - - # # Like installunixtools, but only install links to the versioned binaries. # @@ -120,9 +91,7 @@ altinstallunixtools: do \ ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\ done - -# TODO: -32, -64 and -all variants -altinstallunixtools4way: altinstallunixtools + ln -fs "$(prefix)/bin/2to3-$(VERSION)" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/2to3-$(VERSION)" ;\ # 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 @@ -145,29 +114,19 @@ install_versionedtools: mv "$(DESTDIR)$(prefix)/bin/smtpd.py" "$(DESTDIR)$(prefix)/bin/smtpd$(VERSION).py" ;\ ln -sf "smtpd$(VERSION).py" "$(DESTDIR)$(prefix)/bin/smtpd.py" ;\ fi + if [ ! -h "$(DESTDIR)$(prefix)/bin/2to3" ]; then \ + mv "$(DESTDIR)$(prefix)/bin/2to3" "$(DESTDIR)$(prefix)/bin/2to3-$(VERSION)" ;\ + ln -sf "2to3-$(VERSION)" "$(DESTDIR)$(prefix)/bin/2to3" ;\ + 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) install_Python: - @if test ! -f $(DOCINDEX); then \ - echo WARNING: you should run Apple Help Indexing Tool on $(DOCDIR); \ - fi @for i in "$(PYTHONAPPSDIR)" "$(APPINSTALLDIR)" "$(APPINSTALLDIR)/Contents"; do \ if test ! -d "$(DESTDIR)$$i"; then \ echo "Creating directory $(DESTDIR)$$i"; \ @@ -218,11 +177,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: cd IDLE && make install @@ -230,9 +184,13 @@ install_IDLE: install_BuildApplet: $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(srcdir)/scripts/BuildApplet.py \ --destroot "$(DESTDIR)" \ - --python=$(prefix)/Resources/Python.app/Contents/MacOS/$(PYTHONFRAMEWORK)`test -f "$(DESTDIR)$(prefix)/Resources/Python.app/Contents/MacOS/$(PYTHONFRAMEWORK)-32" && echo "-32"` \ + --python=$(prefix)/Resources/Python.app/Contents/MacOS/Python \ --output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app" \ $(srcdir)/scripts/BuildApplet.py +ifneq ($(LIPO_32BIT_FLAGS),) + rm "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app/Contents/MacOS/Python" + lipo $(LIPO_32BIT_FLAGS) -output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app/Contents/MacOS/Python" $(BUILDPYTHON) +endif MACLIBDEST=$(LIBDEST)/plat-mac MACTOOLSDEST=$(prefix)/Mac/Tools |