Staging
v0.5.1
https://github.com/python/cpython
Revision eb26ba258b69eab296e38a8713747e965b926e2c authored by Georg Brandl on 13 August 2009, 08:12:33 UTC, committed by Georg Brandl on 13 August 2009, 08:12:33 UTC
................
  r73621 | benjamin.peterson | 2009-06-28 18:39:56 +0200 (So, 28 Jun 2009) | 53 lines

  Blocked revisions 73382,73394-73397,73401-73402,73422,73480,73536,73540 via svnmerge

  ........
    r73382 | raymond.hettinger | 2009-06-11 18:14:53 -0500 (Thu, 11 Jun 2009) | 1 line

    Issue 6261: Clarify behavior of random.uniform().
  ........
    r73394 | antoine.pitrou | 2009-06-12 15:14:08 -0500 (Fri, 12 Jun 2009) | 3 lines

    Issue #6215: backport the 3.1 io lib
  ........
    r73395 | antoine.pitrou | 2009-06-12 15:36:25 -0500 (Fri, 12 Jun 2009) | 4 lines

    Restore the old test_file.py (for the builtin file object) as a new file named test_file2k.py
  ........
    r73396 | antoine.pitrou | 2009-06-12 15:41:52 -0500 (Fri, 12 Jun 2009) | 4 lines

    Try to restore the old test_file and test_univnewlines as new, different files
    (with the right revisions this time, hopefully)
  ........
    r73397 | antoine.pitrou | 2009-06-12 15:54:21 -0500 (Fri, 12 Jun 2009) | 3 lines

    Re-enable testing of builtin open() in test_bufio in test_largefile
  ........
    r73401 | alexandre.vassalotti | 2009-06-12 16:52:14 -0500 (Fri, 12 Jun 2009) | 2 lines

    Make pickling of OrderedDict instances more efficient.
  ........
    r73402 | alexandre.vassalotti | 2009-06-12 18:03:35 -0500 (Fri, 12 Jun 2009) | 6 lines

    Revert r73401 per Raymond Hettinger's request.

    The rational is the change might cause imcompatiblity problems with
    PyYAML. In addition, Raymond wants to kept the different versions of
    collections synchronized across Python versions.
  ........
    r73422 | benjamin.peterson | 2009-06-13 15:30:48 -0500 (Sat, 13 Jun 2009) | 1 line

    update ast version
  ........
    r73480 | facundo.batista | 2009-06-19 13:02:28 -0500 (Fri, 19 Jun 2009) | 3 lines

    Issue #6274. Fixed a potential FD leak in subprocess.py.
  ........
    r73536 | raymond.hettinger | 2009-06-23 16:32:28 -0500 (Tue, 23 Jun 2009) | 1 line

    Issue 6305: Clarify error message for large arguments to itertools.islice().
  ........
    r73540 | raymond.hettinger | 2009-06-23 17:20:04 -0500 (Tue, 23 Jun 2009) | 1 line

    Add procedural note.
  ........
................
  r73622 | benjamin.peterson | 2009-06-28 18:51:58 +0200 (So, 28 Jun 2009) | 12 lines

  Blocked revisions 73459,73563 via svnmerge

  ........
    r73459 | raymond.hettinger | 2009-06-16 20:43:47 -0500 (Tue, 16 Jun 2009) | 1 line

    Add usage note.
  ........
    r73563 | amaury.forgeotdarc | 2009-06-25 16:29:32 -0500 (Thu, 25 Jun 2009) | 2 lines

    Fix a compilation warning on Windows
  ........
................
  r73628 | benjamin.peterson | 2009-06-28 21:29:09 +0200 (So, 28 Jun 2009) | 8 lines

  Blocked revisions 73627 via svnmerge

  ........
    r73627 | benjamin.peterson | 2009-06-28 14:27:55 -0500 (Sun, 28 Jun 2009) | 1 line

    return locals and cells in get_locals() not bound globals, though
  ........
................
  r73655 | mark.dickinson | 2009-06-28 23:59:52 +0200 (So, 28 Jun 2009) | 8 lines

  Blocked revisions 73653 via svnmerge

  ........
    r73653 | mark.dickinson | 2009-06-28 22:48:15 +0100 (Sun, 28 Jun 2009) | 1 line

    More Decimal quote fixing;  backport of r73642
  ........
................
  r73657 | benjamin.peterson | 2009-06-29 00:24:31 +0200 (Mo, 29 Jun 2009) | 14 lines

  Blocked revisions 73272,73546 via svnmerge

  ........
    r73272 | kristjan.jonsson | 2009-06-07 11:43:23 -0500 (Sun, 07 Jun 2009) | 2 lines

    http://bugs.python.org/issue6192
    Add a feature to disable the Nagle algorithm on sockets in TCPServer
  ........
    r73546 | kristjan.jonsson | 2009-06-24 04:17:04 -0500 (Wed, 24 Jun 2009) | 2 lines

    http://bugs.python.org/issue6192
    Move the newly introduced disable_nagle_algorithm flag into the StreamRequestHandler, where it is more appropriate.
  ........
................
  r73680 | antoine.pitrou | 2009-06-29 16:17:23 +0200 (Mo, 29 Jun 2009) | 8 lines

  Blocked revisions 73679 via svnmerge

  ........
    r73679 | antoine.pitrou | 2009-06-29 16:14:56 +0200 (lun., 29 juin 2009) | 3 lines

    Backport fix for buglet from py3k
  ........
................
  r73687 | hirokazu.yamamoto | 2009-06-29 18:03:21 +0200 (Mo, 29 Jun 2009) | 8 lines

  Blocked revisions 73686 via svnmerge

  ........
    r73686 | hirokazu.yamamoto | 2009-06-30 00:52:21 +0900 | 1 line

    Issue #6368: Fixed unused variable warning on Unix.
  ........
................
  r73716 | benjamin.peterson | 2009-07-01 01:09:03 +0200 (Mi, 01 Jul 2009) | 8 lines

  Blocked revisions 73714 via svnmerge

  ........
    r73714 | benjamin.peterson | 2009-06-30 17:57:08 -0500 (Tue, 30 Jun 2009) | 1 line

    convert usage of fail* to assert*
  ........
................
  r73746 | benjamin.peterson | 2009-07-01 15:47:12 +0200 (Mi, 01 Jul 2009) | 13 lines

  Blocked revisions 73638,73697 via svnmerge

  ........
    r73638 | kristjan.jonsson | 2009-06-28 16:04:17 -0500 (Sun, 28 Jun 2009) | 2 lines

    http://bugs.python.org/issue6267
    Cumulative patch to http and xmlrpc
  ........
    r73697 | raymond.hettinger | 2009-06-29 14:10:29 -0500 (Mon, 29 Jun 2009) | 1 line

    Issue 6370: Performance issue with collections.Counter().
  ........
................
  r73777 | benjamin.peterson | 2009-07-02 20:18:56 +0200 (Do, 02 Jul 2009) | 8 lines

  Blocked revisions 73776 via svnmerge

  ........
    r73776 | benjamin.peterson | 2009-07-02 13:16:45 -0500 (Thu, 02 Jul 2009) | 1 line

    when print() gets unicode arguments, sep and end should be unicode by default #4618
  ........
................
  r73807 | benjamin.peterson | 2009-07-03 15:22:00 +0200 (Fr, 03 Jul 2009) | 1 line

  rip out bsddb support code
................
  r73843 | kristjan.jonsson | 2009-07-04 17:09:25 +0200 (Sa, 04 Jul 2009) | 2 lines

  http://bugs.python.org/issue6381
  merging revision 73819 from trunk
................
  r73844 | kristjan.jonsson | 2009-07-04 17:16:38 +0200 (Sa, 04 Jul 2009) | 1 line

  Revert last change, which was incorrect.
................
  r73853 | alexandre.vassalotti | 2009-07-05 08:31:55 +0200 (So, 05 Jul 2009) | 15 lines

  Blocked revisions 73846-73847 via svnmerge

  ........
    r73846 | alexandre.vassalotti | 2009-07-05 00:22:40 -0400 (Sun, 05 Jul 2009) | 6 lines

    Issue 2370: Add Python 3 warnings for the removal of operator.isCallable and
    operator.sequenceIncludes.

    Patch contributed by Jeff Balogh (and updated slightly by me).
  ........
    r73847 | alexandre.vassalotti | 2009-07-05 00:25:46 -0400 (Sun, 05 Jul 2009) | 2 lines

    Fix bad variable name in r73846.
  ........
................
  r73855 | alexandre.vassalotti | 2009-07-05 08:34:48 +0200 (So, 05 Jul 2009) | 8 lines

  Blocked revisions 73854 via svnmerge

  ........
    r73854 | alexandre.vassalotti | 2009-07-05 02:33:41 -0400 (Sun, 05 Jul 2009) | 2 lines

    Backport test cases added in r73852.
  ........
................
  r73860 | mark.dickinson | 2009-07-05 12:03:49 +0200 (So, 05 Jul 2009) | 9 lines

  Blocked revisions 73858 via svnmerge

  ........
    r73858 | mark.dickinson | 2009-07-05 11:01:24 +0100 (Sun, 05 Jul 2009) | 3 lines

    Issues #1530559, #1741130:  Fix various inconsistencies in struct.pack
    integer packing, and reenable some previously broken tests.
  ........
................
  r73886 | mark.dickinson | 2009-07-07 13:09:38 +0200 (Di, 07 Jul 2009) | 8 lines

  Blocked revisions 73884 via svnmerge

  ........
    r73884 | mark.dickinson | 2009-07-07 12:08:23 +0100 (Tue, 07 Jul 2009) | 1 line

    Add skipping to struct test that only applies when overflow masking is in effect
  ........
................
  r73890 | mark.dickinson | 2009-07-07 16:18:33 +0200 (Di, 07 Jul 2009) | 9 lines

  Blocked revisions 73888 via svnmerge

  ........
    r73888 | mark.dickinson | 2009-07-07 15:15:45 +0100 (Tue, 07 Jul 2009) | 3 lines

    Expand test coverage for struct.pack with native integer packing;
    reorganize the test_struct module to remove duplicated code and tests.
  ........
................
  r73893 | mark.dickinson | 2009-07-07 17:09:33 +0200 (Di, 07 Jul 2009) | 9 lines

  Blocked revisions 73891 via svnmerge

  ........
    r73891 | mark.dickinson | 2009-07-07 16:08:28 +0100 (Tue, 07 Jul 2009) | 3 lines

    Issue #1523: Remove deprecated overflow masking in struct module, and
    make sure that out-of-range values consistently raise struct.error.
  ........
................
  r73909 | r.david.murray | 2009-07-09 21:47:26 +0200 (Do, 09 Jul 2009) | 9 lines

  Blocked revisions 73907 via svnmerge

  ........
    r73907 | r.david.murray | 2009-07-09 12:17:30 -0400 (Thu, 09 Jul 2009) | 4 lines

    Temporarily ignore rmtree errors in test_getcwd_long_pathnames to see
    if the test gives useful failure info on Solaris buildbot.
  ........
................
  r73936 | georg.brandl | 2009-07-11 12:08:49 +0200 (Sa, 11 Jul 2009) | 1 line

  Revert r73807, which removed code to be able to build _dbm with bsddb.
................
  r73950 | tarek.ziade | 2009-07-11 13:02:29 +0200 (Sa, 11 Jul 2009) | 8 lines

  Blocked revisions 73944 via svnmerge

  ........
    r73944 | tarek.ziade | 2009-07-11 12:48:31 +0200 (Sat, 11 Jul 2009) | 1 line

    cleaned up distutils.build_ext module
  ........
................
  r73980 | benjamin.peterson | 2009-07-12 19:02:22 +0200 (So, 12 Jul 2009) | 8 lines

  Blocked revisions 73979 via svnmerge

  ........
    r73979 | benjamin.peterson | 2009-07-12 11:56:54 -0500 (Sun, 12 Jul 2009) | 1 line

    add versionadded
  ........
................
  r73992 | benjamin.peterson | 2009-07-13 01:58:08 +0200 (Mo, 13 Jul 2009) | 8 lines

  Blocked revisions 73991 via svnmerge

  ........
    r73991 | benjamin.peterson | 2009-07-12 18:56:18 -0500 (Sun, 12 Jul 2009) | 1 line

    change encoding to utf-8
  ........
................
  r74016 | alexandre.vassalotti | 2009-07-15 20:32:08 +0200 (Mi, 15 Jul 2009) | 9 lines

  Blocked revisions 74014 via svnmerge

  ........
    r74014 | alexandre.vassalotti | 2009-07-15 14:19:47 -0400 (Wed, 15 Jul 2009) | 3 lines

    Issue #2389: Pickle array objects using a list representation for portability
    across different machine architectures and compatibility with Python 3.x.
  ........
................
  r74035 | alexandre.vassalotti | 2009-07-17 07:41:49 +0200 (Fr, 17 Jul 2009) | 23 lines

  Blocked revisions 74031-74033 via svnmerge

  ........
    r74031 | alexandre.vassalotti | 2009-07-17 00:24:45 -0400 (Fri, 17 Jul 2009) | 2 lines

    Use AC_CHECK_SIZEOF to find the size of off_t, pthread_t and time_t.
  ........
    r74032 | alexandre.vassalotti | 2009-07-17 00:59:05 -0400 (Fri, 17 Jul 2009) | 4 lines

    Rename the useless AC_INCLUDES_DEFAULT and protect the includes.

    This is mostly an aesthetic change.
  ........
    r74033 | alexandre.vassalotti | 2009-07-17 01:26:39 -0400 (Fri, 17 Jul 2009) | 8 lines

    Cache the results of all runtime checks.

    This will be helpful to people who want to compile Python with a
    cross-compiler. Now you can upload the configure script on your host
    machine, run it with caching enabled, and download the cached results
    on your build machine.
  ........
................
  r74049 | alexandre.vassalotti | 2009-07-17 09:49:53 +0200 (Fr, 17 Jul 2009) | 2 lines

  Regenerate configure script.
................
  r74050 | alexandre.vassalotti | 2009-07-17 09:51:38 +0200 (Fr, 17 Jul 2009) | 8 lines

  Blocked revisions 74048 via svnmerge

  ........
    r74048 | alexandre.vassalotti | 2009-07-17 03:46:46 -0400 (Fri, 17 Jul 2009) | 2 lines

    Regenerate configure script.
  ........
................
  r74053 | alexandre.vassalotti | 2009-07-17 10:29:18 +0200 (Fr, 17 Jul 2009) | 17 lines

  Blocked revisions 74028-74029,74038 via svnmerge

  ........
    r74028 | georg.brandl | 2009-07-16 15:24:48 -0400 (Thu, 16 Jul 2009) | 1 line

    #6482: simplify "except: raise" to "finally:".
  ........
    r74029 | georg.brandl | 2009-07-16 17:47:51 -0400 (Thu, 16 Jul 2009) | 1 line

    Revert r74028.
  ........
    r74038 | alexandre.vassalotti | 2009-07-17 02:10:06 -0400 (Fri, 17 Jul 2009) | 3 lines

    Double-quote the test cases for chflags() and lchflags()
    to ensure they don't get mangled.
  ........
................
  r74060 | alexandre.vassalotti | 2009-07-17 13:12:50 +0200 (Fr, 17 Jul 2009) | 17 lines

  Blocked revisions 73774,73812,73839 via svnmerge

  ........
    r73774 | benjamin.peterson | 2009-07-02 13:06:17 -0400 (Thu, 02 Jul 2009) | 1 line

    only order comparisons are removed in py3k #6119
  ........
    r73812 | benjamin.peterson | 2009-07-03 10:08:20 -0400 (Fri, 03 Jul 2009) | 1 line

    another cStringIO restriction
  ........
    r73839 | gregory.p.smith | 2009-07-04 04:42:10 -0400 (Sat, 04 Jul 2009) | 3 lines

    Merge r73838 from py3k branch.  Use the nondeprecated unittest method
    names.
  ........
................
  r74061 | alexandre.vassalotti | 2009-07-17 13:20:13 +0200 (Fr, 17 Jul 2009) | 8 lines

  Blocked revisions 73773 via svnmerge

  ........
    r73773 | benjamin.peterson | 2009-07-02 12:51:56 -0400 (Thu, 02 Jul 2009) | 1 line

    remove this test; a module level warning is enough
  ........
................
  r74064 | alexandre.vassalotti | 2009-07-17 14:49:05 +0200 (Fr, 17 Jul 2009) | 29 lines

  Blocked revisions 73819,73821-73822,73863,73877 via svnmerge

  ........
    r73819 | kristjan.jonsson | 2009-07-03 19:07:07 -0400 (Fri, 03 Jul 2009) | 2 lines

    http://bugs.python.org/issue6381
    some platforms may raise ENOTCONN if the stack has disconnected the socket on behalf of the peer.
  ........
    r73821 | kristjan.jonsson | 2009-07-03 19:26:02 -0400 (Fri, 03 Jul 2009) | 2 lines

    http://bugs.python.org/issue6267
    Incorrect exception handling for xmlrp client retry
  ........
    r73822 | kristjan.jonsson | 2009-07-03 19:29:50 -0400 (Fri, 03 Jul 2009) | 2 lines

    http://bugs.python.org/issue6267
    Incorrect exception handling for xmlrpc client retry
  ........
    r73863 | kristjan.jonsson | 2009-07-05 16:56:57 -0400 (Sun, 05 Jul 2009) | 2 lines

    http://bugs.python.org/issue6382
    close_request() (which can send a socket.shutdown()) must be called by the child process in a forking server.  The parent must merely close the socket handle.
  ........
    r73877 | kristjan.jonsson | 2009-07-07 05:01:34 -0400 (Tue, 07 Jul 2009) | 2 lines

    http://bugs.python.org/issue6382
    added the shutdown_request() which can perform shutdown before calling close.  This is needed for the ForkingMixIn because different close semantics are required for child and parent process.  shutdown_request(), for TCP servers, calls socket.shutdown() and then calls close_request().  Therefore, this is not an backwards incompatible change, since subclasses that continue to override close_request() continue to work.
  ........
................
  r74068 | alexandre.vassalotti | 2009-07-18 01:11:52 +0200 (Sa, 18 Jul 2009) | 2 lines

  Revert r74049.
................
  r74071 | alexandre.vassalotti | 2009-07-18 01:27:40 +0200 (Sa, 18 Jul 2009) | 12 lines

  Blocked revisions 74067,74069 via svnmerge

  ........
    r74067 | alexandre.vassalotti | 2009-07-17 19:09:02 -0400 (Fri, 17 Jul 2009) | 2 lines

    Revert r74048.
  ........
    r74069 | alexandre.vassalotti | 2009-07-17 19:17:48 -0400 (Fri, 17 Jul 2009) | 2 lines

    Regenerate configure script using autoconf 2.61.
  ........
................
  r74082 | mark.dickinson | 2009-07-18 17:19:43 +0200 (Sa, 18 Jul 2009) | 9 lines

  Blocked revisions 74080 via svnmerge

  ........
    r74080 | mark.dickinson | 2009-07-18 16:18:18 +0100 (Sat, 18 Jul 2009) | 3 lines

    Issue #6431:  Fix Fraction comparisons with unknown types, and with
    float infinities and nans.  Backport of r74078 from py3k.
  ........
................
  r74120 | benjamin.peterson | 2009-07-20 22:36:45 +0200 (Mo, 20 Jul 2009) | 8 lines

  Blocked revisions 74119 via svnmerge

  ........
    r74119 | benjamin.peterson | 2009-07-20 15:28:08 -0500 (Mon, 20 Jul 2009) | 2 lines

    the Slice in x[::] has to have step as None to help the interpreter
  ........
................
  r74125 | alexandre.vassalotti | 2009-07-21 01:59:41 +0200 (Di, 21 Jul 2009) | 2 lines

  Ignore the correct jinga directory.
................
  r74129 | alexandre.vassalotti | 2009-07-21 02:55:16 +0200 (Di, 21 Jul 2009) | 2 lines

  Revert r74125.
................
  r74174 | benjamin.peterson | 2009-07-22 18:36:58 +0200 (Mi, 22 Jul 2009) | 12 lines

  Blocked revisions 74152,74173 via svnmerge

  ........
    r74152 | benjamin.peterson | 2009-07-21 19:03:43 -0500 (Tue, 21 Jul 2009) | 1 line

    simplify
  ........
    r74173 | benjamin.peterson | 2009-07-22 11:34:37 -0500 (Wed, 22 Jul 2009) | 1 line

    revert r74152
  ........
................
  r74191 | amaury.forgeotdarc | 2009-07-24 00:34:27 +0200 (Fr, 24 Jul 2009) | 10 lines

  Blocked revisions 74189 via svnmerge

  ........
    r74189 | amaury.forgeotdarc | 2009-07-23 21:26:02 +0200 (jeu., 23 juil. 2009) | 4 lines

    #6553: crash in cPickle.load(), when given a StringIO with incomplete data.

    Will backport to 2.6, 3.x already fixed a similar issue with issue4298.
  ........
................
  r74195 | georg.brandl | 2009-07-24 22:13:37 +0200 (Fr, 24 Jul 2009) | 8 lines

  Blocked revisions 74194 via svnmerge

  ........
    r74194 | georg.brandl | 2009-07-24 22:09:46 +0200 (Fr, 24 Jul 2009) | 1 line

    #6564: fix section about the two raise syntaxes.
  ........
................
  r74221 | eric.smith | 2009-07-27 04:00:11 +0200 (Mo, 27 Jul 2009) | 8 lines

  Blocked revisions 74219 via svnmerge

  ........
    r74219 | eric.smith | 2009-07-26 21:58:25 -0400 (Sun, 26 Jul 2009) | 1 line

    Sync trunk and py3k versions of string formatting. Will manually merge into py3k.
  ........
................
  r74236 | mark.dickinson | 2009-07-28 18:46:53 +0200 (Di, 28 Jul 2009) | 8 lines

  Blocked revisions 74234 via svnmerge

  ........
    r74234 | mark.dickinson | 2009-07-28 17:45:13 +0100 (Tue, 28 Jul 2009) | 1 line

    Remove leading blank line from cmath.rst
  ........
................
  r74242 | mark.dickinson | 2009-07-28 22:36:23 +0200 (Di, 28 Jul 2009) | 10 lines

  Blocked revisions 74240 via svnmerge

  ........
    r74240 | mark.dickinson | 2009-07-28 21:35:03 +0100 (Tue, 28 Jul 2009) | 4 lines

    Issue #6561: '\d' regular expression should not match characters of
    category [No]; only those of category [Nd].  (Backport of r74237
    from py3k.)
  ........
................
  r74244 | amaury.forgeotdarc | 2009-07-28 23:32:43 +0200 (Di, 28 Jul 2009) | 8 lines

  Blocked revisions 74243 via svnmerge

  ........
    r74243 | amaury.forgeotdarc | 2009-07-28 22:47:55 +0200 (mar., 28 juil. 2009) | 2 lines

    "Fix" for the refleak report: the ABC classes are now in the _pyio module
  ........
................
  r74257 | georg.brandl | 2009-07-29 18:33:19 +0200 (Mi, 29 Jul 2009) | 8 lines

  Blocked revisions 74256 via svnmerge

  ........
    r74256 | georg.brandl | 2009-07-29 16:32:30 +0000 (Mi, 29 Jul 2009) | 1 line

    #6336: Add nb_divide.
  ........
................
  r74263 | alexandre.vassalotti | 2009-07-29 22:00:39 +0200 (Mi, 29 Jul 2009) | 13 lines

  Blocked revisions 74134,74147 via svnmerge

  ........
    r74134 | thomas.heller | 2009-07-21 02:27:14 -0400 (Tue, 21 Jul 2009) | 3 lines

    Issue #6493: Fix a ctypes problem setting bitfields more than 31 bits
    wide.
  ........
    r74147 | thomas.heller | 2009-07-21 15:04:02 -0400 (Tue, 21 Jul 2009) | 1 line

    Revert rev 74134, as it does not completely fixx issue #6493.
  ........
................
  r74283 | mark.dickinson | 2009-08-02 13:02:05 +0200 (So, 02 Aug 2009) | 10 lines

  Blocked revisions 74281 via svnmerge

  ........
    r74281 | mark.dickinson | 2009-08-02 11:59:36 +0100 (Sun, 02 Aug 2009) | 4 lines

    Issue #6595: Allow Decimal constructor to accept non-European decimal
    digits, as recommended by the specification.  (Backport of r74279 from
    py3k.)
  ........
................
1 parent 8a038b2
Raw File
Tip revision: eb26ba258b69eab296e38a8713747e965b926e2c authored by Georg Brandl on 13 August 2009, 08:12:33 UTC
Blocked revisions 73621-73622,73628,73655,73657,73680,73687,73716,73746,73777,73807,73843-73844,73853,73855,73860,73886,73890,73893,73909,73936,73950,73980,73992,74016,74035,74049-74050,74053,74060-74061,74064,74068,74071,74082,74120,74125,74129,74174,74191,74195,74221,74236,74242,74244,74257,74263,74283 via svnmerge
Tip revision: eb26ba2
Makefile.pre.in
# Top-level Makefile for Python
#
# As distributed, this file is called Makefile.pre.in; it is processed
# into the real Makefile by running the script ./configure, which
# replaces things like @spam@ with values appropriate for your system.
# This means that if you edit Makefile, your changes get lost the next
# time you run the configure script.  Ideally, you can do:
#
#	./configure
#	make
#	make test
#	make install
#
# If you have a previous version of Python installed that you don't
# want to overwrite, you can use "make altinstall" instead of "make
# install".  Refer to the "Installing" section in the README file for
# additional details.
#
# See also the section "Build instructions" in the README file.

# === Variables set by makesetup ===

MODOBJS=        _MODOBJS_
MODLIBS=        _MODLIBS_

# === Variables set by configure
VERSION=	@VERSION@
srcdir=		@srcdir@
VPATH=		@srcdir@

CC=		@CC@
CXX=		@CXX@
MAINCC=		@MAINCC@
LINKCC=		@LINKCC@
AR=		@AR@
RANLIB=		@RANLIB@
SVNVERSION=	@SVNVERSION@

GNULD=          @GNULD@

# Shell used by make (some versions default to the login shell, which is bad)
SHELL=		/bin/sh

# Use this to make a link between python$(VERSION) and python in $(BINDIR)
LN=		@LN@

# Portable install script (configure doesn't always guess right)
INSTALL=	@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_SCRIPT= @INSTALL_SCRIPT@
INSTALL_DATA=	@INSTALL_DATA@
# Shared libraries must be installed with executable mode on some systems;
# rather than figuring out exactly which, we always give them executable mode.
# Also, making them read-only seems to be a good idea...
INSTALL_SHARED= ${INSTALL} -m 555

MAKESETUP=      $(srcdir)/Modules/makesetup

# Compiler options
OPT=		@OPT@
BASECFLAGS=	@BASECFLAGS@
CFLAGS=		$(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS)
# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
# be able to build extension modules using the directories specified in the
# environment variables
CPPFLAGS=	-I. -IInclude -I$(srcdir)/Include @CPPFLAGS@
LDFLAGS=	@LDFLAGS@
LDLAST=		@LDLAST@
SGI_ABI=	@SGI_ABI@
CCSHARED=	@CCSHARED@
LINKFORSHARED=	@LINKFORSHARED@
ARFLAGS=	@ARFLAGS@
# Extra C flags added for building the interpreter object files.
CFLAGSFORSHARED=@CFLAGSFORSHARED@
# C flags used for building the interpreter object files
PY_CFLAGS=	$(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE


# Machine-dependent subdirectories
MACHDEP=	@MACHDEP@

# Install prefix for architecture-independent files
prefix=		@prefix@

# Install prefix for architecture-dependent files
exec_prefix=	@exec_prefix@

# Install prefix for data files
datarootdir=    @datarootdir@

# Expanded directories
BINDIR=		$(exec_prefix)/bin
LIBDIR=		$(exec_prefix)/lib
MANDIR=		@mandir@
INCLUDEDIR=	@includedir@
CONFINCLUDEDIR=	$(exec_prefix)/include
SCRIPTDIR=	$(prefix)/lib

# Detailed destination directories
BINLIBDEST=	$(LIBDIR)/python$(VERSION)
LIBDEST=	$(SCRIPTDIR)/python$(VERSION)
INCLUDEPY=	$(INCLUDEDIR)/python$(VERSION)
CONFINCLUDEPY=	$(CONFINCLUDEDIR)/python$(VERSION)
LIBP=		$(LIBDIR)/python$(VERSION)

# Symbols used for using shared libraries
SO=		@SO@
LDSHARED=	@LDSHARED@
BLDSHARED=	@BLDSHARED@
DESTSHARED=	$(BINLIBDEST)/lib-dynload

# Executable suffix (.exe on Windows and Mac OS X)
EXE=		@EXEEXT@
BUILDEXE=	@BUILDEXEEXT@

# Short name and location for Mac OS X Python framework
UNIVERSALSDK=@UNIVERSALSDK@
PYTHONFRAMEWORK=	@PYTHONFRAMEWORK@
PYTHONFRAMEWORKDIR=	@PYTHONFRAMEWORKDIR@
PYTHONFRAMEWORKPREFIX=	@PYTHONFRAMEWORKPREFIX@
PYTHONFRAMEWORKINSTALLDIR= @PYTHONFRAMEWORKINSTALLDIR@
# Deployment target selected during configure, to be checked
# by distutils. The export statement is needed to ensure that the
# deployment target is active during build.
MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET

# Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@

# Environment to run shared python without installed libraries
RUNSHARED=       @RUNSHARED@

# Modes for directories, executables and data files created by the
# install process.  Default to user-only-writable for all file types.
DIRMODE=	755
EXEMODE=	755
FILEMODE=	644

# configure script arguments
CONFIG_ARGS=	@CONFIG_ARGS@


# Subdirectories with code
SRCDIRS= 	@SRCDIRS@

# Other subdirectories
SUBDIRSTOO=	Include Lib Misc Demo

# Files and directories to be distributed
CONFIGFILES=	configure configure.in acconfig.h pyconfig.h.in Makefile.pre.in
DISTFILES=	README ChangeLog $(CONFIGFILES)
DISTDIRS=	$(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
DIST=		$(DISTFILES) $(DISTDIRS)


LIBRARY=	@LIBRARY@
LDLIBRARY=      @LDLIBRARY@
BLDLIBRARY=     @BLDLIBRARY@
DLLLIBRARY=	@DLLLIBRARY@
LDLIBRARYDIR=   @LDLIBRARYDIR@
INSTSONAME=	@INSTSONAME@


LIBS=		@LIBS@
LIBM=		@LIBM@
LIBC=		@LIBC@
SYSLIBS=	$(LIBM) $(LIBC)
SHLIBS=		@SHLIBS@

THREADOBJ=	@THREADOBJ@
DLINCLDIR=	@DLINCLDIR@
DYNLOADFILE=	@DYNLOADFILE@
MACHDEP_OBJS=	@MACHDEP_OBJS@
LIBOBJDIR=	Python/
LIBOBJS=	@LIBOBJS@

PYTHON=		python$(EXE)
BUILDPYTHON=	python$(BUILDEXE)

# The task to run while instrument when building the profile-opt target
PROFILE_TASK=	$(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
#PROFILE_TASK=	$(srcdir)/Lib/test/regrtest.py

# === Definitions added by makesetup ===


##########################################################################
# Modules
MODULE_OBJS=	\
		Modules/config.o \
		Modules/getpath.o \
		Modules/main.o \
		Modules/gcmodule.o

# Used of signalmodule.o is not available
SIGNAL_OBJS=	@SIGNAL_OBJS@

IO_H=		Modules/_io/_iomodule.h

IO_OBJS=	\
		Modules/_io/_iomodule.o \
		Modules/_io/iobase.o \
		Modules/_io/fileio.o \
		Modules/_io/bufferedio.o \
		Modules/_io/textio.o \
		Modules/_io/bytesio.o \
		Modules/_io/stringio.o

##########################################################################
# Grammar
GRAMMAR_H=	$(srcdir)/Include/graminit.h
GRAMMAR_C=	$(srcdir)/Python/graminit.c
GRAMMAR_INPUT=	$(srcdir)/Grammar/Grammar


##########################################################################
# Parser
PGEN=		Parser/pgen$(EXE)

POBJS=		\
		Parser/acceler.o \
		Parser/grammar1.o \
		Parser/listnode.o \
		Parser/node.o \
		Parser/parser.o \
		Parser/parsetok.o \
		Parser/bitset.o \
		Parser/metagrammar.o \
		Parser/firstsets.o \
		Parser/grammar.o \
		Parser/pgen.o

PARSER_OBJS=	$(POBJS) Parser/myreadline.o Parser/tokenizer.o

PGOBJS=		\
		Objects/obmalloc.o \
		Python/mysnprintf.o \
		Parser/tokenizer_pgen.o \
		Parser/printgrammar.o \
		Parser/pgenmain.o

PARSER_HEADERS= \
		Parser/parser.h \
		Parser/tokenizer.h

PGENOBJS=	$(PGENMAIN) $(POBJS) $(PGOBJS)

##########################################################################
# AST
AST_H_DIR=	$(srcdir)/Include
AST_H=		$(AST_H_DIR)/Python-ast.h
AST_C_DIR=	$(srcdir)/Python
AST_C=		$(AST_C_DIR)/Python-ast.c
AST_ASDL=	$(srcdir)/Parser/Python.asdl

ASDLGEN_FILES=	$(srcdir)/Parser/asdl.py $(srcdir)/Parser/asdl_c.py
# XXX Note that a build now requires Python exist before the build starts
ASDLGEN=	$(srcdir)/Parser/asdl_c.py

##########################################################################
# Python

OPCODETARGETS_H= \
		$(srcdir)/Python/opcode_targets.h

OPCODETARGETGEN= \
		$(srcdir)/Python/makeopcodetargets.py

OPCODETARGETGEN_FILES= \
		$(OPCODETARGETGEN) $(srcdir)/Lib/opcode.py

PYTHON_OBJS=	\
		Python/_warnings.o \
		Python/Python-ast.o \
		Python/asdl.o \
		Python/ast.o \
		Python/bltinmodule.o \
		Python/ceval.o \
		Python/compile.o \
		Python/codecs.o \
		Python/errors.o \
		Python/frozen.o \
		Python/frozenmain.o \
		Python/future.o \
		Python/getargs.o \
		Python/getcompiler.o \
		Python/getcopyright.o \
		Python/getplatform.o \
		Python/getversion.o \
		Python/graminit.o \
		Python/import.o \
		Python/importdl.o \
		Python/marshal.o \
		Python/modsupport.o \
		Python/mystrtoul.o \
		Python/mysnprintf.o \
		Python/peephole.o \
		Python/pyarena.o \
		Python/pyctype.o \
		Python/pyfpe.o \
		Python/pymath.o \
		Python/pystate.o \
		Python/pythonrun.o \
		Python/structmember.o \
		Python/symtable.o \
		Python/sysmodule.o \
		Python/traceback.o \
		Python/getopt.o \
		Python/pystrcmp.o \
		Python/pystrtod.o \
		Python/dtoa.o \
		Python/formatter_unicode.o \
		Python/$(DYNLOADFILE) \
		$(LIBOBJS) \
		$(MACHDEP_OBJS) \
		$(THREADOBJ)


##########################################################################
# Objects
OBJECT_OBJS=	\
		Objects/abstract.o \
		Objects/boolobject.o \
		Objects/bytes_methods.o \
		Objects/bytearrayobject.o \
		Objects/bytesobject.o \
		Objects/cellobject.o \
		Objects/classobject.o \
		Objects/cobject.o \
		Objects/codeobject.o \
		Objects/complexobject.o \
		Objects/descrobject.o \
		Objects/enumobject.o \
		Objects/exceptions.o \
		Objects/genobject.o \
		Objects/fileobject.o \
		Objects/floatobject.o \
		Objects/frameobject.o \
		Objects/funcobject.o \
		Objects/iterobject.o \
		Objects/listobject.o \
		Objects/longobject.o \
		Objects/dictobject.o \
		Objects/memoryobject.o \
		Objects/methodobject.o \
		Objects/moduleobject.o \
		Objects/object.o \
		Objects/obmalloc.o \
		Objects/capsule.o \
		Objects/rangeobject.o \
                Objects/setobject.o \
		Objects/sliceobject.o \
		Objects/structseq.o \
		Objects/tupleobject.o \
		Objects/typeobject.o \
		Objects/unicodeobject.o \
		Objects/unicodectype.o \
		Objects/weakrefobject.o


##########################################################################
# objects that get linked into the Python library
LIBRARY_OBJS=	\
		Modules/getbuildinfo.o \
		$(PARSER_OBJS) \
		$(OBJECT_OBJS) \
		$(PYTHON_OBJS) \
		$(MODULE_OBJS) \
		$(SIGNAL_OBJS) \
		$(MODOBJS)

#########################################################################
# Rules

# Default target
all:		build_all
build_all:	$(BUILDPYTHON) oldsharedmods sharedmods

# Compile a binary with gcc profile guided optimization.
profile-opt:
	@echo "Building with support for profile generation:"
	$(MAKE) clean
	$(MAKE) build_all_generate_profile
	@echo "Running benchmark to generate profile data:"
	$(MAKE) profile-removal
	$(MAKE) run_profile_task
	@echo "Rebuilding with profile guided optimizations:"
	$(MAKE) clean
	$(MAKE) build_all_use_profile

build_all_generate_profile:
	$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"

run_profile_task:
	./$(BUILDPYTHON) $(PROFILE_TASK)

build_all_use_profile:
	$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"

coverage:
	@echo "Building with support for coverage checking:"
	$(MAKE) clean
	$(MAKE) all CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -lgcov"


# Build the interpreter
$(BUILDPYTHON):	Modules/python.o $(LIBRARY) $(LDLIBRARY)
		$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
			Modules/python.o \
			$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)

platform: $(BUILDPYTHON)
	$(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform


# Build the shared modules
sharedmods: $(BUILDPYTHON)
	@case $$MAKEFLAGS in \
	*s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
	esac

# Build static library
# avoid long command lines, same as LIBRARY_OBJS
$(LIBRARY): $(LIBRARY_OBJS)
	-rm -f $@
	$(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o
	$(AR) $(ARFLAGS) $@ $(PARSER_OBJS)
	$(AR) $(ARFLAGS) $@ $(OBJECT_OBJS)
	$(AR) $(ARFLAGS) $@ $(PYTHON_OBJS)
	$(AR) $(ARFLAGS) $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
	$(AR) $(ARFLAGS) $@ $(MODOBJS)
	$(RANLIB) $@

libpython$(VERSION).so: $(LIBRARY_OBJS)
	if test $(INSTSONAME) != $(LDLIBRARY); then \
		$(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
		$(LN) -f $(INSTSONAME) $@; \
	else \
		$(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
	fi

libpython$(VERSION).dylib: $(LIBRARY_OBJS)
	 $(CC) -dynamiclib -Wl,-single_module $(LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(VERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
		 

libpython$(VERSION).sl: $(LIBRARY_OBJS)
	$(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)

# This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
# minimal framework (not including the Lib directory and such) in the current
# directory.
RESSRCDIR=Mac/Resources/framework
$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
		$(LIBRARY) \
		$(RESSRCDIR)/Info.plist
	$(INSTALL) -d -m $(DIRMODE) $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)
	if test "${UNIVERSALSDK}"; then \
		$(CC) -o $(LDLIBRARY) @UNIVERSAL_ARCH_FLAGS@ -dynamiclib \
			-isysroot "${UNIVERSALSDK}" \
			-all_load $(LIBRARY) -Wl,-single_module \
			-install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) \
			-compatibility_version $(VERSION) \
			-current_version $(VERSION) \
			-framework CoreFoundation $(LIBS); \
        else \
		/usr/bin/libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \
			@LIBTOOL_CRUFT@ -framework CoreFoundation $(LIBS);\
	fi
	$(INSTALL) -d -m $(DIRMODE)  \
		$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj
	$(INSTALL_DATA) $(RESSRCDIR)/Info.plist \
		$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/Info.plist
	$(LN) -fsn $(VERSION) $(PYTHONFRAMEWORKDIR)/Versions/Current
	$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)
	$(LN) -fsn Versions/Current/Headers $(PYTHONFRAMEWORKDIR)/Headers
	$(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources

# This rule builds the Cygwin Python DLL and import library if configured
# for a shared core library; otherwise, this rule is a noop.
$(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
	if test -n "$(DLLLIBRARY)"; then \
		$(LDSHARED) $(LDFLAGS) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
			$(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \
	else true; \
	fi


oldsharedmods: $(SHAREDMODS)


Makefile Modules/config.c: Makefile.pre \
				$(srcdir)/Modules/config.c.in \
				$(MAKESETUP) \
				Modules/Setup.config \
				Modules/Setup \
				Modules/Setup.local
	$(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \
				-s Modules \
				Modules/Setup.config \
				Modules/Setup.local \
				Modules/Setup
	@mv config.c Modules
	@echo "The Makefile was updated, you may need to re-run make."


Modules/Setup: $(srcdir)/Modules/Setup.dist
	@if test -f Modules/Setup; then \
		echo "-----------------------------------------------"; \
		echo "Modules/Setup.dist is newer than Modules/Setup;"; \
		echo "check to make sure you have all the updates you"; \
		echo "need in your Modules/Setup file."; \
		echo "Usually, copying Modules/Setup.dist to Modules/Setup will work."; \
		echo "-----------------------------------------------"; \
	fi

############################################################################
# Special rules for object files

Modules/getbuildinfo.o: $(PARSER_OBJS) \
		$(OBJECT_OBJS) \
		$(PYTHON_OBJS) \
		$(MODULE_OBJS) \
		$(SIGNAL_OBJS) \
		$(MODOBJS) \
		$(srcdir)/Modules/getbuildinfo.c
	$(CC) -c $(PY_CFLAGS) -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" -o $@ $(srcdir)/Modules/getbuildinfo.c

Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
	$(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
		-DPREFIX='"$(prefix)"' \
		-DEXEC_PREFIX='"$(exec_prefix)"' \
		-DVERSION='"$(VERSION)"' \
		-DVPATH='"$(VPATH)"' \
		-o $@ $(srcdir)/Modules/getpath.c

Modules/python.o: $(srcdir)/Modules/python.c
	$(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c

$(IO_OBJS): $(IO_H)

$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
		-@$(INSTALL) -d Include
		-$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)

$(PGEN):	$(PGENOBJS)
		$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)

Parser/grammar.o:	$(srcdir)/Parser/grammar.c \
				$(srcdir)/Include/token.h \
				$(srcdir)/Include/grammar.h
Parser/metagrammar.o:	$(srcdir)/Parser/metagrammar.c

Parser/tokenizer_pgen.o:	$(srcdir)/Parser/tokenizer.c

Parser/pgenmain.o:	$(srcdir)/Include/parsetok.h

$(AST_H): $(AST_ASDL) $(ASDLGEN_FILES)
	$(ASDLGEN) -h $(AST_H_DIR) $(AST_ASDL)

$(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
	$(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL)

Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)

Python/getplatform.o: $(srcdir)/Python/getplatform.c
		$(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c

Python/importdl.o: $(srcdir)/Python/importdl.c
		$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c

Objects/unicodectype.o:	$(srcdir)/Objects/unicodectype.c \
				$(srcdir)/Objects/unicodetype_db.h

BYTESTR_DEPS = \
		$(srcdir)/Include/bytes_methods.h \
		$(srcdir)/Objects/stringlib/count.h \
		$(srcdir)/Objects/stringlib/ctype.h \
		$(srcdir)/Objects/stringlib/eq.h \
		$(srcdir)/Objects/stringlib/fastsearch.h \
		$(srcdir)/Objects/stringlib/find.h \
		$(srcdir)/Objects/stringlib/partition.h \
		$(srcdir)/Objects/stringlib/stringdefs.h \
		$(srcdir)/Objects/stringlib/string_format.h \
		$(srcdir)/Objects/stringlib/transmogrify.h \
		$(srcdir)/Objects/stringlib/unicodedefs.h \
		$(srcdir)/Objects/stringlib/localeutil.h

Objects/bytesobject.o: $(srcdir)/Objects/bytesobject.c $(BYTESTR_DEPS)

Objects/bytearrayobject.o: $(srcdir)/Objects/bytearrayobject.c $(BYTESTR_DEPS) 

Objects/unicodeobject.o: $(srcdir)/Objects/unicodeobject.c \
				$(BYTESTR_DEPS)

$(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
	$(OPCODETARGETGEN) $(OPCODETARGETS_H)

Python/ceval.o: $(OPCODETARGETS_H)

Python/formatter_unicode.o: $(srcdir)/Python/formatter_unicode.c \
				$(BYTESTR_DEPS) \
				$(srcdir)/Objects/stringlib/formatter.h


############################################################################
# Header files

PYTHON_HEADERS= \
		Include/Python-ast.h \
		Include/Python.h \
		Include/abstract.h \
		Include/asdl.h \
		Include/ast.h \
                Include/bltinmodule.h \
		Include/bitset.h \
		Include/boolobject.h \
		Include/bytes_methods.h \
		Include/bytearrayobject.h \
		Include/bytesobject.h \
		Include/cellobject.h \
		Include/ceval.h \
		Include/classobject.h \
		Include/cobject.h \
		Include/code.h \
		Include/codecs.h \
		Include/compile.h \
		Include/complexobject.h \
		Include/descrobject.h \
		Include/dictobject.h \
		Include/dtoa.h \
		Include/enumobject.h \
		Include/errcode.h \
		Include/eval.h \
		Include/fileobject.h \
		Include/floatobject.h \
		Include/frameobject.h \
		Include/funcobject.h \
		Include/genobject.h \
		Include/import.h \
		Include/intrcheck.h \
		Include/iterobject.h \
		Include/listobject.h \
		Include/longintrepr.h \
		Include/longobject.h \
		Include/marshal.h \
		Include/memoryobject.h \
		Include/metagrammar.h \
		Include/methodobject.h \
		Include/modsupport.h \
		Include/moduleobject.h \
		Include/node.h \
		Include/object.h \
		Include/objimpl.h \
		Include/opcode.h \
		Include/osdefs.h \
		Include/parsetok.h \
		Include/patchlevel.h \
		Include/pgen.h \
		Include/pgenheaders.h \
		Include/pyarena.h \
		Include/pycapsule.h \
		Include/pyctype.h \
		Include/pydebug.h \
		Include/pyerrors.h \
		Include/pyfpe.h \
		Include/pymath.h \
		Include/pygetopt.h \
		Include/pymem.h \
		Include/pyport.h \
		Include/pystate.h \
		Include/pystrcmp.h \
		Include/pystrtod.h \
		Include/pythonrun.h \
		Include/pythread.h \
		Include/rangeobject.h \
		Include/setobject.h \
		Include/sliceobject.h \
		Include/structmember.h \
		Include/structseq.h \
		Include/symtable.h \
		Include/sysmodule.h \
		Include/traceback.h \
		Include/tupleobject.h \
		Include/ucnhash.h \
		Include/unicodeobject.h \
		Include/warnings.h \
		Include/weakrefobject.h \
		pyconfig.h \
		$(PARSER_HEADERS)

$(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)


######################################################################

# Test the interpreter (twice, once without .pyc files, once with)
# In the past, we've had problems where bugs in the marshalling or
# elsewhere caused bytecode read from .pyc files to behave differently
# than bytecode generated directly from a .py source file.  Sometimes
# the bytecode read from a .pyc file had the bug, somtimes the directly
# generated bytecode.  This is sometimes a very shy bug needing a lot of
# sample data.

TESTOPTS=	-l $(EXTRATESTOPTS)
TESTPROG=	$(srcdir)/Lib/test/regrtest.py
TESTPYTHON=	$(RUNSHARED) ./$(BUILDPYTHON) -E -bb
test:		all platform
		-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
		-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
		$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)

testall:	all platform
		-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
		$(TESTPYTHON) $(srcdir)/Lib/compileall.py
		-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
		-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
		$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall

#  Run the unitests for both architectures in a Universal build on OSX
#  Must be run on an Intel box.
testuniversal:	all platform
		if [ `arch` != 'i386' ];then \
			echo "This can only be used on OSX/i386" ;\
			exit 1 ;\
		fi
		-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
		-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
		$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
		$(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E $(TESTPROG) $(TESTOPTS) -uall


# Like testall, but with a single pass only
# run an optional script to include some information about the build environment
buildbottest:	all platform
		-@if which pybuildbot.identify >/dev/null 2>&1; then \
			pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
		fi
		$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall -rw

QUICKTESTOPTS=	$(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
		test_multibytecodec test_urllib2_localnet test_itertools \
		test_multiprocessing test_mailbox test_socket test_poll \
		test_select test_zipfile
quicktest:	all platform
		-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
		-$(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
		$(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)

MEMTESTOPTS=    $(QUICKTESTOPTS) -x test_dl test___all__ test_fork1 \
		test_longexp
memtest:	all platform
		-rm -f $(srcdir)/Lib/test/*.py[co]
		-$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
		$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)

install: altinstall bininstall

altinstall:	@FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall libainstall \
                sharedinstall oldsharedinstall maninstall @FRAMEWORKALTINSTALLLAST@

# Install shared libraries enabled by Setup
DESTDIRS=	$(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)

oldsharedinstall: $(DESTSHARED) $(SHAREDMODS)
		@for i in X $(SHAREDMODS); do \
		  if test $$i != X; then \
		    echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
		    $(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/`basename $$i`; \
		  fi; \
		done

$(DESTSHARED):
		@for i in $(DESTDIRS); \
		do \
			if test ! -d $(DESTDIR)$$i; then \
				echo "Creating directory $$i"; \
				$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
			else    true; \
			fi; \
		done

# Install the interpreter with $(VERSION) affixed
# This goes into $(exec_prefix)
altbininstall: $(BUILDPYTHON)
	@for i in $(BINDIR) $(LIBDIR); \
	do \
		if test ! -d $(DESTDIR)$$i; then \
			echo "Creating directory $$i"; \
			$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
		else	true; \
		fi; \
	done
	$(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE)
	if test -f $(LDLIBRARY); then \
		if test -n "$(DLLLIBRARY)" ; then \
			$(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \
		else \
			$(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
			if test $(LDLIBRARY) != $(INSTSONAME); then \
				(cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) $(LDLIBRARY)) \
			fi \
		fi; \
	else	true; \
	fi

bininstall: altbininstall
	-if test -f $(DESTDIR)$(BINDIR)/$(PYTHON)3$(EXE) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON)3$(EXE); \
	then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON)3$(EXE); \
	else true; \
	fi
	(cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)3$(EXE))
	-rm -f $(DESTDIR)$(BINDIR)/python3-config
	(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config)
	-rm -f $(DESTDIR)$(LIBPC)/python3.pc
	(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc)

# Install the manual page
maninstall:
	@for i in $(MANDIR) $(MANDIR)/man1; \
	do \
		if test ! -d $(DESTDIR)$$i; then \
			echo "Creating directory $$i"; \
			$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
		else	true; \
		fi; \
	done
	$(INSTALL_DATA) $(srcdir)/Misc/python.man \
		$(DESTDIR)$(MANDIR)/man1/python$(VERSION).1

# Install the library
PLATDIR=	plat-$(MACHDEP)
EXTRAPLATDIR= @EXTRAPLATDIR@
MACHDEPS=	$(PLATDIR) $(EXTRAPLATDIR)
XMLLIBSUBDIRS=  xml xml/dom xml/etree xml/parsers xml/sax
LIBSUBDIRS=	tkinter site-packages test test/output test/data \
		test/decimaltestdata \
		encodings \
		email email/mime email/test email/test/data \
		html json json/tests http dbm xmlrpc \
		sqlite3 sqlite3/test \
		logging csv wsgiref urllib \
		lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \
		lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
		ctypes ctypes/test ctypes/macholib idlelib idlelib/Icons \
		distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
		importlib importlib/test importlib/test/builtin \
		importlib/test/extension importlib/test/frozen \
		importlib/test/import_ importlib/test/source \
		setuptools setuptools/command setuptools/tests setuptools.egg-info \
		multiprocessing multiprocessing/dummy \
		curses pydoc_data $(MACHDEPS)
libinstall:	build_all $(srcdir)/Lib/$(PLATDIR)
	@for i in $(SCRIPTDIR) $(LIBDEST); \
	do \
		if test ! -d $(DESTDIR)$$i; then \
			echo "Creating directory $$i"; \
			$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
		else	true; \
		fi; \
	done
	@for d in $(LIBSUBDIRS); \
	do \
		a=$(srcdir)/Lib/$$d; \
		if test ! -d $$a; then continue; else true; fi; \
		b=$(LIBDEST)/$$d; \
		if test ! -d $(DESTDIR)$$b; then \
			echo "Creating directory $$b"; \
			$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \
		else	true; \
		fi; \
	done
	@for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \
	do \
		if test -x $$i; then \
			$(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
			echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \
		else \
			$(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
			echo $(INSTALL_DATA) $$i $(LIBDEST); \
		fi; \
	done
	@for d in $(LIBSUBDIRS); \
	do \
		a=$(srcdir)/Lib/$$d; \
		if test ! -d $$a; then continue; else true; fi; \
		if test `ls $$a | wc -l` -lt 1; then continue; fi; \
		b=$(LIBDEST)/$$d; \
		for i in $$a/*; \
		do \
			case $$i in \
			*CVS) ;; \
			*.py[co]) ;; \
			*.orig) ;; \
			*~) ;; \
			*) \
				if test -d $$i; then continue; fi; \
				if test -x $$i; then \
				    echo $(INSTALL_SCRIPT) $$i $$b; \
				    $(INSTALL_SCRIPT) $$i $(DESTDIR)$$b; \
				else \
				    echo $(INSTALL_DATA) $$i $$b; \
				    $(INSTALL_DATA) $$i $(DESTDIR)$$b; \
				fi;; \
			esac; \
		done; \
	done
	$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
		./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
		-d $(LIBDEST) -f \
		-x 'bad_coding|badsyntax|site-packages|py2_test_grammar|crlf|different_encoding' \
		$(DESTDIR)$(LIBDEST)
	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
		./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
		-d $(LIBDEST) -f \
		-x 'bad_coding|badsyntax|site-packages|py2_test_grammar|crlf|different_encoding' \
		$(DESTDIR)$(LIBDEST)
	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
		./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
		-d $(LIBDEST)/site-packages -f \
		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
		./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
		-d $(LIBDEST)/site-packages -f \
		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
		./$(BUILDPYTHON) -Wi -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"

# Create the PLATDIR source directory, if one wasn't distributed..
$(srcdir)/Lib/$(PLATDIR):
	mkdir $(srcdir)/Lib/$(PLATDIR)
	cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
	export PATH; PATH="`pwd`:$$PATH"; \
	export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
	export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
	export EXE; EXE="$(BUILDEXE)"; \
	cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen

# Install the include files
INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
inclinstall:
	@for i in $(INCLDIRSTOMAKE); \
	do \
		if test ! -d $(DESTDIR)$$i; then \
			echo "Creating directory $$i"; \
			$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
		else	true; \
		fi; \
	done
	@for i in $(srcdir)/Include/*.h; \
	do \
		echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
		$(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
	done
	$(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h

# Install the library and miscellaneous stuff needed for extending/embedding
# This goes into $(exec_prefix)
LIBPL=		$(LIBP)/config

# pkgconfig directory
LIBPC=		$(LIBDIR)/pkgconfig

libainstall:	all
	@for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
	do \
		if test ! -d $(DESTDIR)$$i; then \
			echo "Creating directory $$i"; \
			$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
		else	true; \
		fi; \
	done
	@if test -d $(LIBRARY); then :; else \
		if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
			if test "$(SO)" = .dll; then \
				$(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
			else \
				$(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
				$(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
			fi; \
		else \
			echo Skip install of $(LIBRARY) - use make frameworkinstall; \
		fi; \
	fi
	$(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
	$(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
	$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
	$(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
	$(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
	$(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
	$(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
	$(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
	$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
	$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
	# Substitution happens here, as the completely-expanded BINDIR
	# is not available in configure
	sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
	$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config
	rm python-config
	@if [ -s Modules/python.exp -a \
		"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
		echo; echo "Installing support files for building shared extension modules on AIX:"; \
		$(INSTALL_DATA) Modules/python.exp		\
				$(DESTDIR)$(LIBPL)/python.exp;		\
		echo; echo "$(LIBPL)/python.exp";		\
		$(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix	\
				$(DESTDIR)$(LIBPL)/makexp_aix;		\
		echo "$(LIBPL)/makexp_aix";			\
		$(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix	\
				$(DESTDIR)$(LIBPL)/ld_so_aix;		\
		echo "$(LIBPL)/ld_so_aix";			\
		echo; echo "See Misc/AIX-NOTES for details.";	\
	else true; \
	fi

# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall:
	$(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
	   	--prefix=$(prefix) \
		--install-scripts=$(BINDIR) \
		--install-platlib=$(DESTSHARED) \
		--root=/$(DESTDIR)

# Here are a couple of targets for MacOSX again, to install a full
# framework-based Python. frameworkinstall installs everything, the
# subtargets install specific parts. Much of the actual work is offloaded to
# the Makefile in Mac
#
#
# This target is here for backward compatiblity, previous versions of Python
# hadn't integrated framework installation in the normal install process.
frameworkinstall: install

# On install, we re-make the framework
# structure in the install location, /Library/Frameworks/ or the argument to
# --enable-framework. If --enable-framework has been specified then we have
# automatically set prefix to the location deep down in the framework, so we
# only have to cater for the structural bits of the framework.

frameworkinstallframework: frameworkinstallstructure install frameworkinstallmaclib

frameworkinstallstructure:	$(LDLIBRARY)
	@if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
		echo Not configured with --enable-framework; \
		exit 1; \
	else true; \
	fi
	@for i in $(prefix)/Resources/English.lproj $(prefix)/lib; do\
		if test ! -d $(DESTDIR)$$i; then \
			echo "Creating directory $(DESTDIR)$$i"; \
			$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
		else	true; \
		fi; \
	done
	$(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
	sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
	$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
	$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
	$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
	$(LN) -fsn Versions/Current/Resources $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Resources
	$(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(PYTHONFRAMEWORKPREFIX)/$(LDLIBRARY)

# This installs Mac/Lib into the framework
# Install a number of symlinks to keep software that expects a normal unix
# install (which includes python-config) happy.
frameworkinstallmaclib:
	ln -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/python$(VERSION)/config/libpython$(VERSION).a"
	ln -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(VERSION).dylib"

# This installs the IDE, the Launcher and other apps into /Applications
frameworkinstallapps:
	cd Mac && $(MAKE) installapps DESTDIR="$(DESTDIR)"

frameworkinstallapps4way:
	cd Mac && $(MAKE) installapps4way DESTDIR="$(DESTDIR)"

# This install the unix python and pythonw tools in /usr/local/bin
frameworkinstallunixtools:
	cd Mac && $(MAKE) installunixtools DESTDIR="$(DESTDIR)"

frameworkinstallunixtools4way:
	cd Mac && $(MAKE) installunixtools4way DESTDIR="$(DESTDIR)"

frameworkaltinstallunixtools:
	cd Mac && $(MAKE) altinstallunixtools DESTDIR="$(DESTDIR)"

frameworkaltinstallunixtools4way:
	cd Mac && $(MAKE) altinstallunixtools4way DESTDIR="$(DESTDIR)"

# This installs the Demos and Tools into the applications directory.
# It is not part of a normal frameworkinstall
frameworkinstallextras:
	cd Mac && $(MAKE) installextras DESTDIR="$(DESTDIR)"

# This installs a few of the useful scripts in Tools/scripts
scriptsinstall:
	SRCDIR=$(srcdir) $(RUNSHARED) \
	./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
	--prefix=$(prefix) \
	--install-scripts=$(BINDIR) \
	--root=/$(DESTDIR)

# Build the toplevel Makefile
Makefile.pre: Makefile.pre.in config.status
	CONFIG_FILES=Makefile.pre CONFIG_HEADERS= $(SHELL) config.status
	$(MAKE) -f Makefile.pre Makefile

# Run the configure script.
config.status:	$(srcdir)/configure
	$(SHELL) $(srcdir)/configure $(CONFIG_ARGS)

.PRECIOUS: config.status $(BUILDPYTHON) Makefile Makefile.pre

# Some make's put the object file in the current directory
.c.o:
	$(CC) -c $(PY_CFLAGS) -o $@ $<

# Run reindent on the library
reindent:
	./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib

# Rerun configure with the same options as it was run last time,
# provided the config.status script exists
recheck:
	$(SHELL) config.status --recheck
	$(SHELL) config.status

# Rebuild the configure script from configure.in; also rebuild pyconfig.h.in
autoconf:
	(cd $(srcdir); autoconf)
	(cd $(srcdir); autoheader)

# Create a tags file for vi
tags::
	cd $(srcdir); \
	ctags -w -t Include/*.h; \
	for i in $(SRCDIRS); do ctags -w -t -a $$i/*.[ch]; \
	done; \
	sort -o tags tags

# Create a tags file for GNU Emacs
TAGS::
	cd $(srcdir); \
	etags Include/*.h; \
	for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done

# Sanitation targets -- clean leaves libraries, executables and tags
# files, which clobber removes those as well
pycremoval:
	find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'

rmtestturds:
	-rm -f *BAD *GOOD *SKIPPED
	-rm -rf OUT
	-rm -f *.TXT
	-rm -f *.txt
	-rm -f gb-18030-2000.xml

docclean:
	-rm -rf Doc/build
	-rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils

clean: pycremoval
	find . -name '*.o' -exec rm -f {} ';'
	find . -name '*.s[ol]' -exec rm -f {} ';'
	find build -name 'fficonfig.h' -exec rm -f {} ';' || true
	find build -name 'fficonfig.py' -exec rm -f {} ';' || true

profile-removal:
	find . -name '*.gc??' -exec rm -f {} ';'

clobber: clean profile-removal
	-rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
		tags TAGS \
		config.cache config.log pyconfig.h Modules/config.c
	-rm -rf build platform
	-rm -rf $(PYTHONFRAMEWORKDIR)

# Make things extra clean, before making a distribution:
# remove all generated files, even Makefile[.pre]
# Keep configure and Python-ast.[ch], it's possible they can't be generated
distclean: clobber
	-rm -f core Makefile Makefile.pre config.status \
		Modules/Setup Modules/Setup.local Modules/Setup.config
	find $(srcdir) '(' -name '*.fdc' -o -name '*~' \
			   -o -name '[@,#]*' -o -name '*.old' \
			   -o -name '*.orig' -o -name '*.rej' \
			   -o -name '*.bak' ')' \
			   -exec rm -f {} ';'

# Check for smelly exported symbols (not starting with Py/_Py)
smelly: all
	nm -p $(LIBRARY) | \
		sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \

# Find files with funny names
funny:
	find $(DISTDIRS) \
		-name .svn -prune \
		-o -type d \
		-o -name '*.[chs]' \
		-o -name '*.py' \
		-o -name '*.doc' \
		-o -name '*.dat' \
		-o -name '*.el' \
		-o -name '*.fd' \
		-o -name '*.in' \
		-o -name '*.gif' \
		-o -name '*.txt' \
		-o -name '*.xml' \
		-o -name '*.xbm' \
		-o -name '*.xpm' \
		-o -name '*.uue' \
		-o -name '*.decTest' \
		-o -name '*,[vpt]' \
		-o -name 'Setup' \
		-o -name 'Setup.*' \
		-o -name regen \
		-o -name README \
		-o -name Makefile \
		-o -name ChangeLog \
		-o -name Repository \
		-o -name Root \
		-o -name Entries \
		-o -name Tag \
		-o -name tags \
		-o -name TAGS \
		-o -name .cvsignore \
		-o -name MANIFEST \
		-o -print

# Perform some verification checks on any modified files.
patchcheck:
	$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py

# Dependencies

Python/thread.o: @THREADHEADERS@

# Declare targets that aren't real files
.PHONY: all build_all sharedmods oldsharedmods test quicktest memtest
.PHONY: install altinstall oldsharedinstall bininstall altbininstall
.PHONY: maninstall libinstall inclinstall libainstall sharedinstall
.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
.PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
.PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean 
.PHONY: smelly funny patchcheck

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
back to top