Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 1 | # This file can be invoked from the various frameworkinstall... targets in the |
| 2 | # main Makefile. The next couple of variables are overridden on the |
| 3 | # commandline in that case. |
| 4 | |
| 5 | VERSION=@VERSION@ |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 6 | builddir = .. |
| 7 | srcdir=@srcdir@ |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 8 | prefix=@prefix@ |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 9 | LIBDEST=$(prefix)/lib/python$(VERSION) |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 10 | RUNSHARED=@RUNSHARED@ |
| 11 | BUILDEXE=@BUILDEXEEXT@ |
| 12 | BUILDPYTHON=$(builddir)/python$(BUILDEXE) |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 13 | DESTDIR= |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 14 | LDFLAGS=@LDFLAGS@ |
| 15 | FRAMEWORKUNIXTOOLSPREFIX=@FRAMEWORKUNIXTOOLSPREFIX@ |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 16 | PYTHONFRAMEWORK=@PYTHONFRAMEWORK@ |
Ronald Oussoren | f29b6b4 | 2009-03-30 20:00:00 +0000 | [diff] [blame] | 17 | PYTHONFRAMEWORKIDENTIFIER=@PYTHONFRAMEWORKIDENTIFIER@ |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 18 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 19 | |
| 20 | # These are normally glimpsed from the previous set |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 21 | bindir=$(prefix)/bin |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 22 | PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION) |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 23 | APPINSTALLDIR=$(prefix)/Resources/Python.app |
| 24 | |
| 25 | # Variables for installing the "normal" unix binaries |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 26 | INSTALLED_PYTHONAPP=$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK) |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 27 | |
| 28 | # Items more-or-less copied from the main Makefile |
| 29 | DIRMODE=755 |
| 30 | FILEMODE=644 |
| 31 | INSTALL=@INSTALL@ |
| 32 | INSTALL_SYMLINK=ln -fsn |
| 33 | INSTALL_PROGRAM=@INSTALL_PROGRAM@ |
| 34 | INSTALL_SCRIPT= @INSTALL_SCRIPT@ |
| 35 | INSTALL_DATA=@INSTALL_DATA@ |
| 36 | LN=@LN@ |
| 37 | STRIPFLAG=-s |
| 38 | CPMAC=/Developer/Tools/CpMac |
| 39 | |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 40 | APPTEMPLATE=$(srcdir)/Resources/app |
Ronald Oussoren | f84d7e9 | 2009-05-19 11:27:25 +0000 | [diff] [blame] | 41 | APPSUBDIRS=MacOS Resources |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 42 | compileall=$(srcdir)/../Lib/compileall.py |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 43 | |
Georg Brandl | 59f8d83 | 2008-07-19 09:58:13 +0000 | [diff] [blame] | 44 | installapps: install_Python install_PythonLauncher install_IDLE \ |
| 45 | checkapplepython install_pythonw install_versionedtools |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 46 | |
Georg Brandl | 59f8d83 | 2008-07-19 09:58:13 +0000 | [diff] [blame] | 47 | installapps4way: install_Python4way install_PythonLauncher \ |
Ronald Oussoren | 672f62a | 2009-02-12 15:18:15 +0000 | [diff] [blame] | 48 | install_IDLE4way install_pythonw4way install_versionedtools |
Georg Brandl | fcaf910 | 2008-07-16 02:17:56 +0000 | [diff] [blame] | 49 | |
| 50 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 51 | install_pythonw: pythonw |
| 52 | $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)" |
| 53 | $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/python$(VERSION)" |
Ronald Oussoren | 38e2d8e | 2009-05-17 10:45:53 +0000 | [diff] [blame] | 54 | ln -sf python$(VERSION) "$(DESTDIR)$(prefix)/bin/python3" |
| 55 | ln -sf pythonw$(VERSION) "$(DESTDIR)$(prefix)/bin/pythonw3" |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 56 | |
Georg Brandl | fcaf910 | 2008-07-16 02:17:56 +0000 | [diff] [blame] | 57 | |
| 58 | # Install 3 variants of python/pythonw: |
| 59 | # - 32-bit (i386 and ppc) |
| 60 | # - 64-bit (x86_64 and ppc64) |
| 61 | # - all (all four architectures) |
| 62 | # - Make 'python' and 'pythonw' aliases for the 32-bit variant |
| 63 | install_pythonw4way: pythonw-32 pythonw-64 pythonw |
| 64 | $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-64 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-64" |
| 65 | $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-64 "$(DESTDIR)$(prefix)/bin/python$(VERSION)-64" |
Ronald Oussoren | 38e2d8e | 2009-05-17 10:45:53 +0000 | [diff] [blame] | 66 | ln -sf python$(VERSION)-64 "$(DESTDIR)$(prefix)/bin/python3-64" |
| 67 | ln -sf pythonw$(VERSION)-64 "$(DESTDIR)$(prefix)/bin/pythonw3-64" |
Georg Brandl | fcaf910 | 2008-07-16 02:17:56 +0000 | [diff] [blame] | 68 | |
| 69 | $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-32 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-32" |
| 70 | $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-32 "$(DESTDIR)$(prefix)/bin/python$(VERSION)-32" |
Ronald Oussoren | 38e2d8e | 2009-05-17 10:45:53 +0000 | [diff] [blame] | 71 | ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python3-32" |
| 72 | ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw3-32" |
Georg Brandl | fcaf910 | 2008-07-16 02:17:56 +0000 | [diff] [blame] | 73 | |
| 74 | $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-all" |
| 75 | $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/python$(VERSION)-all" |
Ronald Oussoren | 38e2d8e | 2009-05-17 10:45:53 +0000 | [diff] [blame] | 76 | ln -sf python$(VERSION)-all "$(DESTDIR)$(prefix)/bin/python3-all" |
| 77 | ln -sf pythonw$(VERSION)-all "$(DESTDIR)$(prefix)/bin/pythonw3-all" |
Georg Brandl | fcaf910 | 2008-07-16 02:17:56 +0000 | [diff] [blame] | 78 | |
| 79 | ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)" |
| 80 | ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python$(VERSION)" |
Ronald Oussoren | 38e2d8e | 2009-05-17 10:45:53 +0000 | [diff] [blame] | 81 | ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw3" |
| 82 | ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python3" |
Georg Brandl | fcaf910 | 2008-07-16 02:17:56 +0000 | [diff] [blame] | 83 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 84 | # |
| 85 | # Install unix tools in /usr/local/bin. These are just aliases for the |
| 86 | # actual installation inside the framework. |
| 87 | # |
| 88 | installunixtools: |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 89 | if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then \ |
| 90 | $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\ |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 91 | fi |
Ronald Oussoren | 38e2d8e | 2009-05-17 10:45:53 +0000 | [diff] [blame] | 92 | for fn in python3 pythonw3 idle3 pydoc3 python3-config \ |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 93 | python$(VERSION) pythonw$(VERSION) idle$(VERSION) \ |
Ronald Oussoren | afbca49 | 2009-05-26 21:18:59 +0000 | [diff] [blame^] | 94 | pydoc$(VERSION) python$(VERSION)-config 2to3 \ |
| 95 | 2to3-$(VERSION) ;\ |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 96 | do \ |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 97 | ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\ |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 98 | done |
| 99 | |
Georg Brandl | fcaf910 | 2008-07-16 02:17:56 +0000 | [diff] [blame] | 100 | |
| 101 | # TODO: install symlinks for -32, -64 and -all as well |
| 102 | installunixtools4way: installunixtools |
| 103 | |
| 104 | |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 105 | # |
| 106 | # Like installunixtools, but only install links to the versioned binaries. |
| 107 | # |
| 108 | altinstallunixtools: |
| 109 | if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then \ |
| 110 | $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\ |
| 111 | fi |
| 112 | for fn in python$(VERSION) pythonw$(VERSION) idle$(VERSION) \ |
Ronald Oussoren | afbca49 | 2009-05-26 21:18:59 +0000 | [diff] [blame^] | 113 | pydoc$(VERSION) python$(VERSION)-config 2to3-$(VERSION);\ |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 114 | do \ |
| 115 | ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\ |
| 116 | done |
| 117 | |
Georg Brandl | fcaf910 | 2008-07-16 02:17:56 +0000 | [diff] [blame] | 118 | # TODO: -32, -64 and -all variants |
| 119 | altinstallunixtools4way: altinstallunixtools |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 120 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 121 | # By default most tools are installed without a version in their basename, to |
| 122 | # make it easier to install (and use) several python versions side-by-side move |
| 123 | # the tools to a version-specific name and add the non-versioned name as an |
| 124 | # alias. |
| 125 | install_versionedtools: |
Georg Brandl | fcaf910 | 2008-07-16 02:17:56 +0000 | [diff] [blame] | 126 | for fn in idle pydoc ;\ |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 127 | do \ |
Ronald Oussoren | 38e2d8e | 2009-05-17 10:45:53 +0000 | [diff] [blame] | 128 | if [ -h "$(DESTDIR)$(prefix)/bin/$${fn}3" ]; then \ |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 129 | continue ;\ |
| 130 | fi ;\ |
Ronald Oussoren | 38e2d8e | 2009-05-17 10:45:53 +0000 | [diff] [blame] | 131 | mv "$(DESTDIR)$(prefix)/bin/$${fn}3" "$(DESTDIR)$(prefix)/bin/$${fn}$(VERSION)" ;\ |
| 132 | ln -sf "$${fn}$(VERSION)" "$(DESTDIR)$(prefix)/bin/$${fn}3" ;\ |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 133 | done |
Ronald Oussoren | afbca49 | 2009-05-26 21:18:59 +0000 | [diff] [blame^] | 134 | mv "$(DESTDIR)$(prefix)/bin/2to3" "$(DESTDIR)$(prefix)/bin/2to3-$(VERSION)" |
| 135 | ln -sf "$(DESTDIR)$(prefix)/bin/2to3-$(VERSION)" "$(DESTDIR)$(prefix)/bin/2to3" |
Ronald Oussoren | 38e2d8e | 2009-05-17 10:45:53 +0000 | [diff] [blame] | 136 | if [ ! -h "$(DESTDIR)$(prefix)/bin/python3-config" ]; then \ |
| 137 | mv "$(DESTDIR)$(prefix)/bin/python3-config" "$(DESTDIR)$(prefix)/bin/python$(VERSION)-config" ;\ |
| 138 | ln -sf "python$(VERSION)-config" "$(DESTDIR)$(prefix)/bin/python3-config" ; \ |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 139 | fi |
| 140 | |
| 141 | |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 142 | pythonw: $(srcdir)/Tools/pythonw.c Makefile |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 143 | $(CC) $(LDFLAGS) -o $@ $(srcdir)/Tools/pythonw.c \ |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 144 | -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"' |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 145 | |
Georg Brandl | fcaf910 | 2008-07-16 02:17:56 +0000 | [diff] [blame] | 146 | pythonw-32: $(srcdir)/Tools/pythonw.c Makefile |
| 147 | $(CC) $(LDFLAGS) -o $@ -arch i386 -arch ppc $(srcdir)/Tools/pythonw.c \ |
| 148 | -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-32"' |
| 149 | |
| 150 | pythonw-64: $(srcdir)/Tools/pythonw.c Makefile |
| 151 | $(CC) $(LDFLAGS) -o $@ -arch x86_64 -arch ppc64 $(srcdir)/Tools/pythonw.c \ |
| 152 | -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-64"' |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 153 | |
| 154 | install_PythonLauncher: |
| 155 | cd PythonLauncher && make install DESTDIR=$(DESTDIR) |
| 156 | |
| 157 | install_Python: |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 158 | @for i in "$(PYTHONAPPSDIR)" "$(APPINSTALLDIR)" "$(APPINSTALLDIR)/Contents"; do \ |
| 159 | if test ! -d "$(DESTDIR)$$i"; then \ |
| 160 | echo "Creating directory $(DESTDIR)$$i"; \ |
| 161 | $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$$i"; \ |
| 162 | fi;\ |
| 163 | done |
| 164 | @for i in $(APPSUBDIRS); do \ |
| 165 | if test ! -d "$(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; then \ |
| 166 | echo "Creating directory $(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; \ |
| 167 | $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; \ |
| 168 | else true; \ |
| 169 | fi; \ |
| 170 | done |
| 171 | @for d in . $(APPSUBDIRS); \ |
| 172 | do \ |
| 173 | a=$(APPTEMPLATE)/$$d; \ |
| 174 | if test ! -d $$a; then continue; else true; fi; \ |
| 175 | b="$(DESTDIR)$(APPINSTALLDIR)/Contents/$$d"; \ |
| 176 | for i in $$a/*; \ |
| 177 | do \ |
| 178 | case $$i in \ |
| 179 | *CVS) ;; \ |
| 180 | *.svn) ;; \ |
| 181 | *.py[co]) ;; \ |
| 182 | *.orig) ;; \ |
| 183 | *~) ;; \ |
| 184 | *idx) \ |
| 185 | echo $(CPMAC) "$$i" $$b; \ |
| 186 | $(CPMAC) "$$i" "$$b"; \ |
| 187 | ;; \ |
| 188 | *) \ |
| 189 | if test -d $$i; then continue; fi; \ |
| 190 | if test -x $$i; then \ |
| 191 | echo $(INSTALL_SCRIPT) "$$i" "$$b"; \ |
| 192 | $(INSTALL_SCRIPT) "$$i" "$$b"; \ |
| 193 | else \ |
| 194 | echo $(INSTALL_DATA) "$$i" "$$b"; \ |
| 195 | $(INSTALL_DATA) "$$i" "$$b"; \ |
| 196 | fi;; \ |
| 197 | esac; \ |
| 198 | done; \ |
| 199 | done |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 200 | $(INSTALL_PROGRAM) $(STRIPFLAG) $(BUILDPYTHON) "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)" |
Ronald Oussoren | f29b6b4 | 2009-03-30 20:00:00 +0000 | [diff] [blame] | 201 | sed -e "s!%bundleid%!$(PYTHONFRAMEWORKIDENTIFIER)!g" \ |
| 202 | -e "s!%version%!`$(RUNSHARED) $(BUILDPYTHON) \ |
| 203 | -c 'import platform; print(platform.python_version())'`!g" \ |
| 204 | < "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist.in" \ |
| 205 | > "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist" |
| 206 | rm "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist.in" |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 207 | |
Georg Brandl | fcaf910 | 2008-07-16 02:17:56 +0000 | [diff] [blame] | 208 | install_Python4way: install_Python |
| 209 | lipo -extract i386 -extract ppc7400 -output "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-32" "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)" |
| 210 | lipo -extract x86_64 -extract ppc64 -output "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-64" "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)" |
| 211 | |
| 212 | |
| 213 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 214 | install_IDLE: |
Benjamin Peterson | de9c869 | 2008-07-01 18:23:09 +0000 | [diff] [blame] | 215 | test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)" |
Ronald Oussoren | 827822e | 2009-02-12 15:01:44 +0000 | [diff] [blame] | 216 | -test -d "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" && rm -rf "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" |
Ronald Oussoren | af11860 | 2009-01-02 11:48:29 +0000 | [diff] [blame] | 217 | /bin/cp -PR "$(srcdir)/IDLE/IDLE.app" "$(DESTDIR)$(PYTHONAPPSDIR)" |
Ronald Oussoren | 672f62a | 2009-02-12 15:18:15 +0000 | [diff] [blame] | 218 | ln -sf "$(INSTALLED_PYTHONAPP)" "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/Python" |
Ronald Oussoren | af11860 | 2009-01-02 11:48:29 +0000 | [diff] [blame] | 219 | sed -e "s!%prefix%!$(prefix)!g" -e 's!%exe%!$(PYTHONFRAMEWORK)!g' < "$(srcdir)/IDLE/IDLE.app/Contents/MacOS/IDLE" > "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/IDLE" |
Ronald Oussoren | 2160015 | 2008-12-30 12:59:02 +0000 | [diff] [blame] | 220 | sed "s!%version%!`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`!g" < "$(srcdir)/IDLE/IDLE.app/Contents/Info.plist" > "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/Info.plist" |
Ronald Oussoren | 711b578 | 2009-02-12 15:12:03 +0000 | [diff] [blame] | 221 | if [ -f "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def" ]; then \ |
| 222 | /bin/cp -p "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def" \ |
| 223 | "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def~" ; \ |
| 224 | sed -e 's!name= IDLE Classic Windows!name= IDLE Classic OSX!g' \ |
| 225 | < "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def~" \ |
| 226 | > "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def" ; \ |
| 227 | rm "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def~" ; \ |
| 228 | fi |
| 229 | if [ -f "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def" ]; then \ |
| 230 | /bin/cp -p "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def" \ |
| 231 | "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def~" ; \ |
| 232 | sed -e 's!zoom-height=<Alt-Key-2>!zoom-height=<Option-Key-0>!g' \ |
| 233 | -e 's!<Alt-Key-!<Option-Key-!g' \ |
| 234 | < "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def~" \ |
| 235 | > "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def" ; \ |
| 236 | rm "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def~" ; \ |
| 237 | fi |
Benjamin Peterson | de9c869 | 2008-07-01 18:23:09 +0000 | [diff] [blame] | 238 | touch "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 239 | |
Ronald Oussoren | 672f62a | 2009-02-12 15:18:15 +0000 | [diff] [blame] | 240 | install_IDLE4way: install_IDLE |
| 241 | ln -sf "$(INSTALLED_PYTHONAPP)-32" "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/Python" |
| 242 | 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" |
| 243 | touch "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" |
| 244 | |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 245 | $(INSTALLED_PYTHONAPP): install_Python |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 246 | |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 247 | installextras: $(srcdir)/Extras.ReadMe.txt $(srcdir)/Extras.install.py |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 248 | $(INSTALL) -d "$(DESTDIR)$(PYTHONAPPSDIR)/Extras" |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 249 | $(INSTALL) $(srcdir)/Extras.ReadMe.txt "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/ReadMe.txt" |
| 250 | $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Extras.install.py $(srcdir)/../Demo \ |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 251 | "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/Demo" |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 252 | $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Extras.install.py $(srcdir)/Demo \ |
| 253 | "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/Demo.Mac" |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 254 | |
| 255 | |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 256 | checkapplepython: $(srcdir)/Tools/fixapplepython23.py |
| 257 | @if ! $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Tools/fixapplepython23.py -n; then \ |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 258 | echo "* WARNING: Apple-installed Python 2.3 will have trouble building extensions from now on."; \ |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 259 | echo "* WARNING: Run $(srcdir)/Tools/fixapplepython23.py with \"sudo\" to fix this."; \ |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 260 | fi |
| 261 | |
| 262 | |
| 263 | clean: |
| 264 | rm pythonw |
| 265 | cd PythonLauncher && make clean |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 266 | |
| 267 | Makefile: $(srcdir)/Makefile.in ../config.status |
| 268 | cd .. && CONFIG_FILES=Mac/Makefile CONFIG_HEADERS= $(SHELL) ./config.status |