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