annotate Mac/Makefile.in @ 79675:c0a2294de787 2.7

Issue #16199: Backport 2to3 typo fix from 3.2.
author Chris Jerdonek <chris.jerdonek@gmail.com>
date Thu, 11 Oct 2012 16:15:46 -0700
parents 499796937b7a
children c2830debb15a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
1 # This file can be invoked from the various frameworkinstall... targets in the
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
2 # main Makefile. The next couple of variables are overridden on the
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
3 # commandline in that case.
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
4
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
5 VERSION=@VERSION@
38646
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
6 builddir = ..
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
7 srcdir=@srcdir@
38751
cbf272f479d1 Use configure to substitute the correct prefix instead of hardcoding
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38646
diff changeset
8 prefix=@prefix@
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
9 LIBDEST=$(prefix)/lib/python$(VERSION)
38646
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
10 RUNSHARED=@RUNSHARED@
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
11 BUILDEXE=@BUILDEXEEXT@
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
12 BUILDPYTHON=$(builddir)/python$(BUILDEXE)
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
13 DESTDIR=
38646
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
14 LDFLAGS=@LDFLAGS@
38635
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
15 FRAMEWORKUNIXTOOLSPREFIX=@FRAMEWORKUNIXTOOLSPREFIX@
46626
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39853
diff changeset
16 PYTHONFRAMEWORK=@PYTHONFRAMEWORK@
52465
0e38b941d9e4 Merged revisions 70741 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 48048
diff changeset
17 PYTHONFRAMEWORKIDENTIFIER=@PYTHONFRAMEWORKIDENTIFIER@
57913
aaeb65bab3c0 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54213
diff changeset
18 LIPO_32BIT_FLAGS=@LIPO_32BIT_FLAGS@
58397
0c8cbdbafaad - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 57913
diff changeset
19 CC=@CC@
60774
4e5c6b29d929 Ensure framework actually installs after earlier
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 60700
diff changeset
20 MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
4e5c6b29d929 Ensure framework actually installs after earlier
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 60700
diff changeset
21 export MACOSX_DEPLOYMENT_TARGET
46626
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39853
diff changeset
22
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
23 # These are normally glimpsed from the previous set
38646
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
24 bindir=$(prefix)/bin
61113
c2e0b93f869f Fix for issue #3646: with this patch it is possible to do a
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 60749
diff changeset
25 PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
26 APPINSTALLDIR=$(prefix)/Resources/Python.app
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
27
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
28 # Variables for installing the "normal" unix binaries
46626
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39853
diff changeset
29 INSTALLED_PYTHONAPP=$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
30
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
31 # Items more-or-less copied from the main Makefile
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
32 DIRMODE=755
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
33 FILEMODE=644
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
34 INSTALL=@INSTALL@
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
35 INSTALL_SYMLINK=ln -fsn
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
36 INSTALL_PROGRAM=@INSTALL_PROGRAM@
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
37 INSTALL_SCRIPT= @INSTALL_SCRIPT@
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
38 INSTALL_DATA=@INSTALL_DATA@
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
39 LN=@LN@
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
40 STRIPFLAG=-s
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
41 CPMAC=/Developer/Tools/CpMac
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
42
38646
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
43 APPTEMPLATE=$(srcdir)/Resources/app
54213
056283a5c5da Remove some old MacPython files that are no longer relevant.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 52465
diff changeset
44 APPSUBDIRS=MacOS Resources
38646
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
45 CACHERSRC=$(srcdir)/scripts/cachersrc.py
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
46 compileall=$(srcdir)/../Lib/compileall.py
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
47
57913
aaeb65bab3c0 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54213
diff changeset
48 installapps: install_Python install_pythonw install_BuildApplet install_PythonLauncher \
aaeb65bab3c0 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54213
diff changeset
49 install_IDLE checkapplepython install_versionedtools
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46626
diff changeset
50
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46626
diff changeset
51
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
52 install_pythonw: pythonw
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
53 $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)"
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
54 $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/python$(VERSION)"
75022
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
55 ln -sf python$(VERSION) "$(DESTDIR)$(prefix)/bin/python2"
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
56 ln -sf python2 "$(DESTDIR)$(prefix)/bin/python"
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
57 ln -sf pythonw$(VERSION) "$(DESTDIR)$(prefix)/bin/pythonw2"
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
58 ln -sf pythonw2 "$(DESTDIR)$(prefix)/bin/pythonw"
57913
aaeb65bab3c0 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54213
diff changeset
59 ifneq ($(LIPO_32BIT_FLAGS),)
aaeb65bab3c0 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54213
diff changeset
60 lipo $(LIPO_32BIT_FLAGS) -output $(DESTDIR)$(prefix)/bin/python$(VERSION)-32 pythonw
aaeb65bab3c0 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54213
diff changeset
61 lipo $(LIPO_32BIT_FLAGS) -output $(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-32 pythonw
75022
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
62 ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python2-32"
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
63 ln -sf python2-32 "$(DESTDIR)$(prefix)/bin/python-32"
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
64 ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw2-32"
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
65 ln -sf pythonw2-32 "$(DESTDIR)$(prefix)/bin/pythonw-32"
57913
aaeb65bab3c0 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54213
diff changeset
66 endif
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46626
diff changeset
67
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46626
diff changeset
68
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
69 #
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
70 # Install unix tools in /usr/local/bin. These are just aliases for the
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
71 # actual installation inside the framework.
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
72 #
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
73 installunixtools:
38635
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
74 if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then \
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
75 $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
76 fi
63282
071609060f05 Fix for issue 9392: without this patch a framework build will not install
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61113
diff changeset
77 for fn in python pythonw idle pydoc python-config smtpd.py 2to3 \
75022
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
78 python2 pythonw2 idle2 \
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
79 pydoc2 python2-config smtpd2.py \
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
80 2to3-2 \
38635
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
81 python$(VERSION) pythonw$(VERSION) idle$(VERSION) \
63282
071609060f05 Fix for issue 9392: without this patch a framework build will not install
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61113
diff changeset
82 pydoc$(VERSION) python$(VERSION)-config smtpd$(VERSION).py \
071609060f05 Fix for issue 9392: without this patch a framework build will not install
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61113
diff changeset
83 2to3-$(VERSION) ;\
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
84 do \
38635
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
85 ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
86 done
70462
a2f088cf7ced Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
Ned Deily <nad@acm.org>
parents: 68256
diff changeset
87 ifneq ($(LIPO_32BIT_FLAGS),)
a2f088cf7ced Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
Ned Deily <nad@acm.org>
parents: 68256
diff changeset
88 for fn in python-32 pythonw-32 \
75022
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
89 python2-32 pythonw2-32 \
70462
a2f088cf7ced Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
Ned Deily <nad@acm.org>
parents: 68256
diff changeset
90 python$(VERSION)-32 pythonw$(VERSION)-32 ;\
a2f088cf7ced Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
Ned Deily <nad@acm.org>
parents: 68256
diff changeset
91 do \
a2f088cf7ced Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
Ned Deily <nad@acm.org>
parents: 68256
diff changeset
92 ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
a2f088cf7ced Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
Ned Deily <nad@acm.org>
parents: 68256
diff changeset
93 done
a2f088cf7ced Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
Ned Deily <nad@acm.org>
parents: 68256
diff changeset
94 endif
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
95
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46626
diff changeset
96
38635
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
97 #
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
98 # Like installunixtools, but only install links to the versioned binaries.
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
99 #
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
100 altinstallunixtools:
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
101 if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then \
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
102 $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
103 fi
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
104 for fn in python$(VERSION) pythonw$(VERSION) idle$(VERSION) \
47827
7de038550523 issue #3199: Fix typo in Mac/Makefile.in
Mark Dickinson <dickinsm@gmail.com>
parents: 47473
diff changeset
105 pydoc$(VERSION) python$(VERSION)-config smtpd$(VERSION).py ;\
38635
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
106 do \
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
107 ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
108 done
70462
a2f088cf7ced Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
Ned Deily <nad@acm.org>
parents: 68256
diff changeset
109 ifneq ($(LIPO_32BIT_FLAGS),)
a2f088cf7ced Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
Ned Deily <nad@acm.org>
parents: 68256
diff changeset
110 for fn in python$(VERSION)-32 pythonw$(VERSION)-32 ;\
a2f088cf7ced Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
Ned Deily <nad@acm.org>
parents: 68256
diff changeset
111 do \
a2f088cf7ced Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
Ned Deily <nad@acm.org>
parents: 68256
diff changeset
112 ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
a2f088cf7ced Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
Ned Deily <nad@acm.org>
parents: 68256
diff changeset
113 done
a2f088cf7ced Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
Ned Deily <nad@acm.org>
parents: 68256
diff changeset
114 endif
63282
071609060f05 Fix for issue 9392: without this patch a framework build will not install
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61113
diff changeset
115 ln -fs "$(prefix)/bin/2to3-$(VERSION)" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/2to3-$(VERSION)" ;\
38635
1e8b59389e2e * Ensure that "make altinstall" works when the tree was configured
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38581
diff changeset
116
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
117 # By default most tools are installed without a version in their basename, to
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
118 # make it easier to install (and use) several python versions side-by-side move
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
119 # the tools to a version-specific name and add the non-versioned name as an
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
120 # alias.
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
121 install_versionedtools:
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46626
diff changeset
122 for fn in idle pydoc ;\
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
123 do \
38245
6a6c5492b9ad Avoid creating a mess when installing a framework for the second time.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38215
diff changeset
124 if [ -h "$(DESTDIR)$(prefix)/bin/$${fn}" ]; then \
6a6c5492b9ad Avoid creating a mess when installing a framework for the second time.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38215
diff changeset
125 continue ;\
6a6c5492b9ad Avoid creating a mess when installing a framework for the second time.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38215
diff changeset
126 fi ;\
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
127 mv "$(DESTDIR)$(prefix)/bin/$${fn}" "$(DESTDIR)$(prefix)/bin/$${fn}$(VERSION)" ;\
75022
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
128 ln -sf "$${fn}$(VERSION)" "$(DESTDIR)$(prefix)/bin/$${fn}2" ;\
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
129 ln -sf "$${fn}2" "$(DESTDIR)$(prefix)/bin/$${fn}" ;\
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
130 done
38245
6a6c5492b9ad Avoid creating a mess when installing a framework for the second time.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38215
diff changeset
131 if [ ! -h "$(DESTDIR)$(prefix)/bin/smtpd.py" ]; then \
6a6c5492b9ad Avoid creating a mess when installing a framework for the second time.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38215
diff changeset
132 mv "$(DESTDIR)$(prefix)/bin/smtpd.py" "$(DESTDIR)$(prefix)/bin/smtpd$(VERSION).py" ;\
75022
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
133 ln -sf "smtpd$(VERSION).py" "$(DESTDIR)$(prefix)/bin/smtpd2.py" ;\
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
134 ln -sf "smtpd2.py" "$(DESTDIR)$(prefix)/bin/smtpd.py" ;\
38245
6a6c5492b9ad Avoid creating a mess when installing a framework for the second time.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38215
diff changeset
135 fi
63282
071609060f05 Fix for issue 9392: without this patch a framework build will not install
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61113
diff changeset
136 if [ ! -h "$(DESTDIR)$(prefix)/bin/2to3" ]; then \
071609060f05 Fix for issue 9392: without this patch a framework build will not install
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61113
diff changeset
137 mv "$(DESTDIR)$(prefix)/bin/2to3" "$(DESTDIR)$(prefix)/bin/2to3-$(VERSION)" ;\
75022
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
138 ln -sf "2to3-$(VERSION)" "$(DESTDIR)$(prefix)/bin/2to3-2" ;\
499796937b7a Issue #12627: Implement PEP 394 for OS X framework builds.
Ned Deily <nad@acm.org>
parents: 70462
diff changeset
139 ln -sf "2to3-2" "$(DESTDIR)$(prefix)/bin/2to3" ;\
63282
071609060f05 Fix for issue 9392: without this patch a framework build will not install
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 61113
diff changeset
140 fi
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
141
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
142
39853
bb9e914ede05 Tweak Mac/Makefile in to ensure that pythonw gets rebuild when the major version
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38751
diff changeset
143 pythonw: $(srcdir)/Tools/pythonw.c Makefile
59429
2990bd3ae883 Fix for issue #7998: pythonw didn't work when --with-framework-name was
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 58397
diff changeset
144 $(CC) $(LDFLAGS) -DPYTHONFRAMEWORK='"$(PYTHONFRAMEWORK)"' -o $@ $(srcdir)/Tools/pythonw.c -I.. -I$(srcdir)/../Include ../$(PYTHONFRAMEWORK).framework/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
145
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
146 install_PythonLauncher:
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
147 cd PythonLauncher && make install DESTDIR=$(DESTDIR)
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
148
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
149 install_Python:
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
150 @for i in "$(PYTHONAPPSDIR)" "$(APPINSTALLDIR)" "$(APPINSTALLDIR)/Contents"; do \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
151 if test ! -d "$(DESTDIR)$$i"; then \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
152 echo "Creating directory $(DESTDIR)$$i"; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
153 $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$$i"; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
154 fi;\
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
155 done
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
156 @for i in $(APPSUBDIRS); do \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
157 if test ! -d "$(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; then \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
158 echo "Creating directory $(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
159 $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
160 else true; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
161 fi; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
162 done
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
163 @for d in . $(APPSUBDIRS); \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
164 do \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
165 a=$(APPTEMPLATE)/$$d; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
166 if test ! -d $$a; then continue; else true; fi; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
167 b="$(DESTDIR)$(APPINSTALLDIR)/Contents/$$d"; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
168 for i in $$a/*; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
169 do \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
170 case $$i in \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
171 *CVS) ;; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
172 *.svn) ;; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
173 *.py[co]) ;; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
174 *.orig) ;; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
175 *~) ;; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
176 *idx) \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
177 echo $(CPMAC) "$$i" $$b; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
178 $(CPMAC) "$$i" "$$b"; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
179 ;; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
180 *) \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
181 if test -d $$i; then continue; fi; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
182 if test -x $$i; then \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
183 echo $(INSTALL_SCRIPT) "$$i" "$$b"; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
184 $(INSTALL_SCRIPT) "$$i" "$$b"; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
185 else \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
186 echo $(INSTALL_DATA) "$$i" "$$b"; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
187 $(INSTALL_DATA) "$$i" "$$b"; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
188 fi;; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
189 esac; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
190 done; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
191 done
46626
a1c6f2ab597e Fix for issue #2573: Can't change the framework name on OS X builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39853
diff changeset
192 $(INSTALL_PROGRAM) $(STRIPFLAG) $(BUILDPYTHON) "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"
52465
0e38b941d9e4 Merged revisions 70741 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 48048
diff changeset
193 sed -e "s!%bundleid%!$(PYTHONFRAMEWORKIDENTIFIER)!g" \
0e38b941d9e4 Merged revisions 70741 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 48048
diff changeset
194 -e "s!%version%!`$(RUNSHARED) $(BUILDPYTHON) \
0e38b941d9e4 Merged revisions 70741 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 48048
diff changeset
195 -c 'import platform; print(platform.python_version())'`!g" \
0e38b941d9e4 Merged revisions 70741 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 48048
diff changeset
196 < "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist.in" \
0e38b941d9e4 Merged revisions 70741 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 48048
diff changeset
197 > "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist"
0e38b941d9e4 Merged revisions 70741 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 48048
diff changeset
198 rm "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist.in"
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
199
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 46626
diff changeset
200
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
201 install_IDLE:
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
202 cd IDLE && make install
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
203
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
204 install_BuildApplet:
48048
96a9ebfee2cd Fix build issue on OSX 10.4, somehow this wasn't committed before.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47827
diff changeset
205 $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(srcdir)/scripts/BuildApplet.py \
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
206 --destroot "$(DESTDIR)" \
57913
aaeb65bab3c0 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54213
diff changeset
207 --python=$(prefix)/Resources/Python.app/Contents/MacOS/Python \
38215
c64cd271acea Fix some minor issues with the generated application bundles on MacOSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38178
diff changeset
208 --output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app" \
38646
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
209 $(srcdir)/scripts/BuildApplet.py
57913
aaeb65bab3c0 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54213
diff changeset
210 ifneq ($(LIPO_32BIT_FLAGS),)
aaeb65bab3c0 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54213
diff changeset
211 rm "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app/Contents/MacOS/Python"
aaeb65bab3c0 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54213
diff changeset
212 lipo $(LIPO_32BIT_FLAGS) -output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app/Contents/MacOS/Python" $(BUILDPYTHON)
aaeb65bab3c0 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 54213
diff changeset
213 endif
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
214
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
215 MACLIBDEST=$(LIBDEST)/plat-mac
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
216 MACTOOLSDEST=$(prefix)/Mac/Tools
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
217 MACTOOLSSRC=$(srcdir)/Mac/Tools
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
218 MACTOOLSSUBDIRS=IDE
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
219
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
220 installmacsubtree:
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
221 @for i in $(MACTOOLSDEST); \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
222 do \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
223 if test ! -d $(DESTDIR)$$i; then \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
224 echo "Creating directory $(DESTDIR)$$i"; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
225 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
226 else true; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
227 fi; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
228 done
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
229 @for d in $(MACTOOLSSUBDIRS); \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
230 do \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
231 a=$(MACTOOLSSRC)/$$d; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
232 if test ! -d $$a; then continue; else true; fi; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
233 b=$(DESTDIR)$(MACTOOLSDEST)/$$d; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
234 if test ! -d $$b; then \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
235 echo "Creating directory $$b"; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
236 $(INSTALL) -d -m $(DIRMODE) $$b; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
237 else true; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
238 fi; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
239 done
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
240 @for d in $(MACTOOLSSUBDIRS); \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
241 do \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
242 a=$(MACTOOLSSRC)/$$d; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
243 if test ! -d $$a; then continue; else true; fi; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
244 b=$(DESTDIR)$(MACTOOLSDEST)/$$d; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
245 for i in $$a/*; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
246 do \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
247 case $$i in \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
248 *CVS) ;; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
249 *.svn) ;; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
250 *.py[co]) ;; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
251 *.orig) ;; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
252 *~) ;; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
253 *.rsrc) \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
254 echo $(CPMAC) $$i $$b ; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
255 $(CPMAC) $$i $$b ; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
256 ;; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
257 *) \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
258 if test -d $$i; then continue; fi; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
259 if test -x $$i; then \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
260 echo $(INSTALL_SCRIPT) $$i $$b; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
261 $(INSTALL_SCRIPT) $$i $$b; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
262 else \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
263 echo $(INSTALL_DATA) $$i $$b; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
264 $(INSTALL_DATA) $$i $$b; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
265 fi;; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
266 esac; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
267 done; \
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
268 done
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
269
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
270
48048
96a9ebfee2cd Fix build issue on OSX 10.4, somehow this wasn't committed before.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47827
diff changeset
271 $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(CACHERSRC) -v $(DESTDIR)$(MACLIBDEST) $(DESTDIR)$(MACTOOLSDEST)
38646
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
272 $(RUNSHARED) $(BUILDPYTHON) -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
273 $(RUNSHARED) $(BUILDPYTHON) -O -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
274
38646
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
275 $(INSTALLED_PYTHONAPP): install_Python
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
276
38646
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
277 installextras: $(srcdir)/Extras.ReadMe.txt $(srcdir)/Extras.install.py
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
278 $(INSTALL) -d "$(DESTDIR)$(PYTHONAPPSDIR)/Extras"
38646
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
279 $(INSTALL) $(srcdir)/Extras.ReadMe.txt "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/ReadMe.txt"
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
280 $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Extras.install.py $(srcdir)/../Demo \
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
281 "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/Demo"
38646
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
282 $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Extras.install.py $(srcdir)/Demo \
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
283 "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/Demo.Mac"
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
284
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
285
38646
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
286 checkapplepython: $(srcdir)/Tools/fixapplepython23.py
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
287 @if ! $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Tools/fixapplepython23.py -n; then \
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
288 echo "* WARNING: Apple-installed Python 2.3 will have trouble building extensions from now on."; \
38646
1b47d030c3fa Move Mac/OSX/* one level up
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38635
diff changeset
289 echo "* WARNING: Run $(srcdir)/Tools/fixapplepython23.py with \"sudo\" to fix this."; \
38176
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
290 fi
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
291
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
292
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
293 clean:
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
294 rm pythonw
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
295 cd PythonLauncher && make clean
cdf8f5334426 Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
296 cd IDLE && make clean
39853
bb9e914ede05 Tweak Mac/Makefile in to ensure that pythonw gets rebuild when the major version
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38751
diff changeset
297
bb9e914ede05 Tweak Mac/Makefile in to ensure that pythonw gets rebuild when the major version
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38751
diff changeset
298 Makefile: $(srcdir)/Makefile.in ../config.status
bb9e914ede05 Tweak Mac/Makefile in to ensure that pythonw gets rebuild when the major version
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38751
diff changeset
299 cd .. && CONFIG_FILES=Mac/Makefile CONFIG_HEADERS= $(SHELL) ./config.status