home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / lib / python2.5 / config / Makefile
Encoding:
Makefile  |  2007-05-02  |  37.5 KB  |  1,130 lines

  1. # Generated automatically from Makefile.pre by makesetup.
  2. # Top-level Makefile for Python
  3. #
  4. # As distributed, this file is called Makefile.pre.in; it is processed
  5. # into the real Makefile by running the script ./configure, which
  6. # replaces things like @spam@ with values appropriate for your system.
  7. # This means that if you edit Makefile, your changes get lost the next
  8. # time you run the configure script.  Ideally, you can do:
  9. #
  10. #    ./configure
  11. #    make
  12. #    make test
  13. #    make install
  14. #
  15. # If you have a previous version of Python installed that you don't
  16. # want to overwrite, you can use "make altinstall" instead of "make
  17. # install".  Refer to the "Installing" section in the README file for
  18. # additional details.
  19. #
  20. # See also the section "Build instructions" in the README file.
  21.  
  22. # === Variables set by makesetup ===
  23.  
  24. MODOBJS=          Modules/threadmodule.o  Modules/signalmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/zipimport.o  Modules/symtablemodule.o  Modules/xxsubtype.o
  25. MODLIBS=        $(LOCALMODLIBS) $(BASEMODLIBS)
  26.  
  27. # === Variables set by configure
  28. VERSION=    2.5
  29. srcdir=        ..
  30. VPATH=        ..
  31.  
  32. CC=        gcc -pthread
  33. CXX=        g++ -pthread
  34. MAINCC=        $(CC)
  35. LINKCC=        $(PURIFY) $(MAINCC)
  36. AR=        ar
  37. RANLIB=        ranlib
  38. SVNVERSION=    echo exported
  39.  
  40. # Shell used by make (some versions default to the login shell, which is bad)
  41. SHELL=        /bin/sh
  42.  
  43. # Use this to make a link between python$(VERSION) and python in $(BINDIR)
  44. LN=        ln
  45.  
  46. # Portable install script (configure doesn't always guess right)
  47. INSTALL=    /usr/bin/install -c
  48. INSTALL_PROGRAM=${INSTALL}
  49. INSTALL_SCRIPT= ${INSTALL}
  50. INSTALL_DATA=    ${INSTALL} -m 644
  51. # Shared libraries must be installed with executable mode on some systems;
  52. # rather than figuring out exactly which, we always give them executable mode.
  53. # Also, making them read-only seems to be a good idea...
  54. INSTALL_SHARED= ${INSTALL} -m 555
  55.  
  56. MAKESETUP=      $(srcdir)/Modules/makesetup
  57.  
  58. # Compiler options
  59. OPT=        -DNDEBUG -g -O2 -Wall -Wstrict-prototypes
  60. BASECFLAGS=     -fno-strict-aliasing
  61. CFLAGS=        $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS)
  62. # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
  63. # be able to build extension modules using the directories specified in the
  64. # environment variables
  65. CPPFLAGS=    -I. -I$(srcdir)/Include 
  66. LDFLAGS=    
  67. LDLAST=        
  68. SGI_ABI=    
  69. CCSHARED=    -fPIC
  70. LINKFORSHARED=    -Xlinker -export-dynamic
  71. # Extra C flags added for building the interpreter object files.
  72. CFLAGSFORSHARED=$(CCSHARED)
  73. # C flags used for building the interpreter object files
  74. PY_CFLAGS=    $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
  75.  
  76.  
  77. # Machine-dependent subdirectories
  78. MACHDEP=    linux2
  79.  
  80. # Install prefix for architecture-independent files
  81. prefix=        /usr
  82.  
  83. # Install prefix for architecture-dependent files
  84. exec_prefix=    ${prefix}
  85.  
  86. # Expanded directories
  87. BINDIR=        $(exec_prefix)/bin
  88. LIBDIR=        $(exec_prefix)/lib
  89. MANDIR=        ${prefix}/share/man
  90. INCLUDEDIR=    ${prefix}/include
  91. CONFINCLUDEDIR=    $(exec_prefix)/include
  92. SCRIPTDIR=    $(prefix)/lib
  93.  
  94. # Detailed destination directories
  95. BINLIBDEST=    $(LIBDIR)/python$(VERSION)
  96. LIBDEST=    $(SCRIPTDIR)/python$(VERSION)
  97. INCLUDEPY=    $(INCLUDEDIR)/python$(VERSION)$(DEBUG_EXT)
  98. CONFINCLUDEPY=    $(CONFINCLUDEDIR)/python$(VERSION)$(DEBUG_EXT)
  99. LIBP=        $(LIBDIR)/python$(VERSION)
  100.  
  101. # Symbols used for using shared libraries
  102. SO=        .so
  103. LDSHARED=    $(CC) -shared -Wl,-O1
  104. BLDSHARED=    $(CC) -shared -Wl,-O1
  105. DESTSHARED=    $(BINLIBDEST)/lib-dynload
  106.  
  107. # Executable suffix (.exe on Windows and Mac OS X)
  108. EXE=        
  109. BUILDEXE=    
  110.  
  111. DEBUG_EXT=    
  112.  
  113. # Short name and location for Mac OS X Python framework
  114. UNIVERSALSDK=
  115. PYTHONFRAMEWORK=    
  116. PYTHONFRAMEWORKDIR=    no-framework
  117. PYTHONFRAMEWORKPREFIX=    
  118. PYTHONFRAMEWORKINSTALLDIR= 
  119. # Deployment target selected during configure, to be checked
  120. # by distutils. The export statement is needed to ensure that the
  121. # deployment target is active during build.
  122. MACOSX_DEPLOYMENT_TARGET=
  123. #export MACOSX_DEPLOYMENT_TARGET
  124.  
  125. # Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
  126. OTHER_LIBTOOL_OPT=
  127.  
  128. # Environment to run shared python without installed libraries
  129. RUNSHARED=
  130.  
  131. # Modes for directories, executables and data files created by the
  132. # install process.  Default to user-only-writable for all file types.
  133. DIRMODE=    755
  134. EXEMODE=    755
  135. FILEMODE=    644
  136.  
  137. # configure script arguments
  138. CONFIG_ARGS=     '--enable-shared' '--prefix=/usr' '--enable-ipv6' '--enable-unicode=ucs4' '--without-cxx' '--with-fpectl' 'CC=gcc'
  139.  
  140.  
  141. # Subdirectories with code
  142. SRCDIRS=     Parser Grammar Objects Python Modules Mac
  143.  
  144. # Other subdirectories
  145. SUBDIRSTOO=    Include Lib Misc Demo
  146.  
  147. # Files and directories to be distributed
  148. CONFIGFILES=    configure configure.in acconfig.h pyconfig.h.in Makefile.pre.in
  149. DISTFILES=    README ChangeLog $(CONFIGFILES)
  150. DISTDIRS=    $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
  151. DIST=        $(DISTFILES) $(DISTDIRS)
  152.  
  153.  
  154. LIBRARY=    libpython$(VERSION).a
  155. LDLIBRARY=      libpython$(VERSION).so
  156. BLDLIBRARY=     -L. -lpython$(VERSION)
  157. DLLLIBRARY=    
  158. LDLIBRARYDIR=   
  159. INSTSONAME=    libpython$(VERSION).so.1.0
  160.  
  161.  
  162. LIBS=        -lpthread -ldl  -lutil
  163. LIBM=        -lm
  164. LIBC=        
  165. SYSLIBS=    $(LIBM) $(LIBC)
  166. SHLIBS=        $(LIBS)
  167.  
  168. THREADOBJ=    Python/thread.o
  169. DLINCLDIR=    .
  170. DYNLOADFILE=    dynload_shlib.o
  171. MACHDEP_OBJS=    
  172. UNICODE_OBJS=   Objects/unicodeobject.o Objects/unicodectype.o
  173.  
  174. PYTHON=        python$(EXE)
  175. BUILDPYTHON=    python$(BUILDEXE)
  176.  
  177. # === Definitions added by makesetup ===
  178.  
  179. LOCALMODLIBS=          
  180. BASEMODLIBS=
  181. GLHACK=-Dclear=__GLclear
  182. PYTHONPATH=$(COREPYTHONPATH)
  183. COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)$(TKPATH)
  184. TKPATH=:lib-tk
  185. EXTRAMACHDEPPATH=
  186. MACHDEPPATH=:plat-$(MACHDEP)
  187. TESTPATH=
  188. SITEPATH=
  189. DESTPATH=
  190. MACHDESTLIB=$(BINLIBDEST)
  191. DESTLIB=$(LIBDEST)
  192.  
  193.  
  194.  
  195. ##########################################################################
  196. # Modules
  197. MODULE_OBJS=    \
  198.         Modules/config.o \
  199.         Modules/getpath.o \
  200.         Modules/main.o \
  201.         Modules/gcmodule.o
  202.  
  203. # Used of signalmodule.o is not available
  204. SIGNAL_OBJS=    
  205.  
  206.  
  207. ##########################################################################
  208. # Grammar
  209. GRAMMAR_H=    $(srcdir)/Include/graminit.h
  210. GRAMMAR_C=    $(srcdir)/Python/graminit.c
  211. GRAMMAR_INPUT=    $(srcdir)/Grammar/Grammar
  212.  
  213.  
  214. ##########################################################################
  215. # Parser
  216. PGEN=        Parser/pgen$(EXE)
  217.  
  218. POBJS=        \
  219.         Parser/acceler.o \
  220.         Parser/grammar1.o \
  221.         Parser/listnode.o \
  222.         Parser/node.o \
  223.         Parser/parser.o \
  224.         Parser/parsetok.o \
  225.         Parser/bitset.o \
  226.         Parser/metagrammar.o \
  227.         Parser/firstsets.o \
  228.         Parser/grammar.o \
  229.         Parser/pgen.o
  230.  
  231. PARSER_OBJS=    $(POBJS) Parser/myreadline.o Parser/tokenizer.o
  232.  
  233. PGOBJS=        \
  234.         Objects/obmalloc.o \
  235.         Python/mysnprintf.o \
  236.         Parser/tokenizer_pgen.o \
  237.         Parser/printgrammar.o \
  238.         Parser/pgenmain.o
  239.  
  240. PGENOBJS=    $(PGENMAIN) $(POBJS) $(PGOBJS)
  241.  
  242. ##########################################################################
  243. # AST
  244. AST_H_DIR=    $(srcdir)/Include
  245. AST_H=        $(AST_H_DIR)/Python-ast.h
  246. AST_C_DIR=    $(srcdir)/Python
  247. AST_C=        $(AST_C_DIR)/Python-ast.c
  248. AST_ASDL=    $(srcdir)/Parser/Python.asdl
  249.  
  250. ASDLGEN_FILES=    $(srcdir)/Parser/asdl.py $(srcdir)/Parser/asdl_c.py
  251. # XXX Note that a build now requires Python exist before the build starts
  252. ASDLGEN=    $(srcdir)/Parser/asdl_c.py
  253.  
  254. ##########################################################################
  255. # Python
  256. PYTHON_OBJS=    \
  257.         Python/Python-ast.o \
  258.         Python/asdl.o \
  259.         Python/ast.o \
  260.         Python/bltinmodule.o \
  261.         Python/ceval.o \
  262.         Python/compile.o \
  263.         Python/codecs.o \
  264.         Python/errors.o \
  265.         Python/frozen.o \
  266.         Python/frozenmain.o \
  267.         Python/future.o \
  268.         Python/getargs.o \
  269.         Python/getcompiler.o \
  270.         Python/getcopyright.o \
  271.         Python/getmtime.o \
  272.         Python/getplatform.o \
  273.         Python/getversion.o \
  274.         Python/graminit.o \
  275.         Python/import.o \
  276.         Python/importdl.o \
  277.         Python/marshal.o \
  278.         Python/modsupport.o \
  279.         Python/mystrtoul.o \
  280.         Python/mysnprintf.o \
  281.         Python/pyarena.o \
  282.         Python/pyfpe.o \
  283.         Python/pystate.o \
  284.         Python/pythonrun.o \
  285.         Python/structmember.o \
  286.         Python/symtable.o \
  287.         Python/sysmodule.o \
  288.         Python/traceback.o \
  289.         Python/getopt.o \
  290.         Python/pystrtod.o \
  291.         Python/$(DYNLOADFILE) \
  292.         $(MACHDEP_OBJS) \
  293.         $(THREADOBJ)
  294.  
  295.  
  296. ##########################################################################
  297. # Objects
  298. OBJECT_OBJS=    \
  299.         Objects/abstract.o \
  300.         Objects/boolobject.o \
  301.         Objects/bufferobject.o \
  302.         Objects/cellobject.o \
  303.         Objects/classobject.o \
  304.         Objects/cobject.o \
  305.         Objects/codeobject.o \
  306.         Objects/complexobject.o \
  307.         Objects/descrobject.o \
  308.         Objects/enumobject.o \
  309.         Objects/exceptions.o \
  310.         Objects/genobject.o \
  311.         Objects/fileobject.o \
  312.         Objects/floatobject.o \
  313.         Objects/frameobject.o \
  314.         Objects/funcobject.o \
  315.         Objects/intobject.o \
  316.         Objects/iterobject.o \
  317.         Objects/listobject.o \
  318.         Objects/longobject.o \
  319.         Objects/dictobject.o \
  320.         Objects/methodobject.o \
  321.         Objects/moduleobject.o \
  322.         Objects/object.o \
  323.         Objects/obmalloc.o \
  324.         Objects/rangeobject.o \
  325.                 Objects/setobject.o \
  326.         Objects/sliceobject.o \
  327.         Objects/stringobject.o \
  328.         Objects/structseq.o \
  329.         Objects/tupleobject.o \
  330.         Objects/typeobject.o \
  331.         Objects/weakrefobject.o \
  332.         $(UNICODE_OBJS)
  333.  
  334.  
  335. ##########################################################################
  336. # objects that get linked into the Python library
  337. LIBRARY_OBJS=    \
  338.         Modules/_typesmodule.o \
  339.         Modules/getbuildinfo.o \
  340.         $(PARSER_OBJS) \
  341.         $(OBJECT_OBJS) \
  342.         $(PYTHON_OBJS) \
  343.         $(MODULE_OBJS) \
  344.         $(SIGNAL_OBJS) \
  345.         $(MODOBJS)
  346.  
  347. #########################################################################
  348. # Rules
  349.  
  350. # Default target
  351. all:        $(BUILDPYTHON) oldsharedmods sharedmods
  352.  
  353. # Build the interpreter
  354. $(BUILDPYTHON):    Modules/python.o $(LIBRARY) $(LDLIBRARY)
  355.         $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
  356.             Modules/python.o \
  357.             $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
  358.  
  359. platform: $(BUILDPYTHON)
  360.     $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
  361.  
  362.  
  363. # Build the shared modules
  364. sharedmods: $(BUILDPYTHON)
  365.     case $$MAKEFLAGS in \
  366.     *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
  367.     *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
  368.     esac
  369.  
  370. # Build static library
  371. # avoid long command lines, same as LIBRARY_OBJS
  372. $(LIBRARY): $(LIBRARY_OBJS)
  373.     -rm -f $@
  374.     $(AR) cr $@ Modules/getbuildinfo.o
  375.     $(AR) cr $@ Modules/_typesmodule.o
  376.     $(AR) cr $@ $(PARSER_OBJS)
  377.     $(AR) cr $@ $(OBJECT_OBJS)
  378.     $(AR) cr $@ $(PYTHON_OBJS)
  379.     $(AR) cr $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
  380.     $(AR) cr $@ $(MODOBJS)
  381.     $(RANLIB) $@
  382.  
  383. libpython$(VERSION).so: $(LIBRARY_OBJS)
  384.     if test $(INSTSONAME) != $(LDLIBRARY); then \
  385.         $(LDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
  386.         $(LN) -f $(INSTSONAME) $@; \
  387.     else\
  388.         $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
  389.     fi
  390.  
  391. libpython$(VERSION).sl: $(LIBRARY_OBJS)
  392.     $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
  393.  
  394. # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
  395. # minimal framework (not including the Lib directory and such) in the current
  396. # directory.
  397. RESSRCDIR=$(srcdir)/Mac/Resources/framework
  398. $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
  399.         $(LIBRARY) \
  400.         $(RESSRCDIR)/Info.plist \
  401.                 $(RESSRCDIR)/version.plist \
  402.                 $(RESSRCDIR)/English.lproj/InfoPlist.strings
  403.     $(INSTALL) -d -m $(DIRMODE) $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)
  404.     if test "${UNIVERSALSDK}"; then \
  405.         $(CC) -o $(LDLIBRARY) -arch i386 -arch ppc -dynamiclib \
  406.             -isysroot "${UNIVERSALSDK}" \
  407.             -all_load $(LIBRARY) -Wl,-single_module \
  408.             -install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python \
  409.             -compatibility_version $(VERSION) \
  410.             -current_version $(VERSION); \
  411.         else \
  412.         libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \
  413.              ;\
  414.     fi
  415.     $(INSTALL) -d -m $(DIRMODE)  \
  416.         $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj
  417.     $(INSTALL_DATA) $(RESSRCDIR)/Info.plist \
  418.         $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/Info.plist
  419.     $(INSTALL_DATA) $(RESSRCDIR)/version.plist \
  420.         $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/version.plist
  421.     $(INSTALL_DATA) $(RESSRCDIR)/English.lproj/InfoPlist.strings \
  422.         $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj/InfoPlist.strings
  423.     $(LN) -fsn $(VERSION) $(PYTHONFRAMEWORKDIR)/Versions/Current
  424.     $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)
  425.     $(LN) -fsn Versions/Current/Headers $(PYTHONFRAMEWORKDIR)/Headers
  426.     $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources
  427.  
  428. # This rule builds the Cygwin Python DLL and import library if configured
  429. # for a shared core library; otherwise, this rule is a noop.
  430. $(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
  431.     if test -n "$(DLLLIBRARY)"; then \
  432.         $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
  433.             $(LIBS) $(MODLIBS) $(SYSLIBS); \
  434.     else true; \
  435.     fi
  436.  
  437.  
  438. oldsharedmods: $(SHAREDMODS)
  439.  
  440.  
  441. Makefile Modules/config.c: Makefile.pre \
  442.                 $(srcdir)/Modules/config.c.in \
  443.                 $(MAKESETUP) \
  444.                 Modules/Setup.config \
  445.                 Modules/Setup \
  446.                 Modules/Setup.local
  447.     $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \
  448.                 -s Modules \
  449.                 Modules/Setup.config \
  450.                 Modules/Setup.local \
  451.                 Modules/Setup
  452.     @mv config.c Modules
  453.     @echo "The Makefile was updated, you may need to re-run make."
  454.  
  455.  
  456. Modules/Setup: $(srcdir)/Modules/Setup.dist
  457.     @if test -f Modules/Setup; then \
  458.         echo "-----------------------------------------------"; \
  459.         echo "Modules/Setup.dist is newer than Modules/Setup;"; \
  460.         echo "check to make sure you have all the updates you"; \
  461.         echo "need in your Modules/Setup file."; \
  462.         echo "Usually, copying Setup.dist to Setup will work."; \
  463.         echo "-----------------------------------------------"; \
  464.     fi
  465.  
  466. ############################################################################
  467. # Special rules for object files
  468.  
  469. Modules/getbuildinfo.o: $(PARSER_OBJS) \
  470.         $(OBJECT_OBJS) \
  471.         $(PYTHON_OBJS) \
  472.         $(MODULE_OBJS) \
  473.         $(SIGNAL_OBJS) \
  474.         $(MODOBJS) \
  475.         $(srcdir)/Modules/getbuildinfo.c
  476.     $(CC) -c $(PY_CFLAGS) -DSVNVERSION=\"`LC_ALL=C $(SVNVERSION)`\" -o $@ $(srcdir)/Modules/getbuildinfo.c
  477.  
  478. Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
  479.     $(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
  480.         -DPREFIX='"$(prefix)"' \
  481.         -DEXEC_PREFIX='"$(exec_prefix)"' \
  482.         -DVERSION='"$(VERSION)"' \
  483.         -DVPATH='"$(VPATH)"' \
  484.         -o $@ $(srcdir)/Modules/getpath.c
  485.  
  486. Modules/python.o: $(srcdir)/Modules/python.c
  487.     $(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c
  488.  
  489.  
  490. $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
  491.         -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
  492.  
  493. $(PGEN):    $(PGENOBJS)
  494.         $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
  495.  
  496. Parser/grammar.o:    $(srcdir)/Parser/grammar.c \
  497.                 $(srcdir)/Include/token.h \
  498.                 $(srcdir)/Include/grammar.h
  499. Parser/metagrammar.o:    $(srcdir)/Parser/metagrammar.c
  500.  
  501. Parser/tokenizer_pgen.o:    $(srcdir)/Parser/tokenizer.c
  502.  
  503. $(AST_H): $(AST_ASDL) $(ASDLGEN_FILES)
  504.     $(ASDLGEN) -h $(AST_H_DIR) $(AST_ASDL)
  505.  
  506. $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
  507.     $(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL)
  508.  
  509. Python/compile.o Python/symtable.o: $(GRAMMAR_H) $(AST_H)
  510.  
  511. Python/getplatform.o: $(srcdir)/Python/getplatform.c
  512.         $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
  513.  
  514. Python/importdl.o: $(srcdir)/Python/importdl.c
  515.         $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
  516.  
  517. Objects/unicodectype.o:    $(srcdir)/Objects/unicodectype.c \
  518.                 $(srcdir)/Objects/unicodetype_db.h
  519.  
  520. ############################################################################
  521. # Header files
  522.  
  523. PYTHON_HEADERS= \
  524.         Include/Python.h \
  525.         Include/Python-ast.h \
  526.         Include/asdl.h \
  527.         Include/abstract.h \
  528.         Include/boolobject.h \
  529.         Include/bufferobject.h \
  530.         Include/ceval.h \
  531.         Include/classobject.h \
  532.         Include/cobject.h \
  533.         Include/code.h \
  534.         Include/codecs.h \
  535.         Include/compile.h \
  536.         Include/complexobject.h \
  537.         Include/descrobject.h \
  538.         Include/dictobject.h \
  539.         Include/enumobject.h \
  540.         Include/genobject.h \
  541.         Include/fileobject.h \
  542.         Include/floatobject.h \
  543.         Include/funcobject.h \
  544.         Include/import.h \
  545.         Include/intobject.h \
  546.         Include/intrcheck.h \
  547.         Include/iterobject.h \
  548.         Include/listobject.h \
  549.         Include/longobject.h \
  550.         Include/methodobject.h \
  551.         Include/modsupport.h \
  552.         Include/moduleobject.h \
  553.         Include/object.h \
  554.         Include/objimpl.h \
  555.         Include/patchlevel.h \
  556.         Include/pyarena.h \
  557.         Include/pydebug.h \
  558.         Include/pyerrors.h \
  559.         Include/pyfpe.h \
  560.         Include/pymem.h \
  561.         Include/pyport.h \
  562.         Include/pystate.h \
  563.         Include/pythonrun.h \
  564.         Include/rangeobject.h \
  565.                 Include/setobject.h \
  566.         Include/sliceobject.h \
  567.         Include/stringobject.h \
  568.         Include/structseq.h \
  569.         Include/structmember.h \
  570.         Include/symtable.h \
  571.         Include/sysmodule.h \
  572.         Include/traceback.h \
  573.         Include/tupleobject.h \
  574.         Include/unicodeobject.h \
  575.         Include/weakrefobject.h \
  576.         pyconfig.h
  577.  
  578. $(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
  579.  
  580.  
  581. ######################################################################
  582.  
  583. # Test the interpreter (twice, once without .pyc files, once with)
  584. # In the past, we've had problems where bugs in the marshalling or
  585. # elsewhere caused bytecode read from .pyc files to behave differently
  586. # than bytecode generated directly from a .py source file.  Sometimes
  587. # the bytecode read from a .pyc file had the bug, somtimes the directly
  588. # generated bytecode.  This is sometimes a very shy bug needing a lot of
  589. # sample data.
  590.  
  591. TESTOPTS=    -l $(EXTRATESTOPTS)
  592. TESTPROG=    $(srcdir)/Lib/test/regrtest.py
  593. TESTPYTHON=    $(RUNSHARED) ./$(BUILDPYTHON) -E -tt
  594. test:        all platform
  595.         -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  596.         -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
  597.         $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
  598.  
  599. testall:    all platform
  600.         -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  601.         -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
  602.         $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
  603.  
  604. #  Run the unitests for both architectures in a Universal build on OSX
  605. #  Must be run on an Intel box.
  606. testuniversal:    all platform
  607.         if [ `arch` != 'i386' ];then \
  608.             echo "This can only be used on OSX/i386" ;\
  609.             exit 1 ;\
  610.         fi
  611.         -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  612.         -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
  613.         $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
  614.         $(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E -tt $(TESTPROG) $(TESTOPTS) -uall
  615.  
  616.  
  617. # Like testall, but with a single pass only
  618. buildbottest:    all platform
  619.         $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall -rw
  620.  
  621. QUICKTESTOPTS=    $(TESTOPTS) -x test_thread test_signal test_strftime \
  622.         test_unicodedata test_re test_sre test_select test_poll \
  623.         test_linuxaudiodev test_struct test_sunaudiodev test_zlib
  624. quicktest:    all platform
  625.         -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  626.         -$(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
  627.         $(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
  628.  
  629. MEMTESTOPTS=    $(QUICKTESTOPTS) -x test_dl test___all__ test_fork1 \
  630.         test_longexp
  631. memtest:    all platform
  632.         -rm -f $(srcdir)/Lib/test/*.py[co]
  633.         -$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
  634.         $(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
  635.  
  636. # Install everything
  637. install:     altinstall bininstall maninstall 
  638.  
  639. # Install almost everything without disturbing previous versions
  640. altinstall:     altbininstall libinstall inclinstall libainstall \
  641.                 sharedinstall oldsharedinstall 
  642.  
  643. # Install shared libraries enabled by Setup
  644. DESTDIRS=    $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
  645.  
  646. oldsharedinstall: $(DESTSHARED) $(SHAREDMODS)
  647.         @for i in X $(SHAREDMODS); do \
  648.           if test $$i != X; then \
  649.             echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
  650.             $(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/`basename $$i`; \
  651.           fi; \
  652.         done
  653.  
  654. $(DESTSHARED):
  655.         @for i in $(DESTDIRS); \
  656.         do \
  657.             if test ! -d $(DESTDIR)$$i; then \
  658.                 echo "Creating directory $$i"; \
  659.                 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  660.             else    true; \
  661.             fi; \
  662.         done
  663.  
  664.  
  665. # Install the interpreter (by creating a hard link to python$(VERSION))
  666. bininstall:    altbininstall
  667.     -if test -f $(DESTDIR)$(BINDIR)/$(PYTHON) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON); \
  668.     then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
  669.     else true; \
  670.     fi
  671.     (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
  672.     (cd $(DESTDIR)$(BINDIR); $(LN) -sf python$(VERSION)-config python-config)
  673.  
  674. # Install the interpreter with $(VERSION) affixed
  675. # This goes into $(exec_prefix)
  676. altbininstall:    $(BUILDPYTHON)
  677.     @for i in $(BINDIR) $(LIBDIR); \
  678.     do \
  679.         if test ! -d $(DESTDIR)$$i; then \
  680.             echo "Creating directory $$i"; \
  681.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  682.         else    true; \
  683.         fi; \
  684.     done
  685.     $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE)
  686.     if test -f libpython$(VERSION)$(SO); then \
  687.         if test "$(SO)" = .dll; then \
  688.             $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(BINDIR); \
  689.         else \
  690.             $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
  691.             if test libpython$(VERSION)$(SO) != $(INSTSONAME); then \
  692.                 (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \
  693.             fi \
  694.         fi; \
  695.     else    true; \
  696.     fi
  697.  
  698. # Install the manual page
  699. maninstall:
  700.     @for i in $(MANDIR) $(MANDIR)/man1; \
  701.     do \
  702.         if test ! -d $(DESTDIR)$$i; then \
  703.             echo "Creating directory $$i"; \
  704.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  705.         else    true; \
  706.         fi; \
  707.     done
  708.     $(INSTALL_DATA) $(srcdir)/Misc/python.man \
  709.         $(DESTDIR)$(MANDIR)/man1/python.1
  710.  
  711. # Install the library
  712. PLATDIR=    plat-$(MACHDEP)
  713. EXTRAPLATDIR= 
  714. EXTRAMACHDEPPATH=
  715. MACHDEPS=    $(PLATDIR) $(EXTRAPLATDIR)
  716. XMLLIBSUBDIRS=  xml xml/dom xml/etree xml/parsers xml/sax
  717. PLATMACDIRS= plat-mac plat-mac/Carbon plat-mac/lib-scriptpackages \
  718.     plat-mac/lib-scriptpackages/_builtinSuites \
  719.     plat-mac/lib-scriptpackages/CodeWarrior \
  720.     plat-mac/lib-scriptpackages/Explorer \
  721.     plat-mac/lib-scriptpackages/Finder \
  722.     plat-mac/lib-scriptpackages/Netscape \
  723.     plat-mac/lib-scriptpackages/StdSuites \
  724.     plat-mac/lib-scriptpackages/SystemEvents \
  725.     plat-mac/lib-scriptpackages/Terminal 
  726. PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
  727. LIBSUBDIRS=    lib-tk site-packages test test/output test/data \
  728.         test/decimaltestdata \
  729.         encodings compiler hotshot \
  730.         email email/mime email/test email/test/data \
  731.         sqlite3 sqlite3/test \
  732.         logging bsddb bsddb/test csv wsgiref \
  733.         ctypes ctypes/test ctypes/macholib idlelib idlelib/Icons \
  734.         distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
  735.         setuptools setuptools/command setuptools/tests setuptools.egg-info \
  736.         curses $(MACHDEPS)
  737. libinstall:    $(BUILDPYTHON) $(srcdir)/Lib/$(PLATDIR)
  738.     @for i in $(SCRIPTDIR) $(LIBDEST); \
  739.     do \
  740.         if test ! -d $(DESTDIR)$$i; then \
  741.             echo "Creating directory $$i"; \
  742.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  743.         else    true; \
  744.         fi; \
  745.     done
  746.     @for d in $(LIBSUBDIRS); \
  747.     do \
  748.         a=$(srcdir)/Lib/$$d; \
  749.         if test ! -d $$a; then continue; else true; fi; \
  750.         b=$(LIBDEST)/$$d; \
  751.         if test ! -d $(DESTDIR)$$b; then \
  752.             echo "Creating directory $$b"; \
  753.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \
  754.         else    true; \
  755.         fi; \
  756.     done
  757.     @for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \
  758.     do \
  759.         if test -x $$i; then \
  760.             $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
  761.             echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \
  762.         else \
  763.             $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
  764.             echo $(INSTALL_DATA) $$i $(LIBDEST); \
  765.         fi; \
  766.     done
  767.     @for d in $(LIBSUBDIRS); \
  768.     do \
  769.         a=$(srcdir)/Lib/$$d; \
  770.         if test ! -d $$a; then continue; else true; fi; \
  771.         if test `ls $$a | wc -l` -lt 1; then continue; fi; \
  772.         b=$(LIBDEST)/$$d; \
  773.         for i in $$a/*; \
  774.         do \
  775.             case $$i in \
  776.             *CVS) ;; \
  777.             *.py[co]) ;; \
  778.             *.orig) ;; \
  779.             *~) ;; \
  780.             *) \
  781.                 if test -d $$i; then continue; fi; \
  782.                 if test -x $$i; then \
  783.                     echo $(INSTALL_SCRIPT) $$i $$b; \
  784.                     $(INSTALL_SCRIPT) $$i $(DESTDIR)$$b; \
  785.                 else \
  786.                     echo $(INSTALL_DATA) $$i $$b; \
  787.                     $(INSTALL_DATA) $$i $(DESTDIR)$$b; \
  788.                 fi;; \
  789.             esac; \
  790.         done; \
  791.     done
  792.     $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
  793.     PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
  794.         ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
  795.         -d $(LIBDEST) -f \
  796.         -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
  797.     PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  798.         ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
  799.         -d $(LIBDEST) -f \
  800.         -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
  801.     -PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
  802.         ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
  803.         -d $(LIBDEST)/site-packages -f \
  804.         -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  805.     -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  806.         ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
  807.         -d $(LIBDEST)/site-packages -f \
  808.         -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  809.  
  810. # Create the PLATDIR source directory, if one wasn't distributed..
  811. $(srcdir)/Lib/$(PLATDIR):
  812.     mkdir $(srcdir)/Lib/$(PLATDIR)
  813.     cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
  814.     export PATH; PATH="`pwd`:$$PATH"; \
  815.     export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
  816.     export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
  817.     export EXE; EXE="$(BUILDEXE)"; \
  818.     cd $(srcdir)/Lib/$(PLATDIR); ./regen
  819.  
  820. # Install the include files
  821. INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
  822. inclinstall:
  823.     @for i in $(INCLDIRSTOMAKE); \
  824.     do \
  825.         if test ! -d $(DESTDIR)$$i; then \
  826.             echo "Creating directory $$i"; \
  827.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  828.         else    true; \
  829.         fi; \
  830.     done
  831.     @for i in $(srcdir)/Include/*.h; \
  832.     do \
  833.         echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
  834.         $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
  835.     done
  836.     $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
  837.  
  838. # Install the library and miscellaneous stuff needed for extending/embedding
  839. # This goes into $(exec_prefix)$(DEBUG_EXT)
  840. LIBPL=        $(LIBP)/config$(DEBUG_EXT)
  841. libainstall:    all
  842.     @for i in $(LIBDIR) $(LIBP) $(LIBPL); \
  843.     do \
  844.         if test ! -d $(DESTDIR)$$i; then \
  845.             echo "Creating directory $$i"; \
  846.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  847.         else    true; \
  848.         fi; \
  849.     done
  850.     @if test -d $(LIBRARY); then :; else \
  851.         if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
  852.             if test "$(SO)" = .dll; then \
  853.                 $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
  854.             else \
  855.                 $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
  856.                 $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
  857.             fi; \
  858.         else \
  859.             echo Skip install of $(LIBRARY) - use make frameworkinstall; \
  860.         fi; \
  861.     fi
  862.     $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
  863.     $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
  864.     $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
  865.     $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
  866.     $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
  867.     $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
  868.     $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
  869.     $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
  870.     $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
  871.     # Substitution happens here, as the completely-expanded BINDIR
  872.     # is not available in configure
  873.     sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
  874.     $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config
  875.     rm python-config
  876.     @if [ -s Modules/python.exp -a \
  877.         "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
  878.         echo; echo "Installing support files for building shared extension modules on AIX:"; \
  879.         $(INSTALL_DATA) Modules/python.exp        \
  880.                 $(DESTDIR)$(LIBPL)/python.exp;        \
  881.         echo; echo "$(LIBPL)/python.exp";        \
  882.         $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix    \
  883.                 $(DESTDIR)$(LIBPL)/makexp_aix;        \
  884.         echo "$(LIBPL)/makexp_aix";            \
  885.         $(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix    \
  886.                 $(DESTDIR)$(LIBPL)/ld_so_aix;        \
  887.         echo "$(LIBPL)/ld_so_aix";            \
  888.         echo; echo "See Misc/AIX-NOTES for details.";    \
  889.     else true; \
  890.     fi
  891.     @case "$(MACHDEP)" in beos*) \
  892.         echo; echo "Installing support files for building shared extension modules on BeOS:"; \
  893.         $(INSTALL_DATA) Misc/BeOS-NOTES $(DESTDIR)$(LIBPL)/README;    \
  894.         echo; echo "$(LIBPL)/README";            \
  895.         $(INSTALL_SCRIPT) Modules/ar_beos $(DESTDIR)$(LIBPL)/ar_beos; \
  896.         echo "$(LIBPL)/ar_beos";            \
  897.         $(INSTALL_SCRIPT) Modules/ld_so_beos $(DESTDIR)$(LIBPL)/ld_so_beos; \
  898.         echo "$(LIBPL)/ld_so_beos";            \
  899.         echo; echo "See Misc/BeOS-NOTES for details.";    \
  900.         ;; \
  901.     esac
  902.  
  903. # Install the dynamically loadable modules
  904. # This goes into $(exec_prefix)
  905. sharedinstall:
  906.     $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
  907.            --prefix=$(prefix) \
  908.         --install-scripts=$(BINDIR) \
  909.         --install-platlib=$(DESTSHARED) \
  910.         --root=/$(DESTDIR)
  911.  
  912. # Here are a couple of targets for MacOSX again, to install a full
  913. # framework-based Python. frameworkinstall installs everything, the
  914. # subtargets install specific parts. Much of the actual work is offloaded to
  915. # the Makefile in Mac
  916. #
  917. #
  918. # This target is here for backward compatiblity, previous versions of Python
  919. # hadn't integrated framework installation in the normal install process.
  920. frameworkinstall: install
  921.  
  922. # On install, we re-make the framework
  923. # structure in the install location, /Library/Frameworks/ or the argument to
  924. # --enable-framework. If --enable-framework has been specified then we have
  925. # automatically set prefix to the location deep down in the framework, so we
  926. # only have to cater for the structural bits of the framework.
  927.  
  928. frameworkinstallframework: frameworkinstallstructure install frameworkinstallmaclib
  929.  
  930. frameworkinstallstructure:    $(LDLIBRARY)
  931.     @if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
  932.         echo Not configured with --enable-framework; \
  933.         exit 1; \
  934.     else true; \
  935.     fi
  936.     @for i in $(prefix)/Resources/English.lproj $(prefix)/lib; do\
  937.         if test ! -d $(DESTDIR)$$i; then \
  938.             echo "Creating directory $(DESTDIR)$$i"; \
  939.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  940.         else    true; \
  941.         fi; \
  942.     done
  943.     $(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
  944.     $(INSTALL_DATA) $(RESSRCDIR)/Info.plist $(DESTDIR)$(prefix)/Resources/Info.plist
  945.     $(INSTALL_DATA) $(RESSRCDIR)/version.plist $(DESTDIR)$(prefix)/Resources/version.plist
  946.     $(INSTALL_DATA) $(RESSRCDIR)/English.lproj/InfoPlist.strings \
  947.         $(DESTDIR)$(prefix)/Resources/English.lproj/InfoPlist.strings
  948.     $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
  949.     $(LN) -fsn Versions/Current/Python $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Python
  950.     $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
  951.     $(LN) -fsn Versions/Current/Resources $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Resources
  952.     $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(PYTHONFRAMEWORKPREFIX)/$(LDLIBRARY)
  953.  
  954. # This installs Mac/Lib into the framework
  955. # Install a number of symlinks to keep software that expects a normal unix
  956. # install (which includes python-config) happy.
  957. frameworkinstallmaclib:
  958.     ln -fs "../../../Python" "$(DESTDIR)$(prefix)/lib/python$(VERSION)/config/libpython$(VERSION).a"
  959.     cd Mac && $(MAKE) installmacsubtree DESTDIR="$(DESTDIR)"
  960.  
  961. # This installs the IDE, the Launcher and other apps into /Applications
  962. frameworkinstallapps:
  963.     cd Mac && $(MAKE) installapps DESTDIR="$(DESTDIR)"
  964.  
  965. # This install the unix python and pythonw tools in /usr/local/bin
  966. frameworkinstallunixtools:
  967.     cd Mac && $(MAKE) installunixtools DESTDIR="$(DESTDIR)"
  968.  
  969. frameworkaltinstallunixtools:
  970.     cd Mac && $(MAKE) altinstallunixtools DESTDIR="$(DESTDIR)"
  971.  
  972. # This installs the Demos and Tools into the applications directory.
  973. # It is not part of a normal frameworkinstall
  974. frameworkinstallextras:
  975.     cd Mac && Make installextras DESTDIR="$(DESTDIR)"
  976.  
  977. # This installs a few of the useful scripts in Tools/scripts
  978. scriptsinstall:
  979.     SRCDIR=$(srcdir) $(RUNSHARED) \
  980.     ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
  981.     --prefix=$(prefix) \
  982.     --install-scripts=$(BINDIR) \
  983.     --root=/$(DESTDIR)
  984.  
  985. # Build the toplevel Makefile
  986. Makefile.pre: Makefile.pre.in config.status
  987.     CONFIG_FILES=Makefile.pre CONFIG_HEADERS= $(SHELL) config.status
  988.     $(MAKE) -f Makefile.pre Makefile
  989.  
  990. # Run the configure script.
  991. config.status:    $(srcdir)/configure
  992.     $(SHELL) $(srcdir)/configure $(CONFIG_ARGS)
  993.  
  994. .PRECIOUS: config.status $(BUILDPYTHON) Makefile Makefile.pre
  995.  
  996. # Some make's put the object file in the current directory
  997. .c.o:
  998.     $(CC) -c $(PY_CFLAGS) -o $@ $<
  999.  
  1000. # Run reindent on the library
  1001. reindent:
  1002.     ./python$(EXEEXT) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
  1003.  
  1004. # Rerun configure with the same options as it was run last time,
  1005. # provided the config.status script exists
  1006. recheck:
  1007.     $(SHELL) config.status --recheck
  1008.     $(SHELL) config.status
  1009.  
  1010. # Rebuild the configure script from configure.in; also rebuild pyconfig.h.in
  1011. autoconf:
  1012.     (cd $(srcdir); autoconf)
  1013.     (cd $(srcdir); autoheader)
  1014.  
  1015. # Create a tags file for vi
  1016. tags::
  1017.     cd $(srcdir); \
  1018.     ctags -w -t Include/*.h; \
  1019.     for i in $(SRCDIRS); do ctags -w -t -a $$i/*.[ch]; \
  1020.     done; \
  1021.     sort -o tags tags
  1022.  
  1023. # Create a tags file for GNU Emacs
  1024. TAGS::
  1025.     cd $(srcdir); \
  1026.     etags Include/*.h; \
  1027.     for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done
  1028.  
  1029. # Sanitation targets -- clean leaves libraries, executables and tags
  1030. # files, which clobber removes those as well
  1031. pycremoval:
  1032.     find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
  1033.  
  1034. clean: pycremoval
  1035.     find . -name '*.o' -exec rm -f {} ';'
  1036.     find . -name '*.s[ol]' -exec rm -f {} ';'
  1037.     find $(srcdir)/build -name 'fficonfig.h' -exec rm -f {} ';' || true
  1038.     find $(srcdir)/build -name 'fficonfig.py' -exec rm -f {} ';' || true
  1039.  
  1040. clobber: clean
  1041.     -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
  1042.         tags TAGS \
  1043.         config.cache config.log pyconfig.h Modules/config.c
  1044.     -rm -rf build platform
  1045.     -rm -rf $(PYTHONFRAMEWORKDIR)
  1046.  
  1047. # Make things extra clean, before making a distribution:
  1048. # remove all generated files, even Makefile[.pre]
  1049. # Keep configure and Python-ast.[ch], it's possible they can't be generated
  1050. distclean: clobber
  1051.     -rm -f core Makefile Makefile.pre config.status \
  1052.         Modules/Setup Modules/Setup.local Modules/Setup.config
  1053.     find $(srcdir) '(' -name '*.fdc' -o -name '*~' \
  1054.                -o -name '[@,#]*' -o -name '*.old' \
  1055.                -o -name '*.orig' -o -name '*.rej' \
  1056.                -o -name '*.bak' ')' \
  1057.                -exec rm -f {} ';'
  1058.  
  1059. # Check for smelly exported symbols (not starting with Py/_Py)
  1060. smelly: all
  1061.     nm -p $(LIBRARY) | \
  1062.         sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
  1063.  
  1064. # Find files with funny names
  1065. funny:
  1066.     find $(DISTDIRS) -type d \
  1067.         -o -name '*.[chs]' \
  1068.         -o -name '*.py' \
  1069.         -o -name '*.doc' \
  1070.         -o -name '*.sty' \
  1071.         -o -name '*.bib' \
  1072.         -o -name '*.dat' \
  1073.         -o -name '*.el' \
  1074.         -o -name '*.fd' \
  1075.         -o -name '*.in' \
  1076.         -o -name '*.tex' \
  1077.         -o -name '*,[vpt]' \
  1078.         -o -name 'Setup' \
  1079.         -o -name 'Setup.*' \
  1080.         -o -name README \
  1081.         -o -name Makefile \
  1082.         -o -name ChangeLog \
  1083.         -o -name Repository \
  1084.         -o -name Root \
  1085.         -o -name Entries \
  1086.         -o -name Tag \
  1087.         -o -name tags \
  1088.         -o -name TAGS \
  1089.         -o -name .cvsignore \
  1090.         -o -name MANIFEST \
  1091.         -o -print
  1092.  
  1093. # Dependencies
  1094.  
  1095. Python/thread.o:  $(srcdir)/Python/thread_atheos.h $(srcdir)/Python/thread_beos.h $(srcdir)/Python/thread_cthread.h $(srcdir)/Python/thread_foobar.h $(srcdir)/Python/thread_lwp.h $(srcdir)/Python/thread_nt.h $(srcdir)/Python/thread_os2.h $(srcdir)/Python/thread_pth.h $(srcdir)/Python/thread_pthread.h $(srcdir)/Python/thread_sgi.h $(srcdir)/Python/thread_solaris.h $(srcdir)/Python/thread_wince.h
  1096.  
  1097. # Declare targets that aren't real files
  1098. .PHONY: all sharedmods oldsharedmods test quicktest memtest
  1099. .PHONY: install altinstall oldsharedinstall bininstall altbininstall
  1100. .PHONY: maninstall libinstall inclinstall libainstall sharedinstall
  1101. .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
  1102. .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
  1103. .PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean 
  1104. .PHONY: smelly funny
  1105.  
  1106. # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
  1107.  
  1108. # Rules appended by makedepend
  1109.  
  1110. Modules/threadmodule.o: $(srcdir)/Modules/threadmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/threadmodule.c -o Modules/threadmodule.o
  1111. Modules/threadmodule$(SO):  Modules/threadmodule.o; $(LDSHARED)  Modules/threadmodule.o   -o Modules/threadmodule$(SO)
  1112. Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/signalmodule.c -o Modules/signalmodule.o
  1113. Modules/signalmodule$(SO):  Modules/signalmodule.o; $(LDSHARED)  Modules/signalmodule.o   -o Modules/signalmodule$(SO)
  1114. Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/posixmodule.c -o Modules/posixmodule.o
  1115. Modules/posixmodule$(SO):  Modules/posixmodule.o; $(LDSHARED)  Modules/posixmodule.o   -o Modules/posixmodule$(SO)
  1116. Modules/errnomodule.o: $(srcdir)/Modules/errnomodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/errnomodule.c -o Modules/errnomodule.o
  1117. Modules/errnomodule$(SO):  Modules/errnomodule.o; $(LDSHARED)  Modules/errnomodule.o   -o Modules/errnomodule$(SO)
  1118. Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/pwdmodule.c -o Modules/pwdmodule.o
  1119. Modules/pwdmodule$(SO):  Modules/pwdmodule.o; $(LDSHARED)  Modules/pwdmodule.o   -o Modules/pwdmodule$(SO)
  1120. Modules/_sre.o: $(srcdir)/Modules/_sre.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/_sre.c -o Modules/_sre.o
  1121. Modules/_sre$(SO):  Modules/_sre.o; $(LDSHARED)  Modules/_sre.o   -o Modules/_sre$(SO)
  1122. Modules/_codecsmodule.o: $(srcdir)/Modules/_codecsmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/_codecsmodule.c -o Modules/_codecsmodule.o
  1123. Modules/_codecsmodule$(SO):  Modules/_codecsmodule.o; $(LDSHARED)  Modules/_codecsmodule.o   -o Modules/_codecsmodule$(SO)
  1124. Modules/zipimport.o: $(srcdir)/Modules/zipimport.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/zipimport.c -o Modules/zipimport.o
  1125. Modules/zipimport$(SO):  Modules/zipimport.o; $(LDSHARED)  Modules/zipimport.o   -o Modules/zipimport$(SO)
  1126. Modules/symtablemodule.o: $(srcdir)/Modules/symtablemodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/symtablemodule.c -o Modules/symtablemodule.o
  1127. Modules/_symtablemodule$(SO):  Modules/symtablemodule.o; $(LDSHARED)  Modules/symtablemodule.o   -o Modules/_symtablemodule$(SO)
  1128. Modules/xxsubtype.o: $(srcdir)/Modules/xxsubtype.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/xxsubtype.c -o Modules/xxsubtype.o
  1129. Modules/xxsubtype$(SO):  Modules/xxsubtype.o; $(LDSHARED)  Modules/xxsubtype.o   -o Modules/xxsubtype$(SO)
  1130.