cpython/Mac/IDLE/Makefile.in
Ned Deily ee8e4b61d6
[2.7] Backport macOS universal build and installer fixes from 3.6. (GH-6469)
These include:

- bpo-32726: Provide an additional, more modern macOS installer variant that
  supports macOS 10.9+ systems in 64-bit mode only. Upgrade the supplied
  third-party libraries to OpenSSL 1.0.2n and SQLite 3.22.0. The 10.9+
  installer now supplies its own private copy of Tcl/Tk 8.6.8.

- bpo-24414: Default macOS deployment target is now set by ``configure`` to
  the build system's OS version (as is done by Python 3), not ``10.4``;
  override with, for example, ``./configure MACOSX_DEPLOYMENT_TARGET=10.4``.

- bpo-19019: All 2.7 macOS installer variants now supply their own version
  of ``OpenSSL 1.0.2``; the Apple-supplied SSL libraries and root
  certificates are not longer used.  The ``Installer Certificate`` command
  in ``/Applications/Python 2.7`` may be used to download and install a
  default set of root certificates from the third-party ``certifi`` package.

- bpo-11485: python.org macOS Pythons no longer supply a default SDK value
  (e.g. ``-isysroot /``) or specific compiler version default (e.g.
  ``gcc-4.2``) when building extension modules.  Use ``CC``, ``SDKROOT``,
  and ``DEVELOPER_DIR`` environment variables to override compilers or to
  use an SDK.  See Apple's ``xcrun`` man page for more info.

- prepare for pending Apple removal of 32-bit support in future macOS release
2018-04-14 10:37:28 -04:00

76 lines
2.7 KiB
Makefile

prefix=@prefix@
CC=@CC@
LD=@CC@
BASECFLAGS=@BASECFLAGS@
OPT=@OPT@
CFLAGS=$(BASECFLAGS) $(OPT)
LDFLAGS=@LDFLAGS@
srcdir= @srcdir@
VERSION= @VERSION@
LIBDEST=$(prefix)/lib/python$(VERSION)
UNIVERSALSDK=@UNIVERSALSDK@
builddir= ../..
PYTHONFRAMEWORK=@PYTHONFRAMEWORK@
RUNSHARED= @RUNSHARED@
BUILDEXE= @BUILDEXEEXT@
BUILDPYTHON= $(builddir)/python$(BUILDEXE)
# Deployment target selected during configure, to be checked
# by distutils
MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET
BUNDLEBULDER=$(srcdir)/../../Lib/plat-mac/bundlebuilder.py
PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
all: IDLE.app
install: IDLE.app
test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)"
-test -d "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app"
/bin/cp -PR IDLE.app "$(DESTDIR)$(PYTHONAPPSDIR)"
touch "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app"
if [ -f "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def" ]; then \
/bin/cp -p "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def" \
"$(DESTDIR)$(LIBDEST)/idlelib/config-main.def~" ; \
sed -e 's!name= IDLE Classic Windows!name= IDLE Classic OSX!g' \
< "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def~" \
> "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def" ; \
rm "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def~" ; \
fi
if [ -f "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def" ]; then \
/bin/cp -p "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def" \
"$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def~" ; \
sed -e 's!zoom-height=<Alt-Key-2>!zoom-height=<Option-Key-0>!g' \
-e 's!<Alt-Key-!<Option-Key-!g' \
< "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def~" \
> "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def" ; \
rm "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def~" ; \
fi
clean:
rm -rf IDLE.app
IDLE.app: \
$(srcdir)/../Icons/IDLE.icns $(srcdir)/idlemain.py \
$(srcdir)/../Icons/PythonSource.icns \
$(srcdir)/../Icons/PythonCompiled.icns Info.plist
rm -fr IDLE.app
$(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(BUNDLEBULDER) \
--builddir=. \
--name=IDLE \
--link-exec \
--plist=Info.plist \
--mainprogram=$(srcdir)/idlemain.py \
--iconfile=$(srcdir)/../Icons/IDLE.icns \
--resource=$(srcdir)/../Icons/PythonSource.icns \
--resource=$(srcdir)/../Icons/PythonCompiled.icns \
--python=$(prefix)/Resources/Python.app/Contents/MacOS/Python \
build
Info.plist: $(srcdir)/Info.plist.in
sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(srcdir)/Info.plist.in > Info.plist