0
0
mirror of https://github.com/python/cpython.git synced 2024-11-30 18:51:15 +01:00
cpython/Mac/PythonLauncher/Makefile.in
Ronald Oussoren 86b33c872d Merged revisions 80647 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80647 | ronald.oussoren | 2010-04-30 13:20:14 +0200 (Fri, 30 Apr 2010) | 11 lines

  Fix for issue #3646: with this patch it is possible to do a
  framework install of Python in your home directory (on OSX):

     $ configure --enable-framework=${HOME}/Library/Frameworks
     $ make && make install

  Without this patch the framework would get installed just fine,
  but 'make install' would try to install the application bundles
  and command-line tools outside the user's home, which doesn't work
  for non-admin users (and is bad form anyway).
........
2010-04-30 11:41:56 +00:00

82 lines
2.7 KiB
Makefile

CC=@CC@
LD=@CC@
BASECFLAGS=@BASECFLAGS@
OPT=@OPT@
CFLAGS=@CFLAGS@ $(BASECFLAGS) $(OPT)
LDFLAGS=@LDFLAGS@
srcdir= @srcdir@
VERSION= @VERSION@
UNIVERSALSDK=@UNIVERSALSDK@
builddir= ../..
RUNSHARED= @RUNSHARED@
BUILDEXE= @BUILDEXEEXT@
BUILDPYTHON= $(builddir)/python$(BUILDEXE)
PYTHONFRAMEWORK=@PYTHONFRAMEWORK@
# 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)/../Tools/bundlebuilder.py
PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o
install: Python\ Launcher.app
test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)"
-test -d "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app"
/bin/cp -r "Python Launcher.app" "$(DESTDIR)$(PYTHONAPPSDIR)"
touch "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app"
clean:
rm -f *.o "Python Launcher"
rm -rf "Python Launcher.app"
Python\ Launcher.app: Info.plist \
Python\ Launcher $(srcdir)/../Icons/PythonLauncher.icns \
$(srcdir)/../Icons/PythonSource.icns \
$(srcdir)/../Icons/PythonCompiled.icns \
$(srcdir)/factorySettings.plist
rm -fr "Python Launcher.app"
$(RUNSHARED) $(BUILDPYTHON) $(BUNDLEBULDER) \
--builddir=. \
--name="Python Launcher" \
--executable="Python Launcher" \
--iconfile=$(srcdir)/../Icons/PythonLauncher.icns \
--bundle-id=org.python.PythonLauncher \
--resource=$(srcdir)/../Icons/PythonSource.icns \
--resource=$(srcdir)/../Icons/PythonCompiled.icns \
--resource=$(srcdir)/English.lproj \
--resource=$(srcdir)/factorySettings.plist \
--plist Info.plist \
build
find "Python Launcher.app" -name '.svn' -print0 | xargs -0 rm -r
FileSettings.o: $(srcdir)/FileSettings.m
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m
MyAppDelegate.o: $(srcdir)/MyAppDelegate.m
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m
MyDocument.o: $(srcdir)/MyDocument.m
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m
PreferencesWindowController.o: $(srcdir)/PreferencesWindowController.m
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m
doscript.o: $(srcdir)/doscript.m
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m
main.o: $(srcdir)/main.m
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/main.m
Python\ Launcher: $(OBJECTS)
$(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon
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