1prefix=@prefix@ 2CC=@CC@ 3LD=@CC@ 4BASECFLAGS=@BASECFLAGS@ 5OPT=@OPT@ 6CFLAGS=$(BASECFLAGS) $(OPT) 7LDFLAGS=@LDFLAGS@ 8srcdir= @srcdir@ 9VERSION= @VERSION@ 10LIBDEST=$(prefix)/lib/python$(VERSION) 11UNIVERSALSDK=@UNIVERSALSDK@ 12builddir= ../.. 13PYTHONFRAMEWORK=@PYTHONFRAMEWORK@ 14 15 16RUNSHARED= @RUNSHARED@ 17BUILDEXE= @BUILDEXEEXT@ 18BUILDPYTHON= $(builddir)/python$(BUILDEXE) 19 20# Deployment target selected during configure, to be checked 21# by distutils 22MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ 23@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET 24 25BUNDLEBULDER=$(srcdir)/../../Lib/plat-mac/bundlebuilder.py 26 27PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION) 28 29all: IDLE.app 30 31install: IDLE.app 32 test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)" 33 -test -d "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" 34 /bin/cp -PR IDLE.app "$(DESTDIR)$(PYTHONAPPSDIR)" 35 touch "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" 36 if [ -f "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def" ]; then \ 37 /bin/cp -p "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def" \ 38 "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def~" ; \ 39 sed -e 's!name= IDLE Classic Windows!name= IDLE Classic OSX!g' \ 40 < "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def~" \ 41 > "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def" ; \ 42 rm "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def~" ; \ 43 fi 44 if [ -f "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def" ]; then \ 45 /bin/cp -p "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def" \ 46 "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def~" ; \ 47 sed -e 's!zoom-height=<Alt-Key-2>!zoom-height=<Option-Key-0>!g' \ 48 -e 's!<Alt-Key-!<Option-Key-!g' \ 49 < "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def~" \ 50 > "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def" ; \ 51 rm "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def~" ; \ 52 fi 53 54clean: 55 rm -rf IDLE.app 56 57IDLE.app: \ 58 $(srcdir)/../Icons/IDLE.icns $(srcdir)/idlemain.py \ 59 $(srcdir)/../Icons/PythonSource.icns \ 60 $(srcdir)/../Icons/PythonCompiled.icns Info.plist 61 rm -fr IDLE.app 62 $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(BUNDLEBULDER) \ 63 --builddir=. \ 64 --name=IDLE \ 65 --link-exec \ 66 --plist=Info.plist \ 67 --mainprogram=$(srcdir)/idlemain.py \ 68 --iconfile=$(srcdir)/../Icons/IDLE.icns \ 69 --resource=$(srcdir)/../Icons/PythonSource.icns \ 70 --resource=$(srcdir)/../Icons/PythonCompiled.icns \ 71 --python=$(prefix)/Resources/Python.app/Contents/MacOS/Python \ 72 build 73 74Info.plist: $(srcdir)/Info.plist.in 75 sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(srcdir)/Info.plist.in > Info.plist 76 77