Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +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@ |
Ronald Oussoren | 32f5d8f | 2006-06-07 19:02:03 +0000 | [diff] [blame] | 6 | builddir = .. |
| 7 | srcdir=@srcdir@ |
Ronald Oussoren | 4fbb080 | 2006-06-11 20:23:29 +0000 | [diff] [blame] | 8 | prefix=@prefix@ |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 9 | LIBDEST=$(prefix)/lib/python$(VERSION) |
Ronald Oussoren | 32f5d8f | 2006-06-07 19:02:03 +0000 | [diff] [blame] | 10 | RUNSHARED=@RUNSHARED@ |
| 11 | BUILDEXE=@BUILDEXEEXT@ |
| 12 | BUILDPYTHON=$(builddir)/python$(BUILDEXE) |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 13 | DESTDIR= |
Ronald Oussoren | 32f5d8f | 2006-06-07 19:02:03 +0000 | [diff] [blame] | 14 | LDFLAGS=@LDFLAGS@ |
Ronald Oussoren | 5b78732 | 2006-06-06 19:50:24 +0000 | [diff] [blame] | 15 | FRAMEWORKUNIXTOOLSPREFIX=@FRAMEWORKUNIXTOOLSPREFIX@ |
Ronald Oussoren | 580c7fe | 2008-05-02 19:45:11 +0000 | [diff] [blame] | 16 | PYTHONFRAMEWORK=@PYTHONFRAMEWORK@ |
Ronald Oussoren | 354bb5c | 2009-03-30 19:56:25 +0000 | [diff] [blame] | 17 | PYTHONFRAMEWORKIDENTIFIER=@PYTHONFRAMEWORKIDENTIFIER@ |
Ronald Oussoren | 580c7fe | 2008-05-02 19:45:11 +0000 | [diff] [blame] | 18 | |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 19 | |
| 20 | # These are normally glimpsed from the previous set |
Ronald Oussoren | 32f5d8f | 2006-06-07 19:02:03 +0000 | [diff] [blame] | 21 | bindir=$(prefix)/bin |
Ronald Oussoren | 580c7fe | 2008-05-02 19:45:11 +0000 | [diff] [blame] | 22 | PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION) |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 23 | APPINSTALLDIR=$(prefix)/Resources/Python.app |
| 24 | |
| 25 | # Variables for installing the "normal" unix binaries |
Ronald Oussoren | 580c7fe | 2008-05-02 19:45:11 +0000 | [diff] [blame] | 26 | INSTALLED_PYTHONAPP=$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK) |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +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 | |
Ronald Oussoren | 32f5d8f | 2006-06-07 19:02:03 +0000 | [diff] [blame] | 40 | APPTEMPLATE=$(srcdir)/Resources/app |
Ronald Oussoren | 364b221 | 2009-05-19 20:12:17 +0000 | [diff] [blame] | 41 | APPSUBDIRS=MacOS Resources |
Ronald Oussoren | 32f5d8f | 2006-06-07 19:02:03 +0000 | [diff] [blame] | 42 | CACHERSRC=$(srcdir)/scripts/cachersrc.py |
| 43 | compileall=$(srcdir)/../Lib/compileall.py |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 44 | |
| 45 | installapps: install_Python install_BuildApplet install_PythonLauncher \ |
| 46 | install_IDLE checkapplepython install_pythonw install_versionedtools |
| 47 | |
Ronald Oussoren | 5640ce2 | 2008-06-05 12:58:24 +0000 | [diff] [blame] | 48 | installapps4way: install_Python4way install_BuildApplet install_PythonLauncher install_IDLE install_pythonw4way install_versionedtools |
| 49 | |
| 50 | |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +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)" |
| 54 | ln -sf python$(VERSION) "$(DESTDIR)$(prefix)/bin/python" |
| 55 | ln -sf pythonw$(VERSION) "$(DESTDIR)$(prefix)/bin/pythonw" |
| 56 | |
Ronald Oussoren | 5640ce2 | 2008-06-05 12:58:24 +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" |
| 66 | ln -sf python$(VERSION)-64 "$(DESTDIR)$(prefix)/bin/python-64" |
| 67 | ln -sf pythonw$(VERSION)-64 "$(DESTDIR)$(prefix)/bin/pythonw-64" |
| 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" |
| 71 | ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python-32" |
| 72 | ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw-32" |
| 73 | |
| 74 | $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-all" |
| 75 | $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/python$(VERSION)-all" |
| 76 | ln -sf python$(VERSION)-all "$(DESTDIR)$(prefix)/bin/python-all" |
| 77 | ln -sf pythonw$(VERSION)-all "$(DESTDIR)$(prefix)/bin/pythonw-all" |
| 78 | |
| 79 | ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)" |
| 80 | ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python$(VERSION)" |
| 81 | ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw" |
| 82 | ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python" |
| 83 | |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +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: |
Ronald Oussoren | 5b78732 | 2006-06-06 19:50:24 +0000 | [diff] [blame] | 89 | if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then \ |
| 90 | $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\ |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 91 | fi |
Ronald Oussoren | 5b78732 | 2006-06-06 19:50:24 +0000 | [diff] [blame] | 92 | for fn in python pythonw idle pydoc python-config smtpd.py \ |
| 93 | python$(VERSION) pythonw$(VERSION) idle$(VERSION) \ |
Ronald Oussoren | 5640ce2 | 2008-06-05 12:58:24 +0000 | [diff] [blame] | 94 | pydoc$(VERSION) python$(VERSION)-config smtpd$(VERSION).py ;\ |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 95 | do \ |
Ronald Oussoren | 5b78732 | 2006-06-06 19:50:24 +0000 | [diff] [blame] | 96 | ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\ |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 97 | done |
| 98 | |
Ronald Oussoren | 5640ce2 | 2008-06-05 12:58:24 +0000 | [diff] [blame] | 99 | |
| 100 | # TODO: install symlinks for -32, -64 and -all as well |
| 101 | installunixtools4way: installunixtools |
| 102 | |
| 103 | |
Ronald Oussoren | 5b78732 | 2006-06-06 19:50:24 +0000 | [diff] [blame] | 104 | # |
| 105 | # Like installunixtools, but only install links to the versioned binaries. |
| 106 | # |
| 107 | altinstallunixtools: |
| 108 | if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then \ |
| 109 | $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\ |
| 110 | fi |
| 111 | for fn in python$(VERSION) pythonw$(VERSION) idle$(VERSION) \ |
Mark Dickinson | 1b6c4c8 | 2008-06-25 15:29:32 +0000 | [diff] [blame] | 112 | pydoc$(VERSION) python$(VERSION)-config smtpd$(VERSION).py ;\ |
Ronald Oussoren | 5b78732 | 2006-06-06 19:50:24 +0000 | [diff] [blame] | 113 | do \ |
| 114 | ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\ |
| 115 | done |
| 116 | |
Ronald Oussoren | 5640ce2 | 2008-06-05 12:58:24 +0000 | [diff] [blame] | 117 | # TODO: -32, -64 and -all variants |
| 118 | altinstallunixtools4way: altinstallunixtools |
Ronald Oussoren | 5b78732 | 2006-06-06 19:50:24 +0000 | [diff] [blame] | 119 | |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 120 | # By default most tools are installed without a version in their basename, to |
| 121 | # make it easier to install (and use) several python versions side-by-side move |
| 122 | # the tools to a version-specific name and add the non-versioned name as an |
| 123 | # alias. |
| 124 | install_versionedtools: |
Ronald Oussoren | 5640ce2 | 2008-06-05 12:58:24 +0000 | [diff] [blame] | 125 | for fn in idle pydoc ;\ |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 126 | do \ |
Ronald Oussoren | da89b99 | 2006-05-23 11:04:24 +0000 | [diff] [blame] | 127 | if [ -h "$(DESTDIR)$(prefix)/bin/$${fn}" ]; then \ |
| 128 | continue ;\ |
| 129 | fi ;\ |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 130 | mv "$(DESTDIR)$(prefix)/bin/$${fn}" "$(DESTDIR)$(prefix)/bin/$${fn}$(VERSION)" ;\ |
Ronald Oussoren | 3e3cb79 | 2006-05-18 09:04:15 +0000 | [diff] [blame] | 131 | ln -sf "$${fn}$(VERSION)" "$(DESTDIR)$(prefix)/bin/$${fn}" ;\ |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 132 | done |
Ronald Oussoren | 5640ce2 | 2008-06-05 12:58:24 +0000 | [diff] [blame] | 133 | if [ ! -h "$(DESTDIR)$(prefix)/bin/python-config" ]; then \ |
| 134 | mv "$(DESTDIR)$(prefix)/bin/python-config" "$(DESTDIR)$(prefix)/bin/python$(VERSION)-config" ;\ |
| 135 | ln -sf "python$(VERSION)-config" "$(DESTDIR)$(prefix)/bin/python-config" ; \ |
| 136 | fi |
Ronald Oussoren | da89b99 | 2006-05-23 11:04:24 +0000 | [diff] [blame] | 137 | if [ ! -h "$(DESTDIR)$(prefix)/bin/smtpd.py" ]; then \ |
| 138 | mv "$(DESTDIR)$(prefix)/bin/smtpd.py" "$(DESTDIR)$(prefix)/bin/smtpd$(VERSION).py" ;\ |
| 139 | ln -sf "smtpd$(VERSION).py" "$(DESTDIR)$(prefix)/bin/smtpd.py" ;\ |
| 140 | fi |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 141 | |
| 142 | |
Ronald Oussoren | a6790f1 | 2006-09-17 19:23:27 +0000 | [diff] [blame] | 143 | pythonw: $(srcdir)/Tools/pythonw.c Makefile |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 144 | $(CC) $(LDFLAGS) -o $@ $(srcdir)/Tools/pythonw.c \ |
Ronald Oussoren | 580c7fe | 2008-05-02 19:45:11 +0000 | [diff] [blame] | 145 | -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"' |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 146 | |
Ronald Oussoren | 5640ce2 | 2008-06-05 12:58:24 +0000 | [diff] [blame] | 147 | pythonw-32: $(srcdir)/Tools/pythonw.c Makefile |
| 148 | $(CC) $(LDFLAGS) -o $@ -arch i386 -arch ppc $(srcdir)/Tools/pythonw.c \ |
| 149 | -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-32"' |
| 150 | |
| 151 | pythonw-64: $(srcdir)/Tools/pythonw.c Makefile |
| 152 | $(CC) $(LDFLAGS) -o $@ -arch x86_64 -arch ppc64 $(srcdir)/Tools/pythonw.c \ |
| 153 | -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-64"' |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 154 | |
| 155 | install_PythonLauncher: |
| 156 | cd PythonLauncher && make install DESTDIR=$(DESTDIR) |
| 157 | |
| 158 | install_Python: |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 159 | @for i in "$(PYTHONAPPSDIR)" "$(APPINSTALLDIR)" "$(APPINSTALLDIR)/Contents"; do \ |
| 160 | if test ! -d "$(DESTDIR)$$i"; then \ |
| 161 | echo "Creating directory $(DESTDIR)$$i"; \ |
| 162 | $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$$i"; \ |
| 163 | fi;\ |
| 164 | done |
| 165 | @for i in $(APPSUBDIRS); do \ |
| 166 | if test ! -d "$(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; then \ |
| 167 | echo "Creating directory $(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; \ |
| 168 | $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; \ |
| 169 | else true; \ |
| 170 | fi; \ |
| 171 | done |
| 172 | @for d in . $(APPSUBDIRS); \ |
| 173 | do \ |
| 174 | a=$(APPTEMPLATE)/$$d; \ |
| 175 | if test ! -d $$a; then continue; else true; fi; \ |
| 176 | b="$(DESTDIR)$(APPINSTALLDIR)/Contents/$$d"; \ |
| 177 | for i in $$a/*; \ |
| 178 | do \ |
| 179 | case $$i in \ |
| 180 | *CVS) ;; \ |
| 181 | *.svn) ;; \ |
| 182 | *.py[co]) ;; \ |
| 183 | *.orig) ;; \ |
| 184 | *~) ;; \ |
| 185 | *idx) \ |
| 186 | echo $(CPMAC) "$$i" $$b; \ |
| 187 | $(CPMAC) "$$i" "$$b"; \ |
| 188 | ;; \ |
| 189 | *) \ |
| 190 | if test -d $$i; then continue; fi; \ |
| 191 | if test -x $$i; then \ |
| 192 | echo $(INSTALL_SCRIPT) "$$i" "$$b"; \ |
| 193 | $(INSTALL_SCRIPT) "$$i" "$$b"; \ |
| 194 | else \ |
| 195 | echo $(INSTALL_DATA) "$$i" "$$b"; \ |
| 196 | $(INSTALL_DATA) "$$i" "$$b"; \ |
| 197 | fi;; \ |
| 198 | esac; \ |
| 199 | done; \ |
| 200 | done |
Ronald Oussoren | 580c7fe | 2008-05-02 19:45:11 +0000 | [diff] [blame] | 201 | $(INSTALL_PROGRAM) $(STRIPFLAG) $(BUILDPYTHON) "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)" |
Ronald Oussoren | 354bb5c | 2009-03-30 19:56:25 +0000 | [diff] [blame] | 202 | sed -e "s!%bundleid%!$(PYTHONFRAMEWORKIDENTIFIER)!g" \ |
| 203 | -e "s!%version%!`$(RUNSHARED) $(BUILDPYTHON) \ |
| 204 | -c 'import platform; print(platform.python_version())'`!g" \ |
| 205 | < "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist.in" \ |
| 206 | > "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist" |
| 207 | rm "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist.in" |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 208 | |
Ronald Oussoren | 5640ce2 | 2008-06-05 12:58:24 +0000 | [diff] [blame] | 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 | |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 215 | install_IDLE: |
| 216 | cd IDLE && make install |
| 217 | |
| 218 | install_BuildApplet: |
Ronald Oussoren | 5aa0b4d | 2008-07-22 07:06:33 +0000 | [diff] [blame] | 219 | $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(srcdir)/scripts/BuildApplet.py \ |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 220 | --destroot "$(DESTDIR)" \ |
Ronald Oussoren | 5640ce2 | 2008-06-05 12:58:24 +0000 | [diff] [blame] | 221 | --python=$(prefix)/Resources/Python.app/Contents/MacOS/$(PYTHONFRAMEWORK)`test -f "$(DESTDIR)$(prefix)/Resources/Python.app/Contents/MacOS/$(PYTHONFRAMEWORK)-32" && echo "-32"` \ |
Ronald Oussoren | 3e3cb79 | 2006-05-18 09:04:15 +0000 | [diff] [blame] | 222 | --output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app" \ |
Ronald Oussoren | 32f5d8f | 2006-06-07 19:02:03 +0000 | [diff] [blame] | 223 | $(srcdir)/scripts/BuildApplet.py |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 224 | |
| 225 | MACLIBDEST=$(LIBDEST)/plat-mac |
| 226 | MACTOOLSDEST=$(prefix)/Mac/Tools |
| 227 | MACTOOLSSRC=$(srcdir)/Mac/Tools |
| 228 | MACTOOLSSUBDIRS=IDE |
| 229 | |
| 230 | installmacsubtree: |
| 231 | @for i in $(MACTOOLSDEST); \ |
| 232 | do \ |
| 233 | if test ! -d $(DESTDIR)$$i; then \ |
| 234 | echo "Creating directory $(DESTDIR)$$i"; \ |
| 235 | $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ |
| 236 | else true; \ |
| 237 | fi; \ |
| 238 | done |
| 239 | @for d in $(MACTOOLSSUBDIRS); \ |
| 240 | do \ |
| 241 | a=$(MACTOOLSSRC)/$$d; \ |
| 242 | if test ! -d $$a; then continue; else true; fi; \ |
| 243 | b=$(DESTDIR)$(MACTOOLSDEST)/$$d; \ |
| 244 | if test ! -d $$b; then \ |
| 245 | echo "Creating directory $$b"; \ |
| 246 | $(INSTALL) -d -m $(DIRMODE) $$b; \ |
| 247 | else true; \ |
| 248 | fi; \ |
| 249 | done |
| 250 | @for d in $(MACTOOLSSUBDIRS); \ |
| 251 | do \ |
| 252 | a=$(MACTOOLSSRC)/$$d; \ |
| 253 | if test ! -d $$a; then continue; else true; fi; \ |
| 254 | b=$(DESTDIR)$(MACTOOLSDEST)/$$d; \ |
| 255 | for i in $$a/*; \ |
| 256 | do \ |
| 257 | case $$i in \ |
| 258 | *CVS) ;; \ |
| 259 | *.svn) ;; \ |
| 260 | *.py[co]) ;; \ |
| 261 | *.orig) ;; \ |
| 262 | *~) ;; \ |
| 263 | *.rsrc) \ |
| 264 | echo $(CPMAC) $$i $$b ; \ |
| 265 | $(CPMAC) $$i $$b ; \ |
| 266 | ;; \ |
| 267 | *) \ |
| 268 | if test -d $$i; then continue; fi; \ |
| 269 | if test -x $$i; then \ |
| 270 | echo $(INSTALL_SCRIPT) $$i $$b; \ |
| 271 | $(INSTALL_SCRIPT) $$i $$b; \ |
| 272 | else \ |
| 273 | echo $(INSTALL_DATA) $$i $$b; \ |
| 274 | $(INSTALL_DATA) $$i $$b; \ |
| 275 | fi;; \ |
| 276 | esac; \ |
| 277 | done; \ |
| 278 | done |
| 279 | |
| 280 | |
Ronald Oussoren | 5aa0b4d | 2008-07-22 07:06:33 +0000 | [diff] [blame] | 281 | $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(CACHERSRC) -v $(DESTDIR)$(MACLIBDEST) $(DESTDIR)$(MACTOOLSDEST) |
Ronald Oussoren | 32f5d8f | 2006-06-07 19:02:03 +0000 | [diff] [blame] | 282 | $(RUNSHARED) $(BUILDPYTHON) -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST) |
| 283 | $(RUNSHARED) $(BUILDPYTHON) -O -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST) |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 284 | |
Ronald Oussoren | 32f5d8f | 2006-06-07 19:02:03 +0000 | [diff] [blame] | 285 | $(INSTALLED_PYTHONAPP): install_Python |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 286 | |
Ronald Oussoren | 32f5d8f | 2006-06-07 19:02:03 +0000 | [diff] [blame] | 287 | installextras: $(srcdir)/Extras.ReadMe.txt $(srcdir)/Extras.install.py |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 288 | $(INSTALL) -d "$(DESTDIR)$(PYTHONAPPSDIR)/Extras" |
Ronald Oussoren | 32f5d8f | 2006-06-07 19:02:03 +0000 | [diff] [blame] | 289 | $(INSTALL) $(srcdir)/Extras.ReadMe.txt "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/ReadMe.txt" |
| 290 | $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Extras.install.py $(srcdir)/../Demo \ |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 291 | "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/Demo" |
Ronald Oussoren | 32f5d8f | 2006-06-07 19:02:03 +0000 | [diff] [blame] | 292 | $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Extras.install.py $(srcdir)/Demo \ |
| 293 | "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/Demo.Mac" |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 294 | |
| 295 | |
Ronald Oussoren | 32f5d8f | 2006-06-07 19:02:03 +0000 | [diff] [blame] | 296 | checkapplepython: $(srcdir)/Tools/fixapplepython23.py |
| 297 | @if ! $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Tools/fixapplepython23.py -n; then \ |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 298 | echo "* WARNING: Apple-installed Python 2.3 will have trouble building extensions from now on."; \ |
Ronald Oussoren | 32f5d8f | 2006-06-07 19:02:03 +0000 | [diff] [blame] | 299 | echo "* WARNING: Run $(srcdir)/Tools/fixapplepython23.py with \"sudo\" to fix this."; \ |
Ronald Oussoren | 836b039 | 2006-05-14 19:56:34 +0000 | [diff] [blame] | 300 | fi |
| 301 | |
| 302 | |
| 303 | clean: |
| 304 | rm pythonw |
| 305 | cd PythonLauncher && make clean |
| 306 | cd IDLE && make clean |
Ronald Oussoren | a6790f1 | 2006-09-17 19:23:27 +0000 | [diff] [blame] | 307 | |
| 308 | Makefile: $(srcdir)/Makefile.in ../config.status |
| 309 | cd .. && CONFIG_FILES=Mac/Makefile CONFIG_HEADERS= $(SHELL) ./config.status |