mirror of
https://github.com/python/cpython.git
synced 2024-12-01 11:15:56 +01:00
81ee3efede
svn+ssh://pythondev@svn.python.org/python/trunk ................ r62425 | andrew.kuchling | 2008-04-21 03:45:57 +0200 (Mon, 21 Apr 2008) | 1 line Comment typo ................ r62426 | mark.dickinson | 2008-04-21 03:55:50 +0200 (Mon, 21 Apr 2008) | 2 lines Silence 'r may be used uninitialized' compiler warning. ................ r62427 | andrew.kuchling | 2008-04-21 04:08:00 +0200 (Mon, 21 Apr 2008) | 1 line Markup fix ................ r62428 | andrew.kuchling | 2008-04-21 04:08:13 +0200 (Mon, 21 Apr 2008) | 1 line Wording changes ................ r62429 | andrew.kuchling | 2008-04-21 04:14:24 +0200 (Mon, 21 Apr 2008) | 1 line Add various items ................ r62434 | thomas.heller | 2008-04-21 15:46:55 +0200 (Mon, 21 Apr 2008) | 1 line Fix typo. ................ r62435 | david.goodger | 2008-04-21 16:40:22 +0200 (Mon, 21 Apr 2008) | 1 line corrections ("reStructuredText" is one word) ................ r62436 | david.goodger | 2008-04-21 16:43:33 +0200 (Mon, 21 Apr 2008) | 1 line capitalization ................ r62441 | gregory.p.smith | 2008-04-21 19:46:40 +0200 (Mon, 21 Apr 2008) | 2 lines explicitly flush after the ... since there wasn't a newline ................ r62444 | jeroen.ruigrok | 2008-04-21 22:15:39 +0200 (Mon, 21 Apr 2008) | 2 lines Windows x64 also falls under VER_PLATFORM_WIN32_NT. ................ r62446 | gregory.p.smith | 2008-04-21 23:31:08 +0200 (Mon, 21 Apr 2008) | 3 lines If sys.stdin is not a tty, fall back to default_getpass after printing a warning instead of failing with a termios.error. ................ r62447 | mark.dickinson | 2008-04-22 00:32:24 +0200 (Tue, 22 Apr 2008) | 8 lines test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot, apparently because tanh(-0.) loses the sign of zero on that platform. If true, this is a bug in FreeBSD. Added a configure test to verify this. I still need to figure out how best to deal with this failure. ................ r62448 | amaury.forgeotdarc | 2008-04-22 00:35:30 +0200 (Tue, 22 Apr 2008) | 7 lines Issue 2665: On Windows, sys.stderr does not contain a valid file when running without a console. It seems to work, but will fail at the first flush. This causes IDLE to crash when too many warnings are printed. Will backport. ................ r62450 | benjamin.peterson | 2008-04-22 00:57:00 +0200 (Tue, 22 Apr 2008) | 2 lines Fix Sphinx warnings ................ r62451 | mark.dickinson | 2008-04-22 02:54:27 +0200 (Tue, 22 Apr 2008) | 3 lines Make configure test for tanh(-0.) == -0. committed in r62447 actually work. (The test wasn't properly linked with libm. Sigh.) ................ r62452 | benjamin.peterson | 2008-04-22 04:16:03 +0200 (Tue, 22 Apr 2008) | 2 lines Various io doc updates ................ r62453 | neal.norwitz | 2008-04-22 07:07:47 +0200 (Tue, 22 Apr 2008) | 1 line Add Thomas Lee ................ r62454 | gregory.p.smith | 2008-04-22 10:08:41 +0200 (Tue, 22 Apr 2008) | 8 lines Major improvements: * Default to using /dev/tty for the password prompt and input before falling back to sys.stdin and sys.stderr. * Use sys.stderr instead of sys.stdout. * print the 'password may be echoed' warning to stream used to display the prompt rather than always sys.stderr. * warn() with GetPassWarning when input may be echoed. ................ r62455 | gregory.p.smith | 2008-04-22 10:11:33 +0200 (Tue, 22 Apr 2008) | 2 lines update the getpass entry ................ r62463 | amaury.forgeotdarc | 2008-04-22 23:14:41 +0200 (Tue, 22 Apr 2008) | 5 lines Issue #2670: urllib2.build_opener() failed when two handlers derive the same default base class. Will backport. ................ r62465 | skip.montanaro | 2008-04-23 00:45:09 +0200 (Wed, 23 Apr 2008) | 3 lines Factor in documentation changes from issue 1753732. ................ r62466 | gregory.p.smith | 2008-04-23 03:06:42 +0200 (Wed, 23 Apr 2008) | 2 lines syntax fixup ................ r62469 | benjamin.peterson | 2008-04-23 22:38:06 +0200 (Wed, 23 Apr 2008) | 2 lines #2673 Fix example typo in optparse docs ................ r62474 | martin.v.loewis | 2008-04-24 11:50:50 +0200 (Thu, 24 Apr 2008) | 2 lines Add Guilherme Polo. ................ r62476 | martin.v.loewis | 2008-04-24 15:16:36 +0200 (Thu, 24 Apr 2008) | 3 lines Remove Py_Refcnt, Py_Type, Py_Size, as they were added only for backwards compatibility, yet 2.5 did not have them at all. ................ r62477 | martin.v.loewis | 2008-04-24 15:17:24 +0200 (Thu, 24 Apr 2008) | 2 lines Fix typo. ................ r62478 | martin.v.loewis | 2008-04-24 15:18:03 +0200 (Thu, 24 Apr 2008) | 2 lines Add Jesus Cea. ................ r62480 | amaury.forgeotdarc | 2008-04-24 20:07:05 +0200 (Thu, 24 Apr 2008) | 4 lines Issue2681: the literal 0o8 was wrongly accepted, and evaluated as float(0.0). This happened only when 8 is the first digit. Credits go to Lukas Meuser. ................ r62485 | amaury.forgeotdarc | 2008-04-24 22:10:26 +0200 (Thu, 24 Apr 2008) | 5 lines Disable gc when running test_trace, or we may record the __del__ of collected objects. See http://mail.python.org/pipermail/python-checkins/2008-April/068633.html the extra events perfectly match several calls to socket._fileobject.__del__() ................ r62492 | neal.norwitz | 2008-04-25 05:40:17 +0200 (Fri, 25 Apr 2008) | 1 line Fix typo (now -> no) ................ r62497 | armin.rigo | 2008-04-25 11:35:18 +0200 (Fri, 25 Apr 2008) | 2 lines A new crasher. ................ r62498 | thomas.heller | 2008-04-25 17:44:16 +0200 (Fri, 25 Apr 2008) | 1 line Add from_buffer and from_buffer_copy class methods to ctypes types. ................ r62500 | mark.dickinson | 2008-04-25 18:59:09 +0200 (Fri, 25 Apr 2008) | 3 lines Issue 2635: fix bug in the fix_sentence_endings option to textwrap.fill. ................ r62507 | benjamin.peterson | 2008-04-25 23:43:56 +0200 (Fri, 25 Apr 2008) | 2 lines Allow test_import to work when it is invoked directly ................ r62513 | georg.brandl | 2008-04-26 20:31:07 +0200 (Sat, 26 Apr 2008) | 2 lines #2691: document PyLong (s)size_t APIs, patch by Alexander Belopolsky. ................ r62514 | georg.brandl | 2008-04-26 20:32:17 +0200 (Sat, 26 Apr 2008) | 2 lines Add missing return type to dealloc. ................ r62516 | alexandre.vassalotti | 2008-04-27 02:52:24 +0200 (Sun, 27 Apr 2008) | 2 lines Fixed URL of PEP 205 in weakref's module docstring. ................ r62521 | georg.brandl | 2008-04-27 11:39:59 +0200 (Sun, 27 Apr 2008) | 2 lines #2677: add note that not all functions may accept keyword args. ................ r62531 | georg.brandl | 2008-04-27 19:38:55 +0200 (Sun, 27 Apr 2008) | 2 lines Use correct XHTML tags. ................ r62535 | benjamin.peterson | 2008-04-27 20:14:39 +0200 (Sun, 27 Apr 2008) | 2 lines #2700 Document PyNumber_ToBase ................ r62545 | skip.montanaro | 2008-04-27 22:53:57 +0200 (Sun, 27 Apr 2008) | 1 line minor wording changes, rewrap a few lines ................ r62546 | kurt.kaiser | 2008-04-27 23:07:41 +0200 (Sun, 27 Apr 2008) | 7 lines Home / Control-A toggles between left margin and end of leading white space. Patch 1196903 Jeff Shute. M idlelib/PyShell.py M idlelib/EditorWindow.py M idlelib/NEWS.txt ................ r62548 | kurt.kaiser | 2008-04-27 23:38:05 +0200 (Sun, 27 Apr 2008) | 2 lines Improved AutoCompleteWindow logic. Patch 2062 Tal Einat. ................ r62549 | kurt.kaiser | 2008-04-27 23:52:19 +0200 (Sun, 27 Apr 2008) | 4 lines Autocompletion of filenames now support alternate separators, e.g. the '/' char on Windows. Patch 2061 Tal Einat. ................ r62550 | skip.montanaro | 2008-04-28 00:49:56 +0200 (Mon, 28 Apr 2008) | 6 lines A few small changes: * The only exception we should catch when trying to import cStringIO is an ImportError. * Delete the function signatures embedded in the mk*temp docstrings. * The tempdir global variable was initialized twice. ................ r62551 | skip.montanaro | 2008-04-28 00:52:02 +0200 (Mon, 28 Apr 2008) | 4 lines Wrap some long paragraphs and include the default values for optional function parameters. ................ r62553 | skip.montanaro | 2008-04-28 04:57:23 +0200 (Mon, 28 Apr 2008) | 7 lines Minor cleanups: * Avoid creating unused local variables where we can. Where we can't prefix the unused variables with '_'. * Avoid shadowing builtins where it won't change the external interface of a function. * Use None as default path arg to readmodule and readmodule_ex. ................ r62554 | skip.montanaro | 2008-04-28 04:59:45 +0200 (Mon, 28 Apr 2008) | 6 lines Correct documentation to match implementation: "Class" instead of "class_descriptor", "Function" instead of "function_descriptor". Note default path value for readmodule*. Wrap some long paragraphs. Don't mention 'inpackage' which isn't part of the public API. ................ r62555 | brett.cannon | 2008-04-28 05:23:50 +0200 (Mon, 28 Apr 2008) | 5 lines Fix a bug introduced by the warnings rewrite where tracebacks were being improperly indented. Closes issue #2699. ................ r62556 | skip.montanaro | 2008-04-28 05:25:37 +0200 (Mon, 28 Apr 2008) | 2 lines Wrap some long lines. ................ r62557 | skip.montanaro | 2008-04-28 05:27:53 +0200 (Mon, 28 Apr 2008) | 6 lines Get rid of _test(), _main(), _debug() and _check(). Tests are no longer needed (better set available in Lib/test/test_robotparser.py). Clean up a few PEP 8 nits (compound statements on a single line, whitespace around operators). ................ r62558 | brett.cannon | 2008-04-28 06:50:06 +0200 (Mon, 28 Apr 2008) | 3 lines Rename the test_traceback_print() function to traceback_print() to prevent test_capi from automatically calling the function. ................ r62559 | georg.brandl | 2008-04-28 07:16:30 +0200 (Mon, 28 Apr 2008) | 2 lines Fix markup. ................ r62569 | amaury.forgeotdarc | 2008-04-28 23:07:06 +0200 (Mon, 28 Apr 2008) | 5 lines test_sundry performs minimal tests (a simple import...) on modules that are not tested otherwise. Some of them now have tests and can be removed. Only 70 to go... ................ r62574 | andrew.kuchling | 2008-04-29 04:03:54 +0200 (Tue, 29 Apr 2008) | 1 line Strip down SSL docs; I'm not managing to get test programs working, so I'll just give a minimal description ................ r62577 | martin.v.loewis | 2008-04-29 08:10:53 +0200 (Tue, 29 Apr 2008) | 2 lines Add Rodrigo and Heiko. ................ r62593 | nick.coghlan | 2008-04-30 16:23:36 +0200 (Wed, 30 Apr 2008) | 1 line Update command line usage documentation to reflect 2.6 changes (also includes some minor cleanups). Addresses TODO list issue 2258 ................ r62595 | andrew.kuchling | 2008-04-30 18:19:55 +0200 (Wed, 30 Apr 2008) | 1 line Typo fix ................ r62604 | benjamin.peterson | 2008-04-30 23:03:58 +0200 (Wed, 30 Apr 2008) | 2 lines make test_support's captured_output a bit more robust when exceptions happen ................ r62605 | georg.brandl | 2008-04-30 23:08:42 +0200 (Wed, 30 Apr 2008) | 2 lines #1748: use functools.wraps instead of rolling own metadata update. ................ r62606 | benjamin.peterson | 2008-04-30 23:25:55 +0200 (Wed, 30 Apr 2008) | 2 lines Remove some from __future__ import with_statements ................ r62608 | benjamin.peterson | 2008-05-01 00:03:36 +0200 (Thu, 01 May 2008) | 2 lines Fix typo in whatsnew ................ r62616 | georg.brandl | 2008-05-01 20:24:32 +0200 (Thu, 01 May 2008) | 2 lines Fix synopsis. ................ r62626 | brett.cannon | 2008-05-02 04:25:09 +0200 (Fri, 02 May 2008) | 6 lines Fix a backwards-compatibility mistake where a new optional argument for warnings.showwarning() was being used. This broke pre-existing replacements for the function since they didn't support the extra argument. Closes issue 2705. ................ r62627 | gregory.p.smith | 2008-05-02 09:26:52 +0200 (Fri, 02 May 2008) | 20 lines This should fix issue2632. A long description of the two competing problems is in the bug report (one old, one recently introduced trying to fix the old one). In short: buffer data during socket._fileobject.read() and readlines() within a cStringIO object instead of a [] of str()s returned from the recv() call. This prevents excessive memory use due to the size parameter being passed to recv() being grossly larger than the actual size of the data returned *and* prevents excessive cpu usage due to looping in python calling recv() with a very tiny size value if min() is used as the previous memory-use bug "fix" did. It also documents what the socket._fileobject._rbufsize member is actually used for. This is a candidate for back porting to 2.5. ................ r62636 | mark.hammond | 2008-05-02 14:48:15 +0200 (Fri, 02 May 2008) | 2 lines #2581: Vista UAC/elevation support for bdist_wininst ................ r62638 | facundo.batista | 2008-05-02 19:39:00 +0200 (Fri, 02 May 2008) | 3 lines Fixed some test structures. Thanks Mark Dickinson. ................ r62644 | ronald.oussoren | 2008-05-02 21:45:11 +0200 (Fri, 02 May 2008) | 7 lines Fix for issue #2573: Can't change the framework name on OS X builds This introduces a new configure option: --with-framework-name=NAME (defaulting to 'Python'). This allows you to install several copies of the Python framework with different names (such as a normal build and a debug build). ................ r62645 | ronald.oussoren | 2008-05-02 21:58:56 +0200 (Fri, 02 May 2008) | 2 lines Finish fix for issue2573, previous patch was incomplete. ................ r62647 | martin.v.loewis | 2008-05-02 23:30:20 +0200 (Fri, 02 May 2008) | 13 lines Merged revisions 62263-62646 via svnmerge from svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r62470 | david.wolever | 2008-04-24 02:11:07 +0200 (Do, 24 Apr 2008) | 3 lines Fixed up and applied the patch for #2431 -- speeding up 2to3 with a lookup table. ........ r62646 | martin.v.loewis | 2008-05-02 23:29:27 +0200 (Fr, 02 Mai 2008) | 2 lines Fix whitespace. ........ ................ r62648 | ronald.oussoren | 2008-05-02 23:42:35 +0200 (Fri, 02 May 2008) | 4 lines Fix for #1905: PythonLauncher not working correctly on OSX 10.5/Leopard This fixes both Python Launchar and the terminalcommand module. ................ r62651 | ronald.oussoren | 2008-05-02 23:54:56 +0200 (Fri, 02 May 2008) | 2 lines Fix for issue #2520 (cannot import macerrors) ................ r62652 | benjamin.peterson | 2008-05-03 00:12:58 +0200 (Sat, 03 May 2008) | 2 lines capitalization nit for reStructuredText ................ r62653 | brett.cannon | 2008-05-03 03:02:41 +0200 (Sat, 03 May 2008) | 2 lines Fix some indentation errors. ................ r62656 | brett.cannon | 2008-05-03 05:19:39 +0200 (Sat, 03 May 2008) | 6 lines Fix the C implementation of 'warnings' to infer the filename of the module that raised an exception properly when __file__ is not set, __name__ == '__main__', and sys.argv[0] is a false value. Closes issue2743. ................ r62661 | amaury.forgeotdarc | 2008-05-03 14:21:13 +0200 (Sat, 03 May 2008) | 8 lines In test_io, StatefulIncrementalDecoderTest was not part of the test suite. And of course, the test failed: a bytearray was used without reason in io.TextIOWrapper.tell(). The difference is that iterating over bytes (i.e. str in python2.6) returns 1-char bytes, whereas bytearrays yield integers. This code should still work with python3.0 ................ r62663 | benjamin.peterson | 2008-05-03 17:56:42 +0200 (Sat, 03 May 2008) | 2 lines The compiling struct is now passed around to all AST helpers (see issue 2720) ................ r62680 | benjamin.peterson | 2008-05-03 23:35:18 +0200 (Sat, 03 May 2008) | 2 lines Moved testing of builtin types out of test_builtin and into type specific modules ................ r62686 | mark.dickinson | 2008-05-04 04:25:46 +0200 (Sun, 04 May 2008) | 4 lines Make sure that Context traps and flags dictionaries have values 0 and 1 (as documented) rather than True and False. ................ r62687 | benjamin.peterson | 2008-05-04 05:05:49 +0200 (Sun, 04 May 2008) | 2 lines Fix typo in whatsnew ................ r62696 | georg.brandl | 2008-05-04 11:15:04 +0200 (Sun, 04 May 2008) | 2 lines #2752: wrong meaning of '' for socket host. ................ r62699 | christian.heimes | 2008-05-04 13:50:53 +0200 (Sun, 04 May 2008) | 1 line Added note that Python requires at least Win2k SP4 ................ r62700 | gerhard.haering | 2008-05-04 14:59:57 +0200 (Sun, 04 May 2008) | 3 lines SQLite requires 64-bit integers in order to build. So the whole HAVE_LONG_LONG #ifdefing was useless. ................ r62701 | gerhard.haering | 2008-05-04 15:15:12 +0200 (Sun, 04 May 2008) | 3 lines Applied sqliterow-richcmp.diff patch from Thomas Heller in Issue2152. The sqlite3.Row type is now correctly hashable. ................ r62702 | gerhard.haering | 2008-05-04 15:42:44 +0200 (Sun, 04 May 2008) | 5 lines Implemented feature request 2157: Converter names are cut off at '(' characters. This avoids the common case of something like 'NUMBER(10)' not being parsed as 'NUMBER', like expected. Also corrected the docs about converter names being case-sensitive. They aren't any longer. ................ r62703 | georg.brandl | 2008-05-04 17:45:05 +0200 (Sun, 04 May 2008) | 2 lines #2757: Remove spare newline. ................ r62711 | benjamin.peterson | 2008-05-04 21:10:02 +0200 (Sun, 04 May 2008) | 2 lines Fix typo in bugs.rst ................
1204 lines
37 KiB
Makefile
1204 lines
37 KiB
Makefile
# 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@
|
|
|
|
# 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@
|
|
# 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= Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
|
|
#PROFILE_TASK= 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@
|
|
|
|
|
|
##########################################################################
|
|
# 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
|
|
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/getmtime.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/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/formatter_unicode.o \
|
|
Python/$(DYNLOADFILE) \
|
|
$(LIBOBJS) \
|
|
$(MACHDEP_OBJS) \
|
|
$(THREADOBJ)
|
|
|
|
|
|
##########################################################################
|
|
# Objects
|
|
OBJECT_OBJS= \
|
|
Objects/abstract.o \
|
|
Objects/boolobject.o \
|
|
Objects/bytes_methods.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/rangeobject.o \
|
|
Objects/setobject.o \
|
|
Objects/sliceobject.o \
|
|
Objects/stringobject.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"
|
|
|
|
# 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) cr $@ Modules/getbuildinfo.o
|
|
$(AR) cr $@ $(PARSER_OBJS)
|
|
$(AR) cr $@ $(OBJECT_OBJS)
|
|
$(AR) cr $@ $(PYTHON_OBJS)
|
|
$(AR) cr $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
|
|
$(AR) cr $@ $(MODOBJS)
|
|
$(RANLIB) $@
|
|
|
|
libpython$(VERSION).so: $(LIBRARY_OBJS)
|
|
if test $(INSTSONAME) != $(LDLIBRARY); then \
|
|
$(LDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
|
|
$(LN) -f $(INSTSONAME) $@; \
|
|
else\
|
|
$(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
|
|
fi
|
|
|
|
libpython$(VERSION).sl: $(LIBRARY_OBJS)
|
|
$(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
|
|
|
|
# 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) -arch i386 -arch ppc -dynamiclib \
|
|
-isysroot "${UNIVERSALSDK}" \
|
|
-all_load $(LIBRARY) -Wl,-single_module \
|
|
-install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) \
|
|
-compatibility_version $(VERSION) \
|
|
-current_version $(VERSION); \
|
|
else \
|
|
/usr/bin/libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \
|
|
@LIBTOOL_CRUFT@ ;\
|
|
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) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
|
|
$(LIBS) $(MODLIBS) $(SYSLIBS); \
|
|
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 Setup.dist to 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
|
|
|
|
|
|
$(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: $(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 \
|
|
|
|
Objects/stringobject.o: $(srcdir)/Objects/stringobject.c $(BYTESTR_DEPS)
|
|
|
|
Objects/bytesobject.o: $(srcdir)/Objects/bytesobject.c $(BYTESTR_DEPS)
|
|
|
|
Objects/unicodeobject.o: $(srcdir)/Objects/unicodeobject.c \
|
|
$(BYTESTR_DEPS)
|
|
|
|
Python/formatter_unicode.o: $(srcdir)/Python/formatter_unicode.c \
|
|
$(BYTESTR_DEPS)
|
|
|
|
|
|
############################################################################
|
|
# Header files
|
|
|
|
PYTHON_HEADERS= \
|
|
Include/Python-ast.h \
|
|
Include/Python.h \
|
|
Include/abstract.h \
|
|
Include/asdl.h \
|
|
Include/ast.h \
|
|
Include/bitset.h \
|
|
Include/boolobject.h \
|
|
Include/bytes_methods.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/enumobject.h \
|
|
Include/errcode.h \
|
|
Include/eval.h \
|
|
Include/fileobject.h \
|
|
Include/floatobject.h \
|
|
Include/formatter_unicode.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/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/stringobject.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 -tt -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 -tt $(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_thread test_signal test_strftime \
|
|
test_unicodedata test_re test_sre test_select test_poll \
|
|
test_struct test_zlib
|
|
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 everything
|
|
fullinstall: @FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall @FRAMEWORKINSTALLLAST@
|
|
|
|
# "make install" is an alias for "make altinstall" since we never want to
|
|
# overwrite Python 2.x.
|
|
install: altinstall
|
|
echo "* Note: not installed as 'python'."
|
|
echo "* Use 'make fullinstall' to install as 'python'."
|
|
echo "* However, 'make fulinstall' is discouraged,"
|
|
echo "* as it will clobber your Python 2.x installation."
|
|
|
|
# Install almost everything without disturbing previous versions
|
|
altinstall: @FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall libainstall \
|
|
sharedinstall oldsharedinstall @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 (by creating a hard link to python$(VERSION))
|
|
bininstall: altbininstall
|
|
-if test -f $(DESTDIR)$(BINDIR)/$(PYTHON) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON); \
|
|
then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
|
|
else true; \
|
|
fi
|
|
(cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
|
|
-rm -f $(DESTDIR)$(BINDIR)/python-config
|
|
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config)
|
|
|
|
# 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 libpython$(VERSION)$(SO); then \
|
|
if test "$(SO)" = .dll; then \
|
|
$(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(BINDIR); \
|
|
else \
|
|
$(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
|
|
if test libpython$(VERSION)$(SO) != $(INSTSONAME); then \
|
|
(cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \
|
|
fi \
|
|
fi; \
|
|
else true; \
|
|
fi
|
|
|
|
# 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.1
|
|
|
|
# Install the library
|
|
PLATDIR= plat-$(MACHDEP)
|
|
EXTRAPLATDIR= @EXTRAPLATDIR@
|
|
EXTRAMACHDEPPATH=@EXTRAMACHDEPPATH@
|
|
MACHDEPS= $(PLATDIR) $(EXTRAPLATDIR)
|
|
XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
|
|
PLATMACDIRS= plat-mac plat-mac/Carbon plat-mac/lib-scriptpackages \
|
|
plat-mac/lib-scriptpackages/_builtinSuites \
|
|
plat-mac/lib-scriptpackages/CodeWarrior \
|
|
plat-mac/lib-scriptpackages/Explorer \
|
|
plat-mac/lib-scriptpackages/Finder \
|
|
plat-mac/lib-scriptpackages/Netscape \
|
|
plat-mac/lib-scriptpackages/StdSuites \
|
|
plat-mac/lib-scriptpackages/SystemEvents \
|
|
plat-mac/lib-scriptpackages/Terminal
|
|
PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
|
|
LIBSUBDIRS= lib-tk site-packages test test/output test/data \
|
|
test/decimaltestdata \
|
|
encodings \
|
|
email email/mime email/test email/test/data \
|
|
sqlite3 sqlite3/test \
|
|
logging bsddb bsddb/test csv wsgiref \
|
|
lib2to3 lib2to3/fixes lib2to3/pgen2 \
|
|
ctypes ctypes/test ctypes/macholib idlelib idlelib/Icons \
|
|
distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
|
|
setuptools setuptools/command setuptools/tests setuptools.egg-info \
|
|
curses $(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 -tt $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
-d $(LIBDEST) -f \
|
|
-x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
|
|
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
-d $(LIBDEST) -f \
|
|
-x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
|
|
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
-d $(LIBDEST)/site-packages -f \
|
|
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
|
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
-d $(LIBDEST)/site-packages -f \
|
|
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
|
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram"
|
|
|
|
# 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); ./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
|
|
libainstall: all
|
|
@for i in $(LIBDIR) $(LIBP) $(LIBPL); \
|
|
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_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"
|
|
cd Mac && $(MAKE) installmacsubtree DESTDIR="$(DESTDIR)"
|
|
|
|
# This installs the IDE, the Launcher and other apps into /Applications
|
|
frameworkinstallapps:
|
|
cd Mac && $(MAKE) installapps DESTDIR="$(DESTDIR)"
|
|
|
|
# This install the unix python and pythonw tools in /usr/local/bin
|
|
frameworkinstallunixtools:
|
|
cd Mac && $(MAKE) installunixtools DESTDIR="$(DESTDIR)"
|
|
|
|
frameworkaltinstallunixtools:
|
|
cd Mac && $(MAKE) altinstallunixtools 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 $(srcdir)/build -name 'fficonfig.h' -exec rm -f {} ';' || true
|
|
find $(srcdir)/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.
|
|
check:
|
|
./$(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
|
|
|
|
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
|