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