| [2] | 1 | # Top-level Makefile for Python
 | 
|---|
 | 2 | #
 | 
|---|
 | 3 | # As distributed, this file is called Makefile.pre.in; it is processed
 | 
|---|
 | 4 | # into the real Makefile by running the script ./configure, which
 | 
|---|
 | 5 | # replaces things like @spam@ with values appropriate for your system.
 | 
|---|
 | 6 | # This means that if you edit Makefile, your changes get lost the next
 | 
|---|
 | 7 | # time you run the configure script.  Ideally, you can do:
 | 
|---|
 | 8 | #
 | 
|---|
 | 9 | #       ./configure
 | 
|---|
 | 10 | #       make
 | 
|---|
 | 11 | #       make test
 | 
|---|
 | 12 | #       make install
 | 
|---|
 | 13 | #
 | 
|---|
 | 14 | # If you have a previous version of Python installed that you don't
 | 
|---|
 | 15 | # want to overwrite, you can use "make altinstall" instead of "make
 | 
|---|
 | 16 | # install".  Refer to the "Installing" section in the README file for
 | 
|---|
 | 17 | # additional details.
 | 
|---|
 | 18 | #
 | 
|---|
 | 19 | # See also the section "Build instructions" in the README file.
 | 
|---|
 | 20 | 
 | 
|---|
 | 21 | # === Variables set by makesetup ===
 | 
|---|
 | 22 | 
 | 
|---|
 | 23 | MODOBJS=        _MODOBJS_
 | 
|---|
 | 24 | MODLIBS=        _MODLIBS_
 | 
|---|
 | 25 | 
 | 
|---|
 | 26 | # === Variables set by configure
 | 
|---|
 | 27 | VERSION=        @VERSION@
 | 
|---|
 | 28 | srcdir=         @srcdir@
 | 
|---|
 | 29 | VPATH=          @srcdir@
 | 
|---|
| [391] | 30 | abs_srcdir=     @abs_srcdir@
 | 
|---|
 | 31 | abs_builddir=   @abs_builddir@
 | 
|---|
 | 32 | build=          @build@
 | 
|---|
 | 33 | host=           @host@
 | 
|---|
| [2] | 34 | 
 | 
|---|
 | 35 | CC=             @CC@
 | 
|---|
 | 36 | CXX=            @CXX@
 | 
|---|
 | 37 | MAINCC=         @MAINCC@
 | 
|---|
 | 38 | LINKCC=         @LINKCC@
 | 
|---|
 | 39 | AR=             @AR@
 | 
|---|
 | 40 | RANLIB=         @RANLIB@
 | 
|---|
 | 41 | SVNVERSION=     @SVNVERSION@
 | 
|---|
| [391] | 42 | HGVERSION=      @HGVERSION@
 | 
|---|
 | 43 | HGTAG=          @HGTAG@
 | 
|---|
 | 44 | HGBRANCH=       @HGBRANCH@
 | 
|---|
| [2] | 45 | 
 | 
|---|
| [391] | 46 | GNULD=          @GNULD@
 | 
|---|
 | 47 | 
 | 
|---|
| [2] | 48 | # Shell used by make (some versions default to the login shell, which is bad)
 | 
|---|
| [281] | 49 | SHELL=          @SHELL@
 | 
|---|
| [2] | 50 | 
 | 
|---|
 | 51 | # Use this to make a link between python$(VERSION) and python in $(BINDIR)
 | 
|---|
 | 52 | LN=             @LN@
 | 
|---|
 | 53 | 
 | 
|---|
 | 54 | # Portable install script (configure doesn't always guess right)
 | 
|---|
 | 55 | INSTALL=        @INSTALL@
 | 
|---|
 | 56 | INSTALL_PROGRAM=@INSTALL_PROGRAM@
 | 
|---|
 | 57 | INSTALL_SCRIPT= @INSTALL_SCRIPT@
 | 
|---|
 | 58 | INSTALL_DATA=   @INSTALL_DATA@
 | 
|---|
 | 59 | # Shared libraries must be installed with executable mode on some systems;
 | 
|---|
 | 60 | # rather than figuring out exactly which, we always give them executable mode.
 | 
|---|
 | 61 | # Also, making them read-only seems to be a good idea...
 | 
|---|
 | 62 | INSTALL_SHARED= ${INSTALL} -m 555
 | 
|---|
 | 63 | 
 | 
|---|
| [391] | 64 | MKDIR_P=        @MKDIR_P@
 | 
|---|
 | 65 | 
 | 
|---|
| [2] | 66 | MAKESETUP=      $(srcdir)/Modules/makesetup
 | 
|---|
 | 67 | 
 | 
|---|
 | 68 | # Compiler options
 | 
|---|
 | 69 | OPT=            @OPT@
 | 
|---|
 | 70 | BASECFLAGS=     @BASECFLAGS@
 | 
|---|
| [391] | 71 | CFLAGS=         $(BASECFLAGS) @CFLAGS@ $(OPT) $(EXTRA_CFLAGS)
 | 
|---|
| [2] | 72 | # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
 | 
|---|
 | 73 | # be able to build extension modules using the directories specified in the
 | 
|---|
 | 74 | # environment variables
 | 
|---|
 | 75 | CPPFLAGS=       -I. -IInclude -I$(srcdir)/Include @CPPFLAGS@
 | 
|---|
 | 76 | LDFLAGS=        @LDFLAGS@
 | 
|---|
 | 77 | LDLAST=         @LDLAST@
 | 
|---|
 | 78 | SGI_ABI=        @SGI_ABI@
 | 
|---|
 | 79 | CCSHARED=       @CCSHARED@
 | 
|---|
 | 80 | LINKFORSHARED=  @LINKFORSHARED@
 | 
|---|
| [391] | 81 | ARFLAGS=        @ARFLAGS@
 | 
|---|
| [2] | 82 | # Extra C flags added for building the interpreter object files.
 | 
|---|
 | 83 | CFLAGSFORSHARED=@CFLAGSFORSHARED@
 | 
|---|
 | 84 | # C flags used for building the interpreter object files
 | 
|---|
 | 85 | PY_CFLAGS=      $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
 | 
|---|
 | 86 | 
 | 
|---|
 | 87 | 
 | 
|---|
 | 88 | # Machine-dependent subdirectories
 | 
|---|
 | 89 | MACHDEP=        @MACHDEP@
 | 
|---|
 | 90 | 
 | 
|---|
| [391] | 91 | # Multiarch directory (may be empty)
 | 
|---|
 | 92 | MULTIARCH=      @MULTIARCH@
 | 
|---|
 | 93 | 
 | 
|---|
| [2] | 94 | # Install prefix for architecture-independent files
 | 
|---|
 | 95 | prefix=         @prefix@
 | 
|---|
 | 96 | 
 | 
|---|
 | 97 | # Install prefix for architecture-dependent files
 | 
|---|
 | 98 | exec_prefix=    @exec_prefix@
 | 
|---|
 | 99 | 
 | 
|---|
 | 100 | # Install prefix for data files
 | 
|---|
 | 101 | datarootdir=    @datarootdir@
 | 
|---|
 | 102 | 
 | 
|---|
 | 103 | # Expanded directories
 | 
|---|
| [391] | 104 | BINDIR=         @bindir@
 | 
|---|
 | 105 | LIBDIR=         @libdir@
 | 
|---|
| [2] | 106 | MANDIR=         @mandir@
 | 
|---|
 | 107 | INCLUDEDIR=     @includedir@
 | 
|---|
 | 108 | CONFINCLUDEDIR= $(exec_prefix)/include
 | 
|---|
 | 109 | SCRIPTDIR=      $(prefix)/lib
 | 
|---|
 | 110 | 
 | 
|---|
 | 111 | # Detailed destination directories
 | 
|---|
 | 112 | BINLIBDEST=     $(LIBDIR)/python$(VERSION)
 | 
|---|
 | 113 | LIBDEST=        $(SCRIPTDIR)/python$(VERSION)
 | 
|---|
 | 114 | INCLUDEPY=      $(INCLUDEDIR)/python$(VERSION)
 | 
|---|
 | 115 | CONFINCLUDEPY=  $(CONFINCLUDEDIR)/python$(VERSION)
 | 
|---|
 | 116 | LIBP=           $(LIBDIR)/python$(VERSION)
 | 
|---|
 | 117 | 
 | 
|---|
 | 118 | # Symbols used for using shared libraries
 | 
|---|
 | 119 | SO=             @SO@
 | 
|---|
| [391] | 120 | LDSHARED=       @LDSHARED@ $(LDFLAGS)
 | 
|---|
 | 121 | BLDSHARED=      @BLDSHARED@ $(LDFLAGS)
 | 
|---|
 | 122 | LDCXXSHARED=    @LDCXXSHARED@
 | 
|---|
| [2] | 123 | DESTSHARED=     $(BINLIBDEST)/lib-dynload
 | 
|---|
 | 124 | 
 | 
|---|
 | 125 | # Executable suffix (.exe on Windows and Mac OS X)
 | 
|---|
 | 126 | EXE=            @EXEEXT@
 | 
|---|
 | 127 | BUILDEXE=       @BUILDEXEEXT@
 | 
|---|
 | 128 | 
 | 
|---|
 | 129 | # Short name and location for Mac OS X Python framework
 | 
|---|
 | 130 | UNIVERSALSDK=@UNIVERSALSDK@
 | 
|---|
 | 131 | PYTHONFRAMEWORK=        @PYTHONFRAMEWORK@
 | 
|---|
 | 132 | PYTHONFRAMEWORKDIR=     @PYTHONFRAMEWORKDIR@
 | 
|---|
 | 133 | PYTHONFRAMEWORKPREFIX=  @PYTHONFRAMEWORKPREFIX@
 | 
|---|
 | 134 | PYTHONFRAMEWORKINSTALLDIR= @PYTHONFRAMEWORKINSTALLDIR@
 | 
|---|
 | 135 | # Deployment target selected during configure, to be checked
 | 
|---|
 | 136 | # by distutils. The export statement is needed to ensure that the
 | 
|---|
 | 137 | # deployment target is active during build.
 | 
|---|
 | 138 | MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
 | 
|---|
 | 139 | @EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET
 | 
|---|
 | 140 | 
 | 
|---|
 | 141 | # Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
 | 
|---|
 | 142 | OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@
 | 
|---|
 | 143 | 
 | 
|---|
 | 144 | # Environment to run shared python without installed libraries
 | 
|---|
 | 145 | RUNSHARED=       @RUNSHARED@
 | 
|---|
 | 146 | 
 | 
|---|
 | 147 | # Modes for directories, executables and data files created by the
 | 
|---|
 | 148 | # install process.  Default to user-only-writable for all file types.
 | 
|---|
 | 149 | DIRMODE=        755
 | 
|---|
 | 150 | EXEMODE=        755
 | 
|---|
 | 151 | FILEMODE=       644
 | 
|---|
 | 152 | 
 | 
|---|
 | 153 | # configure script arguments
 | 
|---|
 | 154 | CONFIG_ARGS=    @CONFIG_ARGS@
 | 
|---|
 | 155 | 
 | 
|---|
 | 156 | 
 | 
|---|
 | 157 | # Subdirectories with code
 | 
|---|
 | 158 | SRCDIRS=        @SRCDIRS@
 | 
|---|
 | 159 | 
 | 
|---|
 | 160 | # Other subdirectories
 | 
|---|
 | 161 | SUBDIRSTOO=     Include Lib Misc Demo
 | 
|---|
 | 162 | 
 | 
|---|
 | 163 | # Files and directories to be distributed
 | 
|---|
| [391] | 164 | CONFIGFILES=    configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in
 | 
|---|
| [2] | 165 | DISTFILES=      README ChangeLog $(CONFIGFILES)
 | 
|---|
 | 166 | DISTDIRS=       $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
 | 
|---|
 | 167 | DIST=           $(DISTFILES) $(DISTDIRS)
 | 
|---|
 | 168 | 
 | 
|---|
 | 169 | 
 | 
|---|
 | 170 | LIBRARY=        @LIBRARY@
 | 
|---|
 | 171 | LDLIBRARY=      @LDLIBRARY@
 | 
|---|
 | 172 | BLDLIBRARY=     @BLDLIBRARY@
 | 
|---|
 | 173 | DLLLIBRARY=     @DLLLIBRARY@
 | 
|---|
 | 174 | LDLIBRARYDIR=   @LDLIBRARYDIR@
 | 
|---|
 | 175 | INSTSONAME=     @INSTSONAME@
 | 
|---|
| [10] | 176 | CONDENSED_VERSION=      @CONDENSED_VERSION@
 | 
|---|
| [2] | 177 | 
 | 
|---|
 | 178 | 
 | 
|---|
 | 179 | LIBS=           @LIBS@
 | 
|---|
 | 180 | LIBM=           @LIBM@
 | 
|---|
 | 181 | LIBC=           @LIBC@
 | 
|---|
 | 182 | SYSLIBS=        $(LIBM) $(LIBC)
 | 
|---|
 | 183 | SHLIBS=         @SHLIBS@
 | 
|---|
 | 184 | 
 | 
|---|
 | 185 | THREADOBJ=      @THREADOBJ@
 | 
|---|
 | 186 | DLINCLDIR=      @DLINCLDIR@
 | 
|---|
 | 187 | DYNLOADFILE=    @DYNLOADFILE@
 | 
|---|
 | 188 | MACHDEP_OBJS=   @MACHDEP_OBJS@
 | 
|---|
 | 189 | LIBOBJDIR=      Python/
 | 
|---|
 | 190 | LIBOBJS=        @LIBOBJS@
 | 
|---|
 | 191 | UNICODE_OBJS=   @UNICODE_OBJS@
 | 
|---|
 | 192 | 
 | 
|---|
 | 193 | PYTHON=         python$(EXE)
 | 
|---|
 | 194 | BUILDPYTHON=    python$(BUILDEXE)
 | 
|---|
 | 195 | 
 | 
|---|
| [391] | 196 | PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
 | 
|---|
 | 197 | _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
 | 
|---|
 | 198 | HOST_GNU_TYPE=  @host@
 | 
|---|
 | 199 | 
 | 
|---|
 | 200 | # Tcl and Tk config info from --with-tcltk-includes and -libs options
 | 
|---|
 | 201 | TCLTK_INCLUDES= @TCLTK_INCLUDES@
 | 
|---|
 | 202 | TCLTK_LIBS=     @TCLTK_LIBS@
 | 
|---|
 | 203 | 
 | 
|---|
| [2] | 204 | # The task to run while instrument when building the profile-opt target
 | 
|---|
 | 205 | PROFILE_TASK=   $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
 | 
|---|
 | 206 | #PROFILE_TASK=  $(srcdir)/Lib/test/regrtest.py
 | 
|---|
 | 207 | 
 | 
|---|
 | 208 | # === Definitions added by makesetup ===
 | 
|---|
 | 209 | 
 | 
|---|
 | 210 | 
 | 
|---|
 | 211 | ##########################################################################
 | 
|---|
 | 212 | # Modules
 | 
|---|
 | 213 | MODULE_OBJS=    \
 | 
|---|
 | 214 |                 Modules/config.o \
 | 
|---|
 | 215 |                 Modules/getpath.o \
 | 
|---|
 | 216 |                 Modules/main.o \
 | 
|---|
 | 217 |                 Modules/gcmodule.o
 | 
|---|
 | 218 | 
 | 
|---|
 | 219 | # Used of signalmodule.o is not available
 | 
|---|
 | 220 | SIGNAL_OBJS=    @SIGNAL_OBJS@
 | 
|---|
 | 221 | 
 | 
|---|
 | 222 | 
 | 
|---|
 | 223 | ##########################################################################
 | 
|---|
 | 224 | # Grammar
 | 
|---|
| [391] | 225 | GRAMMAR_H=      Include/graminit.h
 | 
|---|
 | 226 | GRAMMAR_C=      Python/graminit.c
 | 
|---|
| [2] | 227 | GRAMMAR_INPUT=  $(srcdir)/Grammar/Grammar
 | 
|---|
 | 228 | 
 | 
|---|
 | 229 | 
 | 
|---|
| [391] | 230 | LIBFFI_INCLUDEDIR=      @LIBFFI_INCLUDEDIR@
 | 
|---|
 | 231 | 
 | 
|---|
| [2] | 232 | ##########################################################################
 | 
|---|
 | 233 | # Parser
 | 
|---|
 | 234 | PGEN=           Parser/pgen$(EXE)
 | 
|---|
 | 235 | 
 | 
|---|
| [391] | 236 | PSRCS=          \
 | 
|---|
 | 237 |                 Parser/acceler.c \
 | 
|---|
 | 238 |                 Parser/grammar1.c \
 | 
|---|
 | 239 |                 Parser/listnode.c \
 | 
|---|
 | 240 |                 Parser/node.c \
 | 
|---|
 | 241 |                 Parser/parser.c \
 | 
|---|
 | 242 |                 Parser/parsetok.c \
 | 
|---|
 | 243 |                 Parser/bitset.c \
 | 
|---|
 | 244 |                 Parser/metagrammar.c \
 | 
|---|
 | 245 |                 Parser/firstsets.c \
 | 
|---|
 | 246 |                 Parser/grammar.c \
 | 
|---|
 | 247 |                 Parser/pgen.c
 | 
|---|
 | 248 | 
 | 
|---|
| [2] | 249 | POBJS=          \
 | 
|---|
 | 250 |                 Parser/acceler.o \
 | 
|---|
 | 251 |                 Parser/grammar1.o \
 | 
|---|
 | 252 |                 Parser/listnode.o \
 | 
|---|
 | 253 |                 Parser/node.o \
 | 
|---|
 | 254 |                 Parser/parser.o \
 | 
|---|
 | 255 |                 Parser/parsetok.o \
 | 
|---|
 | 256 |                 Parser/bitset.o \
 | 
|---|
 | 257 |                 Parser/metagrammar.o \
 | 
|---|
 | 258 |                 Parser/firstsets.o \
 | 
|---|
 | 259 |                 Parser/grammar.o \
 | 
|---|
 | 260 |                 Parser/pgen.o
 | 
|---|
 | 261 | 
 | 
|---|
 | 262 | PARSER_OBJS=    $(POBJS) Parser/myreadline.o Parser/tokenizer.o
 | 
|---|
 | 263 | 
 | 
|---|
| [391] | 264 | PGSRCS=         \
 | 
|---|
 | 265 |                 Objects/obmalloc.c \
 | 
|---|
 | 266 |                 Python/mysnprintf.c \
 | 
|---|
 | 267 |                 Python/pyctype.c \
 | 
|---|
 | 268 |                 Parser/tokenizer_pgen.c \
 | 
|---|
 | 269 |                 Parser/printgrammar.c \
 | 
|---|
 | 270 |                 Parser/pgenmain.c
 | 
|---|
 | 271 | 
 | 
|---|
| [2] | 272 | PGOBJS=         \
 | 
|---|
 | 273 |                 Objects/obmalloc.o \
 | 
|---|
 | 274 |                 Python/mysnprintf.o \
 | 
|---|
| [391] | 275 |                 Python/pyctype.o \
 | 
|---|
| [2] | 276 |                 Parser/tokenizer_pgen.o \
 | 
|---|
 | 277 |                 Parser/printgrammar.o \
 | 
|---|
 | 278 |                 Parser/pgenmain.o
 | 
|---|
 | 279 | 
 | 
|---|
 | 280 | PARSER_HEADERS= \
 | 
|---|
 | 281 |                 Parser/parser.h \
 | 
|---|
 | 282 |                 Parser/tokenizer.h
 | 
|---|
 | 283 | 
 | 
|---|
| [391] | 284 | PGENSRCS=       $(PSRCS) $(PGSRCS)
 | 
|---|
 | 285 | PGENOBJS=       $(POBJS) $(PGOBJS)
 | 
|---|
| [2] | 286 | 
 | 
|---|
 | 287 | ##########################################################################
 | 
|---|
 | 288 | # AST
 | 
|---|
| [391] | 289 | AST_H_DIR=      Include
 | 
|---|
| [2] | 290 | AST_H=          $(AST_H_DIR)/Python-ast.h
 | 
|---|
| [391] | 291 | AST_C_DIR=      Python
 | 
|---|
| [2] | 292 | AST_C=          $(AST_C_DIR)/Python-ast.c
 | 
|---|
 | 293 | AST_ASDL=       $(srcdir)/Parser/Python.asdl
 | 
|---|
 | 294 | 
 | 
|---|
 | 295 | ASDLGEN_FILES=  $(srcdir)/Parser/asdl.py $(srcdir)/Parser/asdl_c.py
 | 
|---|
 | 296 | # XXX Note that a build now requires Python exist before the build starts
 | 
|---|
 | 297 | ASDLGEN=        $(srcdir)/Parser/asdl_c.py
 | 
|---|
 | 298 | 
 | 
|---|
 | 299 | ##########################################################################
 | 
|---|
 | 300 | # Python
 | 
|---|
 | 301 | PYTHON_OBJS=    \
 | 
|---|
 | 302 |                 Python/_warnings.o \
 | 
|---|
 | 303 |                 Python/Python-ast.o \
 | 
|---|
 | 304 |                 Python/asdl.o \
 | 
|---|
 | 305 |                 Python/ast.o \
 | 
|---|
 | 306 |                 Python/bltinmodule.o \
 | 
|---|
 | 307 |                 Python/ceval.o \
 | 
|---|
 | 308 |                 Python/compile.o \
 | 
|---|
 | 309 |                 Python/codecs.o \
 | 
|---|
 | 310 |                 Python/errors.o \
 | 
|---|
 | 311 |                 Python/frozen.o \
 | 
|---|
 | 312 |                 Python/frozenmain.o \
 | 
|---|
 | 313 |                 Python/future.o \
 | 
|---|
 | 314 |                 Python/getargs.o \
 | 
|---|
 | 315 |                 Python/getcompiler.o \
 | 
|---|
 | 316 |                 Python/getcopyright.o \
 | 
|---|
 | 317 |                 Python/getplatform.o \
 | 
|---|
 | 318 |                 Python/getversion.o \
 | 
|---|
 | 319 |                 Python/graminit.o \
 | 
|---|
 | 320 |                 Python/import.o \
 | 
|---|
 | 321 |                 Python/importdl.o \
 | 
|---|
 | 322 |                 Python/marshal.o \
 | 
|---|
 | 323 |                 Python/modsupport.o \
 | 
|---|
 | 324 |                 Python/mystrtoul.o \
 | 
|---|
 | 325 |                 Python/mysnprintf.o \
 | 
|---|
 | 326 |                 Python/peephole.o \
 | 
|---|
 | 327 |                 Python/pyarena.o \
 | 
|---|
| [391] | 328 |                 Python/pyctype.o \
 | 
|---|
| [2] | 329 |                 Python/pyfpe.o \
 | 
|---|
 | 330 |                 Python/pymath.o \
 | 
|---|
 | 331 |                 Python/pystate.o \
 | 
|---|
 | 332 |                 Python/pythonrun.o \
 | 
|---|
| [391] | 333 |                 Python/random.o \
 | 
|---|
| [2] | 334 |                 Python/structmember.o \
 | 
|---|
 | 335 |                 Python/symtable.o \
 | 
|---|
 | 336 |                 Python/sysmodule.o \
 | 
|---|
 | 337 |                 Python/traceback.o \
 | 
|---|
 | 338 |                 Python/getopt.o \
 | 
|---|
 | 339 |                 Python/pystrcmp.o \
 | 
|---|
 | 340 |                 Python/pystrtod.o \
 | 
|---|
| [391] | 341 |                 Python/dtoa.o \
 | 
|---|
| [2] | 342 |                 Python/formatter_unicode.o \
 | 
|---|
 | 343 |                 Python/formatter_string.o \
 | 
|---|
 | 344 |                 Python/$(DYNLOADFILE) \
 | 
|---|
 | 345 |                 $(LIBOBJS) \
 | 
|---|
 | 346 |                 $(MACHDEP_OBJS) \
 | 
|---|
 | 347 |                 $(THREADOBJ)
 | 
|---|
 | 348 | 
 | 
|---|
 | 349 | 
 | 
|---|
 | 350 | ##########################################################################
 | 
|---|
 | 351 | # Objects
 | 
|---|
 | 352 | OBJECT_OBJS=    \
 | 
|---|
 | 353 |                 Objects/abstract.o \
 | 
|---|
 | 354 |                 Objects/boolobject.o \
 | 
|---|
 | 355 |                 Objects/bufferobject.o \
 | 
|---|
 | 356 |                 Objects/bytes_methods.o \
 | 
|---|
 | 357 |                 Objects/bytearrayobject.o \
 | 
|---|
| [391] | 358 |                 Objects/capsule.o \
 | 
|---|
| [2] | 359 |                 Objects/cellobject.o \
 | 
|---|
 | 360 |                 Objects/classobject.o \
 | 
|---|
 | 361 |                 Objects/cobject.o \
 | 
|---|
 | 362 |                 Objects/codeobject.o \
 | 
|---|
 | 363 |                 Objects/complexobject.o \
 | 
|---|
 | 364 |                 Objects/descrobject.o \
 | 
|---|
 | 365 |                 Objects/enumobject.o \
 | 
|---|
 | 366 |                 Objects/exceptions.o \
 | 
|---|
 | 367 |                 Objects/genobject.o \
 | 
|---|
 | 368 |                 Objects/fileobject.o \
 | 
|---|
 | 369 |                 Objects/floatobject.o \
 | 
|---|
 | 370 |                 Objects/frameobject.o \
 | 
|---|
 | 371 |                 Objects/funcobject.o \
 | 
|---|
 | 372 |                 Objects/intobject.o \
 | 
|---|
 | 373 |                 Objects/iterobject.o \
 | 
|---|
 | 374 |                 Objects/listobject.o \
 | 
|---|
 | 375 |                 Objects/longobject.o \
 | 
|---|
 | 376 |                 Objects/dictobject.o \
 | 
|---|
| [391] | 377 |                 Objects/memoryobject.o \
 | 
|---|
| [2] | 378 |                 Objects/methodobject.o \
 | 
|---|
 | 379 |                 Objects/moduleobject.o \
 | 
|---|
 | 380 |                 Objects/object.o \
 | 
|---|
 | 381 |                 Objects/obmalloc.o \
 | 
|---|
 | 382 |                 Objects/rangeobject.o \
 | 
|---|
 | 383 |                 Objects/setobject.o \
 | 
|---|
 | 384 |                 Objects/sliceobject.o \
 | 
|---|
 | 385 |                 Objects/stringobject.o \
 | 
|---|
 | 386 |                 Objects/structseq.o \
 | 
|---|
 | 387 |                 Objects/tupleobject.o \
 | 
|---|
 | 388 |                 Objects/typeobject.o \
 | 
|---|
 | 389 |                 Objects/weakrefobject.o \
 | 
|---|
 | 390 |                 $(UNICODE_OBJS)
 | 
|---|
 | 391 | 
 | 
|---|
 | 392 | 
 | 
|---|
 | 393 | ##########################################################################
 | 
|---|
 | 394 | # objects that get linked into the Python library
 | 
|---|
 | 395 | LIBRARY_OBJS=   \
 | 
|---|
 | 396 |                 Modules/getbuildinfo.o \
 | 
|---|
 | 397 |                 $(PARSER_OBJS) \
 | 
|---|
 | 398 |                 $(OBJECT_OBJS) \
 | 
|---|
 | 399 |                 $(PYTHON_OBJS) \
 | 
|---|
 | 400 |                 $(MODULE_OBJS) \
 | 
|---|
 | 401 |                 $(SIGNAL_OBJS) \
 | 
|---|
 | 402 |                 $(MODOBJS)
 | 
|---|
 | 403 | 
 | 
|---|
 | 404 | #########################################################################
 | 
|---|
 | 405 | # Rules
 | 
|---|
 | 406 | 
 | 
|---|
 | 407 | # Default target
 | 
|---|
 | 408 | all:            build_all
 | 
|---|
| [391] | 409 | build_all:      $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks
 | 
|---|
| [2] | 410 | 
 | 
|---|
 | 411 | # Compile a binary with gcc profile guided optimization.
 | 
|---|
 | 412 | profile-opt:
 | 
|---|
 | 413 |         @echo "Building with support for profile generation:"
 | 
|---|
 | 414 |         $(MAKE) clean
 | 
|---|
 | 415 |         $(MAKE) build_all_generate_profile
 | 
|---|
 | 416 |         @echo "Running benchmark to generate profile data:"
 | 
|---|
 | 417 |         $(MAKE) profile-removal
 | 
|---|
 | 418 |         $(MAKE) run_profile_task
 | 
|---|
 | 419 |         @echo "Rebuilding with profile guided optimizations:"
 | 
|---|
 | 420 |         $(MAKE) clean
 | 
|---|
 | 421 |         $(MAKE) build_all_use_profile
 | 
|---|
 | 422 | 
 | 
|---|
 | 423 | build_all_generate_profile:
 | 
|---|
 | 424 |         $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"
 | 
|---|
 | 425 | 
 | 
|---|
 | 426 | run_profile_task:
 | 
|---|
| [391] | 427 |         : # FIXME: can't run for a cross build
 | 
|---|
| [2] | 428 |         ./$(BUILDPYTHON) $(PROFILE_TASK)
 | 
|---|
 | 429 | 
 | 
|---|
 | 430 | build_all_use_profile:
 | 
|---|
 | 431 |         $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"
 | 
|---|
 | 432 | 
 | 
|---|
 | 433 | coverage:
 | 
|---|
 | 434 |         @echo "Building with support for coverage checking:"
 | 
|---|
 | 435 |         $(MAKE) clean
 | 
|---|
 | 436 |         $(MAKE) all CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -lgcov"
 | 
|---|
 | 437 | 
 | 
|---|
 | 438 | 
 | 
|---|
 | 439 | # Build the interpreter
 | 
|---|
 | 440 | $(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
 | 
|---|
 | 441 |                 $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
 | 
|---|
 | 442 |                         Modules/python.o \
 | 
|---|
 | 443 |                         $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
 | 
|---|
 | 444 | 
 | 
|---|
| [391] | 445 | platform: $(BUILDPYTHON) pybuilddir.txt
 | 
|---|
 | 446 |         $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
 | 
|---|
| [2] | 447 | 
 | 
|---|
| [391] | 448 | # Create build directory and generate the sysconfig build-time data there.
 | 
|---|
 | 449 | # pybuilddir.txt contains the name of the build dir and is used for
 | 
|---|
 | 450 | # sys.path fixup -- see Modules/getpath.c.
 | 
|---|
 | 451 | pybuilddir.txt: $(BUILDPYTHON)
 | 
|---|
 | 452 |                 $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars
 | 
|---|
| [2] | 453 | 
 | 
|---|
 | 454 | # Build the shared modules
 | 
|---|
| [391] | 455 | # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
 | 
|---|
 | 456 | # -s, --silent or --quiet is always the first char.
 | 
|---|
 | 457 | # Under BSD make, MAKEFLAGS might be " -s -v x=y".
 | 
|---|
 | 458 | sharedmods: $(BUILDPYTHON) pybuilddir.txt
 | 
|---|
 | 459 |         @case "$$MAKEFLAGS" in \
 | 
|---|
 | 460 |             *\ -s*|s*) quiet="-q";; \
 | 
|---|
 | 461 |             *) quiet="";; \
 | 
|---|
 | 462 |         esac; \
 | 
|---|
 | 463 |         $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
 | 
|---|
 | 464 |                 _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
 | 
|---|
 | 465 |                 $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
 | 
|---|
| [2] | 466 | 
 | 
|---|
 | 467 | # Build static library
 | 
|---|
 | 468 | # avoid long command lines, same as LIBRARY_OBJS
 | 
|---|
 | 469 | $(LIBRARY): $(LIBRARY_OBJS)
 | 
|---|
 | 470 |         -rm -f $@
 | 
|---|
| [391] | 471 |         $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o
 | 
|---|
 | 472 |         $(AR) $(ARFLAGS) $@ $(PARSER_OBJS)
 | 
|---|
 | 473 |         $(AR) $(ARFLAGS) $@ $(OBJECT_OBJS)
 | 
|---|
 | 474 |         $(AR) $(ARFLAGS) $@ $(PYTHON_OBJS)
 | 
|---|
 | 475 |         $(AR) $(ARFLAGS) $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
 | 
|---|
 | 476 |         $(AR) $(ARFLAGS) $@ $(MODOBJS)
 | 
|---|
| [2] | 477 |         $(RANLIB) $@
 | 
|---|
 | 478 | 
 | 
|---|
 | 479 | libpython$(VERSION).so: $(LIBRARY_OBJS)
 | 
|---|
 | 480 |         if test $(INSTSONAME) != $(LDLIBRARY); then \
 | 
|---|
| [391] | 481 |                 $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
 | 
|---|
| [2] | 482 |                 $(LN) -f $(INSTSONAME) $@; \
 | 
|---|
 | 483 |         else \
 | 
|---|
| [391] | 484 |                 $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
 | 
|---|
| [2] | 485 |         fi
 | 
|---|
 | 486 | 
 | 
|---|
 | 487 | libpython$(VERSION).dylib: $(LIBRARY_OBJS)
 | 
|---|
 | 488 |          $(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); \
 | 
|---|
 | 489 | 
 | 
|---|
| [391] | 490 | 
 | 
|---|
| [2] | 491 | libpython$(VERSION).sl: $(LIBRARY_OBJS)
 | 
|---|
| [391] | 492 |         $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)
 | 
|---|
| [2] | 493 | 
 | 
|---|
| [391] | 494 | # Copy up the gdb python hooks into a position where they can be automatically
 | 
|---|
 | 495 | # loaded by gdb during Lib/test/test_gdb.py
 | 
|---|
 | 496 | #
 | 
|---|
 | 497 | # Distributors are likely to want to install this somewhere else e.g. relative
 | 
|---|
 | 498 | # to the stripped DWARF data for the shared library.
 | 
|---|
 | 499 | gdbhooks: $(BUILDPYTHON)-gdb.py
 | 
|---|
 | 500 | 
 | 
|---|
 | 501 | SRC_GDB_HOOKS=$(srcdir)/Tools/gdb/libpython.py
 | 
|---|
 | 502 | $(BUILDPYTHON)-gdb.py: $(SRC_GDB_HOOKS)
 | 
|---|
 | 503 |         $(INSTALL_DATA) $(SRC_GDB_HOOKS) $(BUILDPYTHON)-gdb.py
 | 
|---|
 | 504 | 
 | 
|---|
| [2] | 505 | # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
 | 
|---|
 | 506 | # minimal framework (not including the Lib directory and such) in the current
 | 
|---|
 | 507 | # directory.
 | 
|---|
 | 508 | RESSRCDIR=Mac/Resources/framework
 | 
|---|
 | 509 | $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
 | 
|---|
 | 510 |                 $(LIBRARY) \
 | 
|---|
 | 511 |                 $(RESSRCDIR)/Info.plist
 | 
|---|
 | 512 |         $(INSTALL) -d -m $(DIRMODE) $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)
 | 
|---|
| [391] | 513 |         $(CC) -o $(LDLIBRARY) $(LDFLAGS)  -dynamiclib \
 | 
|---|
 | 514 |                 -all_load $(LIBRARY) -Wl,-single_module \
 | 
|---|
 | 515 |                 -install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) \
 | 
|---|
 | 516 |                 -compatibility_version $(VERSION) \
 | 
|---|
 | 517 |                 -current_version $(VERSION);
 | 
|---|
| [2] | 518 |         $(INSTALL) -d -m $(DIRMODE)  \
 | 
|---|
 | 519 |                 $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj
 | 
|---|
 | 520 |         $(INSTALL_DATA) $(RESSRCDIR)/Info.plist \
 | 
|---|
 | 521 |                 $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/Info.plist
 | 
|---|
 | 522 |         $(LN) -fsn $(VERSION) $(PYTHONFRAMEWORKDIR)/Versions/Current
 | 
|---|
 | 523 |         $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)
 | 
|---|
 | 524 |         $(LN) -fsn Versions/Current/Headers $(PYTHONFRAMEWORKDIR)/Headers
 | 
|---|
 | 525 |         $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources
 | 
|---|
 | 526 | 
 | 
|---|
| [10] | 527 | ifneq ($(filter os2emx os2knix,$(MACHDEP)),) # bird hack!
 | 
|---|
 | 528 | $(DLLLIBRARY) $(LDLIBRARY): $(LIBRARY_OBJS)
 | 
|---|
 | 529 |         $(LDSHARED) -o $(DLLLIBRARY) $^ $(LIBS) $(MODLIBS) $(SYSLIBS)
 | 
|---|
 | 530 |         emximp -o $(LDLIBRARY) $(DLLLIBRARY)
 | 
|---|
 | 531 | 
 | 
|---|
 | 532 | else # CYGWIN
 | 
|---|
| [2] | 533 | # This rule builds the Cygwin Python DLL and import library if configured
 | 
|---|
 | 534 | # for a shared core library; otherwise, this rule is a noop.
 | 
|---|
 | 535 | $(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
 | 
|---|
 | 536 |         if test -n "$(DLLLIBRARY)"; then \
 | 
|---|
| [391] | 537 |                 $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
 | 
|---|
| [2] | 538 |                         $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \
 | 
|---|
 | 539 |         else true; \
 | 
|---|
 | 540 |         fi
 | 
|---|
| [10] | 541 | endif # end bird hack!  
 | 
|---|
| [2] | 542 | 
 | 
|---|
 | 543 | 
 | 
|---|
 | 544 | oldsharedmods: $(SHAREDMODS)
 | 
|---|
 | 545 | 
 | 
|---|
 | 546 | 
 | 
|---|
 | 547 | Makefile Modules/config.c: Makefile.pre \
 | 
|---|
 | 548 |                                 $(srcdir)/Modules/config.c.in \
 | 
|---|
 | 549 |                                 $(MAKESETUP) \
 | 
|---|
 | 550 |                                 Modules/Setup.config \
 | 
|---|
 | 551 |                                 Modules/Setup \
 | 
|---|
 | 552 |                                 Modules/Setup.local
 | 
|---|
 | 553 |         $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \
 | 
|---|
 | 554 |                                 -s Modules \
 | 
|---|
 | 555 |                                 Modules/Setup.config \
 | 
|---|
 | 556 |                                 Modules/Setup.local \
 | 
|---|
 | 557 |                                 Modules/Setup
 | 
|---|
 | 558 |         @mv config.c Modules
 | 
|---|
 | 559 |         @echo "The Makefile was updated, you may need to re-run make."
 | 
|---|
 | 560 | 
 | 
|---|
 | 561 | 
 | 
|---|
 | 562 | Modules/Setup: $(srcdir)/Modules/Setup.dist
 | 
|---|
 | 563 |         @if test -f Modules/Setup; then \
 | 
|---|
 | 564 |                 echo "-----------------------------------------------"; \
 | 
|---|
 | 565 |                 echo "Modules/Setup.dist is newer than Modules/Setup;"; \
 | 
|---|
 | 566 |                 echo "check to make sure you have all the updates you"; \
 | 
|---|
 | 567 |                 echo "need in your Modules/Setup file."; \
 | 
|---|
 | 568 |                 echo "Usually, copying Modules/Setup.dist to Modules/Setup will work."; \
 | 
|---|
 | 569 |                 echo "-----------------------------------------------"; \
 | 
|---|
 | 570 |         fi
 | 
|---|
 | 571 | 
 | 
|---|
 | 572 | ############################################################################
 | 
|---|
 | 573 | # Special rules for object files
 | 
|---|
 | 574 | 
 | 
|---|
 | 575 | Modules/getbuildinfo.o: $(PARSER_OBJS) \
 | 
|---|
 | 576 |                 $(OBJECT_OBJS) \
 | 
|---|
 | 577 |                 $(PYTHON_OBJS) \
 | 
|---|
 | 578 |                 $(MODULE_OBJS) \
 | 
|---|
 | 579 |                 $(SIGNAL_OBJS) \
 | 
|---|
 | 580 |                 $(MODOBJS) \
 | 
|---|
 | 581 |                 $(srcdir)/Modules/getbuildinfo.c
 | 
|---|
| [391] | 582 |         $(CC) -c $(PY_CFLAGS) \
 | 
|---|
 | 583 |               -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" \
 | 
|---|
 | 584 |               -DHGVERSION="\"`LC_ALL=C $(HGVERSION)`\"" \
 | 
|---|
 | 585 |               -DHGTAG="\"`LC_ALL=C $(HGTAG)`\"" \
 | 
|---|
 | 586 |               -DHGBRANCH="\"`LC_ALL=C $(HGBRANCH)`\"" \
 | 
|---|
 | 587 |               -o $@ $(srcdir)/Modules/getbuildinfo.c
 | 
|---|
| [2] | 588 | 
 | 
|---|
 | 589 | Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
 | 
|---|
 | 590 |         $(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
 | 
|---|
 | 591 |                 -DPREFIX='"$(prefix)"' \
 | 
|---|
 | 592 |                 -DEXEC_PREFIX='"$(exec_prefix)"' \
 | 
|---|
 | 593 |                 -DVERSION='"$(VERSION)"' \
 | 
|---|
 | 594 |                 -DVPATH='"$(VPATH)"' \
 | 
|---|
 | 595 |                 -o $@ $(srcdir)/Modules/getpath.c
 | 
|---|
 | 596 | 
 | 
|---|
 | 597 | Modules/python.o: $(srcdir)/Modules/python.c
 | 
|---|
 | 598 |         $(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c
 | 
|---|
 | 599 | 
 | 
|---|
| [391] | 600 | Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c $(srcdir)/Modules/posixmodule.h
 | 
|---|
| [2] | 601 | 
 | 
|---|
| [391] | 602 | Modules/grpmodule.o: $(srcdir)/Modules/grpmodule.c $(srcdir)/Modules/posixmodule.h
 | 
|---|
| [2] | 603 | 
 | 
|---|
| [391] | 604 | Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule.h
 | 
|---|
 | 605 | 
 | 
|---|
 | 606 | $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
 | 
|---|
 | 607 |                 @$(MKDIR_P) Include
 | 
|---|
 | 608 |                 $(MAKE) $(PGEN)
 | 
|---|
 | 609 |                 $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
 | 
|---|
 | 610 | $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
 | 
|---|
 | 611 |                 $(MAKE) $(GRAMMAR_H)
 | 
|---|
 | 612 |                 touch $(GRAMMAR_C)
 | 
|---|
 | 613 | 
 | 
|---|
| [2] | 614 | $(PGEN):        $(PGENOBJS)
 | 
|---|
 | 615 |                 $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
 | 
|---|
 | 616 | 
 | 
|---|
 | 617 | Parser/grammar.o:       $(srcdir)/Parser/grammar.c \
 | 
|---|
 | 618 |                                 $(srcdir)/Include/token.h \
 | 
|---|
 | 619 |                                 $(srcdir)/Include/grammar.h
 | 
|---|
 | 620 | Parser/metagrammar.o:   $(srcdir)/Parser/metagrammar.c
 | 
|---|
 | 621 | 
 | 
|---|
 | 622 | Parser/tokenizer_pgen.o:        $(srcdir)/Parser/tokenizer.c
 | 
|---|
 | 623 | 
 | 
|---|
 | 624 | Parser/pgenmain.o:      $(srcdir)/Include/parsetok.h
 | 
|---|
 | 625 | 
 | 
|---|
 | 626 | $(AST_H): $(AST_ASDL) $(ASDLGEN_FILES)
 | 
|---|
| [391] | 627 |         $(MKDIR_P) $(AST_H_DIR)
 | 
|---|
| [2] | 628 |         $(ASDLGEN) -h $(AST_H_DIR) $(AST_ASDL)
 | 
|---|
 | 629 | 
 | 
|---|
 | 630 | $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
 | 
|---|
| [391] | 631 |         $(MKDIR_P) $(AST_C_DIR)
 | 
|---|
| [2] | 632 |         $(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL)
 | 
|---|
 | 633 | 
 | 
|---|
| [391] | 634 | Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
 | 
|---|
| [2] | 635 | 
 | 
|---|
 | 636 | Python/getplatform.o: $(srcdir)/Python/getplatform.c
 | 
|---|
 | 637 |                 $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
 | 
|---|
 | 638 | 
 | 
|---|
 | 639 | Python/importdl.o: $(srcdir)/Python/importdl.c
 | 
|---|
 | 640 |                 $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
 | 
|---|
 | 641 | 
 | 
|---|
 | 642 | Objects/unicodectype.o: $(srcdir)/Objects/unicodectype.c \
 | 
|---|
 | 643 |                                 $(srcdir)/Objects/unicodetype_db.h
 | 
|---|
 | 644 | 
 | 
|---|
 | 645 | STRINGLIB_HEADERS= \
 | 
|---|
 | 646 |                 $(srcdir)/Include/bytes_methods.h \
 | 
|---|
 | 647 |                 $(srcdir)/Objects/stringlib/count.h \
 | 
|---|
 | 648 |                 $(srcdir)/Objects/stringlib/ctype.h \
 | 
|---|
 | 649 |                 $(srcdir)/Objects/stringlib/fastsearch.h \
 | 
|---|
 | 650 |                 $(srcdir)/Objects/stringlib/find.h \
 | 
|---|
 | 651 |                 $(srcdir)/Objects/stringlib/formatter.h \
 | 
|---|
 | 652 |                 $(srcdir)/Objects/stringlib/partition.h \
 | 
|---|
| [391] | 653 |                 $(srcdir)/Objects/stringlib/split.h \
 | 
|---|
| [2] | 654 |                 $(srcdir)/Objects/stringlib/stringdefs.h \
 | 
|---|
 | 655 |                 $(srcdir)/Objects/stringlib/string_format.h \
 | 
|---|
 | 656 |                 $(srcdir)/Objects/stringlib/transmogrify.h \
 | 
|---|
 | 657 |                 $(srcdir)/Objects/stringlib/unicodedefs.h \
 | 
|---|
 | 658 |                 $(srcdir)/Objects/stringlib/localeutil.h
 | 
|---|
 | 659 | 
 | 
|---|
 | 660 | Objects/unicodeobject.o: $(srcdir)/Objects/unicodeobject.c \
 | 
|---|
 | 661 |                                 $(STRINGLIB_HEADERS)
 | 
|---|
 | 662 | 
 | 
|---|
 | 663 | Objects/bytearrayobject.o: $(srcdir)/Objects/bytearrayobject.c \
 | 
|---|
 | 664 |                                 $(STRINGLIB_HEADERS)
 | 
|---|
 | 665 | 
 | 
|---|
 | 666 | Objects/stringobject.o: $(srcdir)/Objects/stringobject.c \
 | 
|---|
 | 667 |                                 $(STRINGLIB_HEADERS)
 | 
|---|
 | 668 | 
 | 
|---|
 | 669 | Python/formatter_unicode.o: $(srcdir)/Python/formatter_unicode.c \
 | 
|---|
 | 670 |                                 $(STRINGLIB_HEADERS)
 | 
|---|
 | 671 | 
 | 
|---|
 | 672 | Python/formatter_string.o: $(srcdir)/Python/formatter_string.c \
 | 
|---|
 | 673 |                                 $(STRINGLIB_HEADERS)
 | 
|---|
 | 674 | 
 | 
|---|
 | 675 | ############################################################################
 | 
|---|
 | 676 | # Header files
 | 
|---|
 | 677 | 
 | 
|---|
 | 678 | PYTHON_HEADERS= \
 | 
|---|
 | 679 |                 Include/Python-ast.h \
 | 
|---|
 | 680 |                 Include/Python.h \
 | 
|---|
 | 681 |                 Include/abstract.h \
 | 
|---|
 | 682 |                 Include/asdl.h \
 | 
|---|
 | 683 |                 Include/ast.h \
 | 
|---|
 | 684 |                 Include/bitset.h \
 | 
|---|
 | 685 |                 Include/boolobject.h \
 | 
|---|
 | 686 |                 Include/bytearrayobject.h \
 | 
|---|
 | 687 |                 Include/bytes_methods.h \
 | 
|---|
 | 688 |                 Include/bytesobject.h \
 | 
|---|
 | 689 |                 Include/bufferobject.h \
 | 
|---|
 | 690 |                 Include/cellobject.h \
 | 
|---|
 | 691 |                 Include/ceval.h \
 | 
|---|
 | 692 |                 Include/classobject.h \
 | 
|---|
 | 693 |                 Include/cobject.h \
 | 
|---|
 | 694 |                 Include/code.h \
 | 
|---|
 | 695 |                 Include/codecs.h \
 | 
|---|
 | 696 |                 Include/compile.h \
 | 
|---|
 | 697 |                 Include/complexobject.h \
 | 
|---|
 | 698 |                 Include/descrobject.h \
 | 
|---|
 | 699 |                 Include/dictobject.h \
 | 
|---|
| [391] | 700 |                 Include/dtoa.h \
 | 
|---|
| [2] | 701 |                 Include/enumobject.h \
 | 
|---|
 | 702 |                 Include/errcode.h \
 | 
|---|
 | 703 |                 Include/eval.h \
 | 
|---|
 | 704 |                 Include/fileobject.h \
 | 
|---|
 | 705 |                 Include/floatobject.h \
 | 
|---|
 | 706 |                 Include/frameobject.h \
 | 
|---|
 | 707 |                 Include/funcobject.h \
 | 
|---|
 | 708 |                 Include/genobject.h \
 | 
|---|
 | 709 |                 Include/import.h \
 | 
|---|
 | 710 |                 Include/intobject.h \
 | 
|---|
 | 711 |                 Include/intrcheck.h \
 | 
|---|
 | 712 |                 Include/iterobject.h \
 | 
|---|
 | 713 |                 Include/listobject.h \
 | 
|---|
 | 714 |                 Include/longintrepr.h \
 | 
|---|
 | 715 |                 Include/longobject.h \
 | 
|---|
 | 716 |                 Include/marshal.h \
 | 
|---|
| [391] | 717 |                 Include/memoryobject.h \
 | 
|---|
| [2] | 718 |                 Include/metagrammar.h \
 | 
|---|
 | 719 |                 Include/methodobject.h \
 | 
|---|
 | 720 |                 Include/modsupport.h \
 | 
|---|
 | 721 |                 Include/moduleobject.h \
 | 
|---|
 | 722 |                 Include/node.h \
 | 
|---|
 | 723 |                 Include/object.h \
 | 
|---|
 | 724 |                 Include/objimpl.h \
 | 
|---|
 | 725 |                 Include/opcode.h \
 | 
|---|
 | 726 |                 Include/osdefs.h \
 | 
|---|
 | 727 |                 Include/parsetok.h \
 | 
|---|
 | 728 |                 Include/patchlevel.h \
 | 
|---|
 | 729 |                 Include/pgen.h \
 | 
|---|
 | 730 |                 Include/pgenheaders.h \
 | 
|---|
 | 731 |                 Include/pyarena.h \
 | 
|---|
| [391] | 732 |                 Include/pycapsule.h \
 | 
|---|
 | 733 |                 Include/pyctype.h \
 | 
|---|
| [2] | 734 |                 Include/pydebug.h \
 | 
|---|
 | 735 |                 Include/pyerrors.h \
 | 
|---|
 | 736 |                 Include/pyfpe.h \
 | 
|---|
 | 737 |                 Include/pymath.h \
 | 
|---|
 | 738 |                 Include/pygetopt.h \
 | 
|---|
 | 739 |                 Include/pymem.h \
 | 
|---|
 | 740 |                 Include/pyport.h \
 | 
|---|
 | 741 |                 Include/pystate.h \
 | 
|---|
 | 742 |                 Include/pystrcmp.h \
 | 
|---|
 | 743 |                 Include/pystrtod.h \
 | 
|---|
 | 744 |                 Include/pythonrun.h \
 | 
|---|
 | 745 |                 Include/pythread.h \
 | 
|---|
 | 746 |                 Include/rangeobject.h \
 | 
|---|
 | 747 |                 Include/setobject.h \
 | 
|---|
 | 748 |                 Include/sliceobject.h \
 | 
|---|
 | 749 |                 Include/stringobject.h \
 | 
|---|
 | 750 |                 Include/structmember.h \
 | 
|---|
 | 751 |                 Include/structseq.h \
 | 
|---|
 | 752 |                 Include/symtable.h \
 | 
|---|
 | 753 |                 Include/sysmodule.h \
 | 
|---|
 | 754 |                 Include/traceback.h \
 | 
|---|
 | 755 |                 Include/tupleobject.h \
 | 
|---|
 | 756 |                 Include/ucnhash.h \
 | 
|---|
 | 757 |                 Include/unicodeobject.h \
 | 
|---|
 | 758 |                 Include/warnings.h \
 | 
|---|
 | 759 |                 Include/weakrefobject.h \
 | 
|---|
 | 760 |                 pyconfig.h \
 | 
|---|
 | 761 |                 $(PARSER_HEADERS)
 | 
|---|
 | 762 | 
 | 
|---|
 | 763 | $(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
 | 
|---|
 | 764 | 
 | 
|---|
 | 765 | 
 | 
|---|
 | 766 | ######################################################################
 | 
|---|
 | 767 | 
 | 
|---|
 | 768 | # Test the interpreter (twice, once without .pyc files, once with)
 | 
|---|
 | 769 | # In the past, we've had problems where bugs in the marshalling or
 | 
|---|
 | 770 | # elsewhere caused bytecode read from .pyc files to behave differently
 | 
|---|
 | 771 | # than bytecode generated directly from a .py source file.  Sometimes
 | 
|---|
| [391] | 772 | # the bytecode read from a .pyc file had the bug, sometimes the directly
 | 
|---|
| [2] | 773 | # generated bytecode.  This is sometimes a very shy bug needing a lot of
 | 
|---|
 | 774 | # sample data.
 | 
|---|
 | 775 | 
 | 
|---|
 | 776 | TESTOPTS=       -l $(EXTRATESTOPTS)
 | 
|---|
 | 777 | TESTPROG=       $(srcdir)/Lib/test/regrtest.py
 | 
|---|
| [391] | 778 | TESTPYTHON=     $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
 | 
|---|
| [2] | 779 | test:           all platform
 | 
|---|
 | 780 |                 -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
 | 
|---|
 | 781 |                 -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
 | 
|---|
 | 782 |                 $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
 | 
|---|
 | 783 | 
 | 
|---|
 | 784 | testall:        all platform
 | 
|---|
 | 785 |                 -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
 | 
|---|
 | 786 |                 $(TESTPYTHON) $(srcdir)/Lib/compileall.py
 | 
|---|
 | 787 |                 -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
 | 
|---|
| [391] | 788 |                 -$(TESTPYTHON) $(TESTPROG) -uall $(TESTOPTS)
 | 
|---|
 | 789 |                 $(TESTPYTHON) $(TESTPROG) -uall $(TESTOPTS)
 | 
|---|
| [2] | 790 | 
 | 
|---|
 | 791 | #  Run the unitests for both architectures in a Universal build on OSX
 | 
|---|
 | 792 | #  Must be run on an Intel box.
 | 
|---|
 | 793 | testuniversal:  all platform
 | 
|---|
 | 794 |                 if [ `arch` != 'i386' ];then \
 | 
|---|
 | 795 |                         echo "This can only be used on OSX/i386" ;\
 | 
|---|
 | 796 |                         exit 1 ;\
 | 
|---|
 | 797 |                 fi
 | 
|---|
 | 798 |                 -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
 | 
|---|
| [391] | 799 |                 -$(TESTPYTHON) $(TESTPROG) -uall $(TESTOPTS)
 | 
|---|
 | 800 |                 $(TESTPYTHON) $(TESTPROG) -uall $(TESTOPTS)
 | 
|---|
 | 801 |                 $(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E -tt $(TESTPROG) -uall $(TESTOPTS)
 | 
|---|
| [2] | 802 | 
 | 
|---|
 | 803 | 
 | 
|---|
 | 804 | # Like testall, but with a single pass only
 | 
|---|
 | 805 | # run an optional script to include some information about the build environment
 | 
|---|
 | 806 | buildbottest:   all platform
 | 
|---|
 | 807 |                 -@if which pybuildbot.identify >/dev/null 2>&1; then \
 | 
|---|
 | 808 |                         pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
 | 
|---|
 | 809 |                 fi
 | 
|---|
| [391] | 810 |                 $(TESTPYTHON) -R $(TESTPROG) -uall -rwW $(TESTOPTS)
 | 
|---|
| [2] | 811 | 
 | 
|---|
| [391] | 812 | QUICKTESTOPTS=  $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
 | 
|---|
 | 813 |                 test_multibytecodec test_urllib2_localnet test_itertools \
 | 
|---|
 | 814 |                 test_multiprocessing test_mailbox test_socket test_poll \
 | 
|---|
 | 815 |                 test_select test_zipfile
 | 
|---|
| [2] | 816 | quicktest:      all platform
 | 
|---|
 | 817 |                 -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
 | 
|---|
 | 818 |                 -$(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
 | 
|---|
 | 819 |                 $(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
 | 
|---|
 | 820 | 
 | 
|---|
 | 821 | MEMTESTOPTS=    $(QUICKTESTOPTS) -x test_dl test___all__ test_fork1 \
 | 
|---|
 | 822 |                 test_longexp
 | 
|---|
 | 823 | memtest:        all platform
 | 
|---|
 | 824 |                 -rm -f $(srcdir)/Lib/test/*.py[co]
 | 
|---|
 | 825 |                 -$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
 | 
|---|
 | 826 |                 $(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
 | 
|---|
 | 827 | 
 | 
|---|
 | 828 | # Install everything
 | 
|---|
 | 829 | install:        @FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall @FRAMEWORKINSTALLLAST@
 | 
|---|
 | 830 | 
 | 
|---|
 | 831 | # Install almost everything without disturbing previous versions
 | 
|---|
| [391] | 832 | altinstall:     @FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall \
 | 
|---|
 | 833 |                                 libainstall altmaninstall \
 | 
|---|
| [2] | 834 |                 sharedinstall oldsharedinstall @FRAMEWORKALTINSTALLLAST@
 | 
|---|
 | 835 | 
 | 
|---|
 | 836 | # Install shared libraries enabled by Setup
 | 
|---|
 | 837 | DESTDIRS=       $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
 | 
|---|
 | 838 | 
 | 
|---|
 | 839 | oldsharedinstall: $(DESTSHARED) $(SHAREDMODS)
 | 
|---|
 | 840 |                 @for i in X $(SHAREDMODS); do \
 | 
|---|
 | 841 |                   if test $$i != X; then \
 | 
|---|
 | 842 |                     echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
 | 
|---|
 | 843 |                     $(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/`basename $$i`; \
 | 
|---|
 | 844 |                   fi; \
 | 
|---|
 | 845 |                 done
 | 
|---|
 | 846 | 
 | 
|---|
 | 847 | $(DESTSHARED):
 | 
|---|
 | 848 |                 @for i in $(DESTDIRS); \
 | 
|---|
 | 849 |                 do \
 | 
|---|
 | 850 |                         if test ! -d $(DESTDIR)$$i; then \
 | 
|---|
 | 851 |                                 echo "Creating directory $$i"; \
 | 
|---|
 | 852 |                                 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
 | 
|---|
 | 853 |                         else    true; \
 | 
|---|
 | 854 |                         fi; \
 | 
|---|
 | 855 |                 done
 | 
|---|
 | 856 | 
 | 
|---|
 | 857 | 
 | 
|---|
| [391] | 858 | # Install the interpreter by creating a symlink chain:
 | 
|---|
 | 859 | #  $(PYTHON) -> python2 -> python$(VERSION))
 | 
|---|
 | 860 | # Also create equivalent chains for other installed files
 | 
|---|
| [2] | 861 | bininstall:     altbininstall
 | 
|---|
 | 862 |         -if test -f $(DESTDIR)$(BINDIR)/$(PYTHON) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON); \
 | 
|---|
 | 863 |         then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
 | 
|---|
 | 864 |         else true; \
 | 
|---|
 | 865 |         fi
 | 
|---|
| [391] | 866 |         (cd $(DESTDIR)$(BINDIR); $(LN) -s python2$(EXE) $(PYTHON))
 | 
|---|
 | 867 |         -rm -f $(DESTDIR)$(BINDIR)/python2$(EXE)
 | 
|---|
 | 868 |         (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) python2$(EXE))
 | 
|---|
 | 869 |         -rm -f $(DESTDIR)$(BINDIR)/python2-config
 | 
|---|
 | 870 |         (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python2-config)
 | 
|---|
| [2] | 871 |         -rm -f $(DESTDIR)$(BINDIR)/python-config
 | 
|---|
| [391] | 872 |         (cd $(DESTDIR)$(BINDIR); $(LN) -s python2-config python-config)
 | 
|---|
 | 873 |         -test -d $(DESTDIR)$(LIBPC) || $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC)
 | 
|---|
 | 874 |         -rm -f $(DESTDIR)$(LIBPC)/python2.pc
 | 
|---|
 | 875 |         (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python2.pc)
 | 
|---|
 | 876 |         -rm -f $(DESTDIR)$(LIBPC)/python.pc
 | 
|---|
 | 877 |         (cd $(DESTDIR)$(LIBPC); $(LN) -s python2.pc python.pc)
 | 
|---|
| [397] | 878 | ifneq ($(filter os2emx os2knix,$(MACHDEP)),) # bird-like hack!
 | 
|---|
| [10] | 879 |         rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
 | 
|---|
 | 880 |         $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/$(PYTHON); \
 | 
|---|
| [401] | 881 |         $(INSTALL_DATA) $(LDLIBRARY) $(DLLLIBRARY) $(DESTDIR)$(LIBDIR)
 | 
|---|
| [397] | 882 | endif
 | 
|---|
| [2] | 883 | 
 | 
|---|
 | 884 | # Install the interpreter with $(VERSION) affixed
 | 
|---|
 | 885 | # This goes into $(exec_prefix)
 | 
|---|
 | 886 | altbininstall:  $(BUILDPYTHON)
 | 
|---|
 | 887 |         @for i in $(BINDIR) $(LIBDIR); \
 | 
|---|
 | 888 |         do \
 | 
|---|
 | 889 |                 if test ! -d $(DESTDIR)$$i; then \
 | 
|---|
 | 890 |                         echo "Creating directory $$i"; \
 | 
|---|
 | 891 |                         $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
 | 
|---|
 | 892 |                 else    true; \
 | 
|---|
 | 893 |                 fi; \
 | 
|---|
 | 894 |         done
 | 
|---|
 | 895 |         $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE)
 | 
|---|
 | 896 |         if test -f $(LDLIBRARY); then \
 | 
|---|
 | 897 |                 if test -n "$(DLLLIBRARY)" ; then \
 | 
|---|
 | 898 |                         $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \
 | 
|---|
 | 899 |                 else \
 | 
|---|
 | 900 |                         $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
 | 
|---|
 | 901 |                         if test $(LDLIBRARY) != $(INSTSONAME); then \
 | 
|---|
 | 902 |                                 (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) $(LDLIBRARY)) \
 | 
|---|
 | 903 |                         fi \
 | 
|---|
 | 904 |                 fi; \
 | 
|---|
 | 905 |         else    true; \
 | 
|---|
 | 906 |         fi
 | 
|---|
 | 907 | 
 | 
|---|
| [391] | 908 | # Install the versioned manual page
 | 
|---|
 | 909 | altmaninstall:
 | 
|---|
| [2] | 910 |         @for i in $(MANDIR) $(MANDIR)/man1; \
 | 
|---|
 | 911 |         do \
 | 
|---|
 | 912 |                 if test ! -d $(DESTDIR)$$i; then \
 | 
|---|
 | 913 |                         echo "Creating directory $$i"; \
 | 
|---|
 | 914 |                         $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
 | 
|---|
 | 915 |                 else    true; \
 | 
|---|
 | 916 |                 fi; \
 | 
|---|
 | 917 |         done
 | 
|---|
 | 918 |         $(INSTALL_DATA) $(srcdir)/Misc/python.man \
 | 
|---|
| [391] | 919 |                 $(DESTDIR)$(MANDIR)/man1/python$(VERSION).1
 | 
|---|
| [2] | 920 | 
 | 
|---|
| [391] | 921 | # Install the unversioned manual pages
 | 
|---|
 | 922 | maninstall:     altmaninstall
 | 
|---|
 | 923 |         -rm -f $(DESTDIR)$(MANDIR)/man1/python2.1
 | 
|---|
 | 924 |         (cd $(DESTDIR)$(MANDIR)/man1; $(LN) -s python$(VERSION).1 python2.1)
 | 
|---|
 | 925 |         -rm -f $(DESTDIR)$(MANDIR)/man1/python.1
 | 
|---|
 | 926 |         (cd $(DESTDIR)$(MANDIR)/man1; $(LN) -s python2.1 python.1)
 | 
|---|
 | 927 | 
 | 
|---|
| [2] | 928 | # Install the library
 | 
|---|
 | 929 | PLATDIR=        plat-$(MACHDEP)
 | 
|---|
 | 930 | EXTRAPLATDIR= @EXTRAPLATDIR@
 | 
|---|
 | 931 | EXTRAMACHDEPPATH=@EXTRAMACHDEPPATH@
 | 
|---|
 | 932 | MACHDEPS=       $(PLATDIR) $(EXTRAPLATDIR)
 | 
|---|
 | 933 | XMLLIBSUBDIRS=  xml xml/dom xml/etree xml/parsers xml/sax
 | 
|---|
 | 934 | PLATMACDIRS= plat-mac plat-mac/Carbon plat-mac/lib-scriptpackages \
 | 
|---|
 | 935 |         plat-mac/lib-scriptpackages/_builtinSuites \
 | 
|---|
 | 936 |         plat-mac/lib-scriptpackages/CodeWarrior \
 | 
|---|
 | 937 |         plat-mac/lib-scriptpackages/Explorer \
 | 
|---|
 | 938 |         plat-mac/lib-scriptpackages/Finder \
 | 
|---|
 | 939 |         plat-mac/lib-scriptpackages/Netscape \
 | 
|---|
 | 940 |         plat-mac/lib-scriptpackages/StdSuites \
 | 
|---|
 | 941 |         plat-mac/lib-scriptpackages/SystemEvents \
 | 
|---|
| [391] | 942 |         plat-mac/lib-scriptpackages/Terminal
 | 
|---|
| [2] | 943 | PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
 | 
|---|
| [391] | 944 | LIBSUBDIRS=     lib-tk lib-tk/test lib-tk/test/test_tkinter \
 | 
|---|
 | 945 |                 lib-tk/test/test_ttk site-packages test test/audiodata test/data \
 | 
|---|
 | 946 |                 test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
 | 
|---|
 | 947 |                 test/tracedmodules \
 | 
|---|
| [2] | 948 |                 encodings compiler hotshot \
 | 
|---|
 | 949 |                 email email/mime email/test email/test/data \
 | 
|---|
 | 950 |                 json json/tests \
 | 
|---|
 | 951 |                 sqlite3 sqlite3/test \
 | 
|---|
| [391] | 952 |                 logging bsddb bsddb/test csv importlib wsgiref \
 | 
|---|
| [2] | 953 |                 lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \
 | 
|---|
| [391] | 954 |                 lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
 | 
|---|
| [2] | 955 |                 ctypes ctypes/test ctypes/macholib idlelib idlelib/Icons \
 | 
|---|
 | 956 |                 distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
 | 
|---|
 | 957 |                 multiprocessing multiprocessing/dummy \
 | 
|---|
| [391] | 958 |                 unittest unittest/test \
 | 
|---|
| [2] | 959 |                 lib-old \
 | 
|---|
| [391] | 960 |                 curses pydoc_data $(MACHDEPS)
 | 
|---|
 | 961 | libinstall:     build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
 | 
|---|
| [2] | 962 |         @for i in $(SCRIPTDIR) $(LIBDEST); \
 | 
|---|
 | 963 |         do \
 | 
|---|
 | 964 |                 if test ! -d $(DESTDIR)$$i; then \
 | 
|---|
 | 965 |                         echo "Creating directory $$i"; \
 | 
|---|
 | 966 |                         $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
 | 
|---|
 | 967 |                 else    true; \
 | 
|---|
 | 968 |                 fi; \
 | 
|---|
 | 969 |         done
 | 
|---|
 | 970 |         @for d in $(LIBSUBDIRS); \
 | 
|---|
 | 971 |         do \
 | 
|---|
 | 972 |                 a=$(srcdir)/Lib/$$d; \
 | 
|---|
 | 973 |                 if test ! -d $$a; then continue; else true; fi; \
 | 
|---|
 | 974 |                 b=$(LIBDEST)/$$d; \
 | 
|---|
 | 975 |                 if test ! -d $(DESTDIR)$$b; then \
 | 
|---|
 | 976 |                         echo "Creating directory $$b"; \
 | 
|---|
 | 977 |                         $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \
 | 
|---|
 | 978 |                 else    true; \
 | 
|---|
 | 979 |                 fi; \
 | 
|---|
 | 980 |         done
 | 
|---|
| [391] | 981 |         @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \
 | 
|---|
| [2] | 982 |         do \
 | 
|---|
 | 983 |                 if test -x $$i; then \
 | 
|---|
 | 984 |                         $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
 | 
|---|
 | 985 |                         echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \
 | 
|---|
 | 986 |                 else \
 | 
|---|
 | 987 |                         $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
 | 
|---|
 | 988 |                         echo $(INSTALL_DATA) $$i $(LIBDEST); \
 | 
|---|
 | 989 |                 fi; \
 | 
|---|
 | 990 |         done
 | 
|---|
 | 991 |         @for d in $(LIBSUBDIRS); \
 | 
|---|
 | 992 |         do \
 | 
|---|
 | 993 |                 a=$(srcdir)/Lib/$$d; \
 | 
|---|
 | 994 |                 if test ! -d $$a; then continue; else true; fi; \
 | 
|---|
 | 995 |                 if test `ls $$a | wc -l` -lt 1; then continue; fi; \
 | 
|---|
 | 996 |                 b=$(LIBDEST)/$$d; \
 | 
|---|
 | 997 |                 for i in $$a/*; \
 | 
|---|
 | 998 |                 do \
 | 
|---|
 | 999 |                         case $$i in \
 | 
|---|
 | 1000 |                         *CVS) ;; \
 | 
|---|
 | 1001 |                         *.py[co]) ;; \
 | 
|---|
 | 1002 |                         *.orig) ;; \
 | 
|---|
 | 1003 |                         *~) ;; \
 | 
|---|
 | 1004 |                         *) \
 | 
|---|
 | 1005 |                                 if test -d $$i; then continue; fi; \
 | 
|---|
 | 1006 |                                 if test -x $$i; then \
 | 
|---|
 | 1007 |                                     echo $(INSTALL_SCRIPT) $$i $$b; \
 | 
|---|
 | 1008 |                                     $(INSTALL_SCRIPT) $$i $(DESTDIR)$$b; \
 | 
|---|
 | 1009 |                                 else \
 | 
|---|
 | 1010 |                                     echo $(INSTALL_DATA) $$i $$b; \
 | 
|---|
 | 1011 |                                     $(INSTALL_DATA) $$i $(DESTDIR)$$b; \
 | 
|---|
 | 1012 |                                 fi;; \
 | 
|---|
 | 1013 |                         esac; \
 | 
|---|
 | 1014 |                 done; \
 | 
|---|
 | 1015 |         done
 | 
|---|
 | 1016 |         $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
 | 
|---|
| [391] | 1017 |         if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
 | 
|---|
 | 1018 |                 $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
 | 
|---|
 | 1019 |                         $(DESTDIR)$(LIBDEST)/distutils/tests ; \
 | 
|---|
 | 1020 |         fi
 | 
|---|
| [2] | 1021 |         PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
 | 
|---|
| [391] | 1022 |                 $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
 | 
|---|
| [2] | 1023 |                 -d $(LIBDEST) -f \
 | 
|---|
| [391] | 1024 |                 -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
 | 
|---|
 | 1025 |                 $(DESTDIR)$(LIBDEST)
 | 
|---|
| [2] | 1026 |         PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
 | 
|---|
| [391] | 1027 |                 $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
 | 
|---|
| [2] | 1028 |                 -d $(LIBDEST) -f \
 | 
|---|
| [391] | 1029 |                 -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
 | 
|---|
 | 1030 |                 $(DESTDIR)$(LIBDEST)
 | 
|---|
| [2] | 1031 |         -PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
 | 
|---|
| [391] | 1032 |                 $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
 | 
|---|
| [2] | 1033 |                 -d $(LIBDEST)/site-packages -f \
 | 
|---|
 | 1034 |                 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
 | 
|---|
 | 1035 |         -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
 | 
|---|
| [391] | 1036 |                 $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
 | 
|---|
| [2] | 1037 |                 -d $(LIBDEST)/site-packages -f \
 | 
|---|
 | 1038 |                 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
 | 
|---|
 | 1039 |         -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
 | 
|---|
| [391] | 1040 |                 $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
 | 
|---|
 | 1041 |         -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
 | 
|---|
 | 1042 |                 $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
 | 
|---|
| [2] | 1043 | 
 | 
|---|
| [10] | 1044 | ifneq ($(filter os2emx os2knix,$(MACHDEP)),) # bird hack!
 | 
|---|
 | 1045 | PATH_SEPARATOR = ;
 | 
|---|
 | 1046 | else
 | 
|---|
 | 1047 | PATH_SEPARATOR = :
 | 
|---|
 | 1048 | endif
 | 
|---|
 | 1049 |                                  
 | 
|---|
| [2] | 1050 | # Create the PLATDIR source directory, if one wasn't distributed..
 | 
|---|
 | 1051 | $(srcdir)/Lib/$(PLATDIR):
 | 
|---|
 | 1052 |         mkdir $(srcdir)/Lib/$(PLATDIR)
 | 
|---|
 | 1053 |         cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
 | 
|---|
| [10] | 1054 |         export PATH; PATH="`pwd`$(PATH_SEPARATOR)$$PATH"; \
 | 
|---|
| [391] | 1055 |         export PYTHONPATH; PYTHONPATH="$(srcdir)/Lib:$(abs_builddir)/`cat pybuilddir.txt`"; \
 | 
|---|
| [2] | 1056 |         export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
 | 
|---|
 | 1057 |         export EXE; EXE="$(BUILDEXE)"; \
 | 
|---|
| [391] | 1058 |         if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
 | 
|---|
 | 1059 |         export PYTHON_FOR_BUILD; \
 | 
|---|
 | 1060 |         if [ "$(build)" = "$(host)" ]; then \
 | 
|---|
 | 1061 |           PYTHON_FOR_BUILD="$(BUILDPYTHON)"; \
 | 
|---|
 | 1062 |         else \
 | 
|---|
 | 1063 |           PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \
 | 
|---|
 | 1064 |         fi; \
 | 
|---|
| [2] | 1065 |         cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
 | 
|---|
 | 1066 | 
 | 
|---|
| [391] | 1067 | python-config: $(srcdir)/Misc/python-config.in
 | 
|---|
 | 1068 |         # Substitution happens here, as the completely-expanded BINDIR
 | 
|---|
 | 1069 |         # is not available in configure
 | 
|---|
 | 1070 |         sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
 | 
|---|
 | 1071 | 
 | 
|---|
| [2] | 1072 | # Install the include files
 | 
|---|
 | 1073 | INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
 | 
|---|
 | 1074 | inclinstall:
 | 
|---|
 | 1075 |         @for i in $(INCLDIRSTOMAKE); \
 | 
|---|
 | 1076 |         do \
 | 
|---|
 | 1077 |                 if test ! -d $(DESTDIR)$$i; then \
 | 
|---|
 | 1078 |                         echo "Creating directory $$i"; \
 | 
|---|
 | 1079 |                         $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
 | 
|---|
 | 1080 |                 else    true; \
 | 
|---|
 | 1081 |                 fi; \
 | 
|---|
 | 1082 |         done
 | 
|---|
 | 1083 |         @for i in $(srcdir)/Include/*.h; \
 | 
|---|
 | 1084 |         do \
 | 
|---|
 | 1085 |                 echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
 | 
|---|
 | 1086 |                 $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
 | 
|---|
 | 1087 |         done
 | 
|---|
 | 1088 |         $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
 | 
|---|
 | 1089 | 
 | 
|---|
 | 1090 | # Install the library and miscellaneous stuff needed for extending/embedding
 | 
|---|
 | 1091 | # This goes into $(exec_prefix)
 | 
|---|
 | 1092 | LIBPL=          $(LIBP)/config
 | 
|---|
| [391] | 1093 | 
 | 
|---|
 | 1094 | # pkgconfig directory
 | 
|---|
 | 1095 | LIBPC=          $(LIBDIR)/pkgconfig
 | 
|---|
 | 1096 | 
 | 
|---|
 | 1097 | libainstall:    all python-config
 | 
|---|
 | 1098 |         @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
 | 
|---|
| [2] | 1099 |         do \
 | 
|---|
 | 1100 |                 if test ! -d $(DESTDIR)$$i; then \
 | 
|---|
 | 1101 |                         echo "Creating directory $$i"; \
 | 
|---|
 | 1102 |                         $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
 | 
|---|
 | 1103 |                 else    true; \
 | 
|---|
 | 1104 |                 fi; \
 | 
|---|
 | 1105 |         done
 | 
|---|
 | 1106 |         @if test -d $(LIBRARY); then :; else \
 | 
|---|
 | 1107 |                 if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
 | 
|---|
 | 1108 |                         if test "$(SO)" = .dll; then \
 | 
|---|
 | 1109 |                                 $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
 | 
|---|
 | 1110 |                         else \
 | 
|---|
 | 1111 |                                 $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
 | 
|---|
 | 1112 |                                 $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
 | 
|---|
 | 1113 |                         fi; \
 | 
|---|
 | 1114 |                 else \
 | 
|---|
 | 1115 |                         echo Skip install of $(LIBRARY) - use make frameworkinstall; \
 | 
|---|
 | 1116 |                 fi; \
 | 
|---|
 | 1117 |         fi
 | 
|---|
 | 1118 |         $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
 | 
|---|
 | 1119 |         $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
 | 
|---|
 | 1120 |         $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
 | 
|---|
 | 1121 |         $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
 | 
|---|
 | 1122 |         $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
 | 
|---|
 | 1123 |         $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
 | 
|---|
 | 1124 |         $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
 | 
|---|
| [391] | 1125 |         $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
 | 
|---|
| [2] | 1126 |         $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
 | 
|---|
 | 1127 |         $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
 | 
|---|
 | 1128 |         $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config
 | 
|---|
 | 1129 |         rm python-config
 | 
|---|
 | 1130 |         @if [ -s Modules/python.exp -a \
 | 
|---|
 | 1131 |                 "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
 | 
|---|
 | 1132 |                 echo; echo "Installing support files for building shared extension modules on AIX:"; \
 | 
|---|
 | 1133 |                 $(INSTALL_DATA) Modules/python.exp              \
 | 
|---|
 | 1134 |                                 $(DESTDIR)$(LIBPL)/python.exp;          \
 | 
|---|
 | 1135 |                 echo; echo "$(LIBPL)/python.exp";               \
 | 
|---|
 | 1136 |                 $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix  \
 | 
|---|
 | 1137 |                                 $(DESTDIR)$(LIBPL)/makexp_aix;          \
 | 
|---|
 | 1138 |                 echo "$(LIBPL)/makexp_aix";                     \
 | 
|---|
 | 1139 |                 $(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix   \
 | 
|---|
 | 1140 |                                 $(DESTDIR)$(LIBPL)/ld_so_aix;           \
 | 
|---|
 | 1141 |                 echo "$(LIBPL)/ld_so_aix";                      \
 | 
|---|
 | 1142 |                 echo; echo "See Misc/AIX-NOTES for details.";   \
 | 
|---|
 | 1143 |         else true; \
 | 
|---|
 | 1144 |         fi
 | 
|---|
 | 1145 |         @case "$(MACHDEP)" in beos*) \
 | 
|---|
 | 1146 |                 echo; echo "Installing support files for building shared extension modules on BeOS:"; \
 | 
|---|
 | 1147 |                 $(INSTALL_DATA) Misc/BeOS-NOTES $(DESTDIR)$(LIBPL)/README;      \
 | 
|---|
 | 1148 |                 echo; echo "$(LIBPL)/README";                   \
 | 
|---|
 | 1149 |                 $(INSTALL_SCRIPT) Modules/ar_beos $(DESTDIR)$(LIBPL)/ar_beos; \
 | 
|---|
 | 1150 |                 echo "$(LIBPL)/ar_beos";                        \
 | 
|---|
 | 1151 |                 $(INSTALL_SCRIPT) Modules/ld_so_beos $(DESTDIR)$(LIBPL)/ld_so_beos; \
 | 
|---|
 | 1152 |                 echo "$(LIBPL)/ld_so_beos";                     \
 | 
|---|
 | 1153 |                 echo; echo "See Misc/BeOS-NOTES for details.";  \
 | 
|---|
 | 1154 |                 ;; \
 | 
|---|
 | 1155 |         esac
 | 
|---|
 | 1156 | 
 | 
|---|
 | 1157 | # Install the dynamically loadable modules
 | 
|---|
 | 1158 | # This goes into $(exec_prefix)
 | 
|---|
| [391] | 1159 | sharedinstall: sharedmods
 | 
|---|
 | 1160 |         $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
 | 
|---|
| [2] | 1161 |                 --prefix=$(prefix) \
 | 
|---|
 | 1162 |                 --install-scripts=$(BINDIR) \
 | 
|---|
 | 1163 |                 --install-platlib=$(DESTSHARED) \
 | 
|---|
| [391] | 1164 |                 --root=$(DESTDIR)/
 | 
|---|
 | 1165 |         -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py*
 | 
|---|
| [2] | 1166 | 
 | 
|---|
 | 1167 | # Here are a couple of targets for MacOSX again, to install a full
 | 
|---|
 | 1168 | # framework-based Python. frameworkinstall installs everything, the
 | 
|---|
 | 1169 | # subtargets install specific parts. Much of the actual work is offloaded to
 | 
|---|
 | 1170 | # the Makefile in Mac
 | 
|---|
 | 1171 | #
 | 
|---|
 | 1172 | #
 | 
|---|
 | 1173 | # This target is here for backward compatiblity, previous versions of Python
 | 
|---|
 | 1174 | # hadn't integrated framework installation in the normal install process.
 | 
|---|
 | 1175 | frameworkinstall: install
 | 
|---|
 | 1176 | 
 | 
|---|
 | 1177 | # On install, we re-make the framework
 | 
|---|
 | 1178 | # structure in the install location, /Library/Frameworks/ or the argument to
 | 
|---|
 | 1179 | # --enable-framework. If --enable-framework has been specified then we have
 | 
|---|
 | 1180 | # automatically set prefix to the location deep down in the framework, so we
 | 
|---|
 | 1181 | # only have to cater for the structural bits of the framework.
 | 
|---|
 | 1182 | 
 | 
|---|
 | 1183 | frameworkinstallframework: frameworkinstallstructure install frameworkinstallmaclib
 | 
|---|
 | 1184 | 
 | 
|---|
 | 1185 | frameworkinstallstructure:      $(LDLIBRARY)
 | 
|---|
 | 1186 |         @if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
 | 
|---|
 | 1187 |                 echo Not configured with --enable-framework; \
 | 
|---|
 | 1188 |                 exit 1; \
 | 
|---|
 | 1189 |         else true; \
 | 
|---|
 | 1190 |         fi
 | 
|---|
 | 1191 |         @for i in $(prefix)/Resources/English.lproj $(prefix)/lib; do\
 | 
|---|
 | 1192 |                 if test ! -d $(DESTDIR)$$i; then \
 | 
|---|
 | 1193 |                         echo "Creating directory $(DESTDIR)$$i"; \
 | 
|---|
 | 1194 |                         $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
 | 
|---|
 | 1195 |                 else    true; \
 | 
|---|
 | 1196 |                 fi; \
 | 
|---|
 | 1197 |         done
 | 
|---|
 | 1198 |         $(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
 | 
|---|
 | 1199 |         sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
 | 
|---|
 | 1200 |         $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
 | 
|---|
 | 1201 |         $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
 | 
|---|
 | 1202 |         $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
 | 
|---|
 | 1203 |         $(LN) -fsn Versions/Current/Resources $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Resources
 | 
|---|
 | 1204 |         $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(PYTHONFRAMEWORKPREFIX)/$(LDLIBRARY)
 | 
|---|
 | 1205 | 
 | 
|---|
 | 1206 | # This installs Mac/Lib into the framework
 | 
|---|
 | 1207 | # Install a number of symlinks to keep software that expects a normal unix
 | 
|---|
 | 1208 | # install (which includes python-config) happy.
 | 
|---|
 | 1209 | frameworkinstallmaclib:
 | 
|---|
 | 1210 |         ln -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/python$(VERSION)/config/libpython$(VERSION).a"
 | 
|---|
 | 1211 |         ln -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/python$(VERSION)/config/libpython$(VERSION).dylib"
 | 
|---|
| [391] | 1212 |         ln -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(VERSION).dylib"
 | 
|---|
| [2] | 1213 |         cd Mac && $(MAKE) installmacsubtree DESTDIR="$(DESTDIR)"
 | 
|---|
 | 1214 | 
 | 
|---|
 | 1215 | # This installs the IDE, the Launcher and other apps into /Applications
 | 
|---|
 | 1216 | frameworkinstallapps:
 | 
|---|
 | 1217 |         cd Mac && $(MAKE) installapps DESTDIR="$(DESTDIR)"
 | 
|---|
 | 1218 | 
 | 
|---|
 | 1219 | # This install the unix python and pythonw tools in /usr/local/bin
 | 
|---|
 | 1220 | frameworkinstallunixtools:
 | 
|---|
 | 1221 |         cd Mac && $(MAKE) installunixtools DESTDIR="$(DESTDIR)"
 | 
|---|
 | 1222 | 
 | 
|---|
 | 1223 | frameworkaltinstallunixtools:
 | 
|---|
 | 1224 |         cd Mac && $(MAKE) altinstallunixtools DESTDIR="$(DESTDIR)"
 | 
|---|
 | 1225 | 
 | 
|---|
 | 1226 | # This installs the Demos and Tools into the applications directory.
 | 
|---|
 | 1227 | # It is not part of a normal frameworkinstall
 | 
|---|
 | 1228 | frameworkinstallextras:
 | 
|---|
 | 1229 |         cd Mac && $(MAKE) installextras DESTDIR="$(DESTDIR)"
 | 
|---|
 | 1230 | 
 | 
|---|
 | 1231 | # This installs a few of the useful scripts in Tools/scripts
 | 
|---|
 | 1232 | scriptsinstall:
 | 
|---|
 | 1233 |         SRCDIR=$(srcdir) $(RUNSHARED) \
 | 
|---|
| [391] | 1234 |         $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/setup.py install \
 | 
|---|
| [2] | 1235 |         --prefix=$(prefix) \
 | 
|---|
 | 1236 |         --install-scripts=$(BINDIR) \
 | 
|---|
| [391] | 1237 |         --root=$(DESTDIR)/
 | 
|---|
| [2] | 1238 | 
 | 
|---|
 | 1239 | # Build the toplevel Makefile
 | 
|---|
 | 1240 | Makefile.pre: Makefile.pre.in config.status
 | 
|---|
 | 1241 |         CONFIG_FILES=Makefile.pre CONFIG_HEADERS= $(SHELL) config.status
 | 
|---|
 | 1242 |         $(MAKE) -f Makefile.pre Makefile
 | 
|---|
 | 1243 | 
 | 
|---|
 | 1244 | # Run the configure script.
 | 
|---|
 | 1245 | config.status:  $(srcdir)/configure
 | 
|---|
 | 1246 |         $(SHELL) $(srcdir)/configure $(CONFIG_ARGS)
 | 
|---|
 | 1247 | 
 | 
|---|
 | 1248 | .PRECIOUS: config.status $(BUILDPYTHON) Makefile Makefile.pre
 | 
|---|
 | 1249 | 
 | 
|---|
 | 1250 | # Some make's put the object file in the current directory
 | 
|---|
 | 1251 | .c.o:
 | 
|---|
 | 1252 |         $(CC) -c $(PY_CFLAGS) -o $@ $<
 | 
|---|
 | 1253 | 
 | 
|---|
 | 1254 | # Run reindent on the library
 | 
|---|
 | 1255 | reindent:
 | 
|---|
 | 1256 |         ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
 | 
|---|
 | 1257 | 
 | 
|---|
 | 1258 | # Rerun configure with the same options as it was run last time,
 | 
|---|
 | 1259 | # provided the config.status script exists
 | 
|---|
 | 1260 | recheck:
 | 
|---|
 | 1261 |         $(SHELL) config.status --recheck
 | 
|---|
 | 1262 |         $(SHELL) config.status
 | 
|---|
 | 1263 | 
 | 
|---|
| [391] | 1264 | # Rebuild the configure script from configure.ac; also rebuild pyconfig.h.in
 | 
|---|
| [2] | 1265 | autoconf:
 | 
|---|
 | 1266 |         (cd $(srcdir); autoconf)
 | 
|---|
 | 1267 |         (cd $(srcdir); autoheader)
 | 
|---|
 | 1268 | 
 | 
|---|
 | 1269 | # Create a tags file for vi
 | 
|---|
 | 1270 | tags::
 | 
|---|
 | 1271 |         cd $(srcdir); \
 | 
|---|
 | 1272 |         ctags -w -t Include/*.h; \
 | 
|---|
 | 1273 |         for i in $(SRCDIRS); do ctags -w -t -a $$i/*.[ch]; \
 | 
|---|
 | 1274 |         done; \
 | 
|---|
 | 1275 |         sort -o tags tags
 | 
|---|
 | 1276 | 
 | 
|---|
 | 1277 | # Create a tags file for GNU Emacs
 | 
|---|
 | 1278 | TAGS::
 | 
|---|
 | 1279 |         cd $(srcdir); \
 | 
|---|
 | 1280 |         etags Include/*.h; \
 | 
|---|
 | 1281 |         for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done
 | 
|---|
 | 1282 | 
 | 
|---|
| [391] | 1283 | # Touch generated files
 | 
|---|
 | 1284 | touch:
 | 
|---|
 | 1285 |         touch Include/Python-ast.h Python/Python-ast.c
 | 
|---|
 | 1286 | 
 | 
|---|
| [2] | 1287 | # Sanitation targets -- clean leaves libraries, executables and tags
 | 
|---|
 | 1288 | # files, which clobber removes as well
 | 
|---|
 | 1289 | pycremoval:
 | 
|---|
 | 1290 |         find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
 | 
|---|
 | 1291 | 
 | 
|---|
 | 1292 | clean: pycremoval
 | 
|---|
| [391] | 1293 |         find . -name '*.[oa]' -exec rm -f {} ';'
 | 
|---|
| [2] | 1294 |         find . -name '*.s[ol]' -exec rm -f {} ';'
 | 
|---|
| [391] | 1295 |         find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
 | 
|---|
 | 1296 |         find build -name 'fficonfig.h' -exec rm -f {} ';' || true
 | 
|---|
 | 1297 |         find build -name 'fficonfig.py' -exec rm -f {} ';' || true
 | 
|---|
| [2] | 1298 |         -rm -f Lib/lib2to3/*Grammar*.pickle
 | 
|---|
 | 1299 | 
 | 
|---|
 | 1300 | profile-removal:
 | 
|---|
 | 1301 |         find . -name '*.gc??' -exec rm -f {} ';'
 | 
|---|
 | 1302 | 
 | 
|---|
 | 1303 | clobber: clean profile-removal
 | 
|---|
 | 1304 |         -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
 | 
|---|
 | 1305 |                 tags TAGS \
 | 
|---|
 | 1306 |                 config.cache config.log pyconfig.h Modules/config.c
 | 
|---|
 | 1307 |         -rm -rf build platform
 | 
|---|
 | 1308 |         -rm -rf $(PYTHONFRAMEWORKDIR)
 | 
|---|
 | 1309 | 
 | 
|---|
 | 1310 | # Make things extra clean, before making a distribution:
 | 
|---|
 | 1311 | # remove all generated files, even Makefile[.pre]
 | 
|---|
 | 1312 | # Keep configure and Python-ast.[ch], it's possible they can't be generated
 | 
|---|
 | 1313 | distclean: clobber
 | 
|---|
| [391] | 1314 |         for file in Lib/test/data/* ; do \
 | 
|---|
 | 1315 |             if test "$$file" != "Lib/test/data/README"; then rm "$$file"; fi; \
 | 
|---|
 | 1316 |         done
 | 
|---|
| [2] | 1317 |         -rm -f core Makefile Makefile.pre config.status \
 | 
|---|
| [391] | 1318 |                 Modules/Setup Modules/Setup.local Modules/Setup.config \
 | 
|---|
 | 1319 |                 Modules/ld_so_aix Modules/python.exp Misc/python.pc
 | 
|---|
 | 1320 |         -rm -f python*-gdb.py
 | 
|---|
 | 1321 |         -rm -f pybuilddir.txt
 | 
|---|
 | 1322 |         find $(srcdir)/[a-zA-Z]* '(' -name '*.fdc' -o -name '*~' \
 | 
|---|
 | 1323 |                                      -o -name '[@,#]*' -o -name '*.old' \
 | 
|---|
 | 1324 |                                      -o -name '*.orig' -o -name '*.rej' \
 | 
|---|
 | 1325 |                                      -o -name '*.bak' ')' \
 | 
|---|
 | 1326 |                                      -exec rm -f {} ';'
 | 
|---|
| [2] | 1327 | 
 | 
|---|
 | 1328 | # Check for smelly exported symbols (not starting with Py/_Py)
 | 
|---|
 | 1329 | smelly: all
 | 
|---|
 | 1330 |         nm -p $(LIBRARY) | \
 | 
|---|
 | 1331 |                 sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
 | 
|---|
 | 1332 | 
 | 
|---|
 | 1333 | # Find files with funny names
 | 
|---|
 | 1334 | funny:
 | 
|---|
| [391] | 1335 |         find $(SUBDIRS) $(SUBDIRSTOO) -type d \
 | 
|---|
| [2] | 1336 |                 -o -name '*.[chs]' \
 | 
|---|
 | 1337 |                 -o -name '*.py' \
 | 
|---|
 | 1338 |                 -o -name '*.doc' \
 | 
|---|
 | 1339 |                 -o -name '*.sty' \
 | 
|---|
 | 1340 |                 -o -name '*.bib' \
 | 
|---|
 | 1341 |                 -o -name '*.dat' \
 | 
|---|
 | 1342 |                 -o -name '*.el' \
 | 
|---|
 | 1343 |                 -o -name '*.fd' \
 | 
|---|
 | 1344 |                 -o -name '*.in' \
 | 
|---|
 | 1345 |                 -o -name '*.tex' \
 | 
|---|
 | 1346 |                 -o -name '*,[vpt]' \
 | 
|---|
 | 1347 |                 -o -name 'Setup' \
 | 
|---|
 | 1348 |                 -o -name 'Setup.*' \
 | 
|---|
 | 1349 |                 -o -name README \
 | 
|---|
 | 1350 |                 -o -name Makefile \
 | 
|---|
 | 1351 |                 -o -name ChangeLog \
 | 
|---|
 | 1352 |                 -o -name Repository \
 | 
|---|
 | 1353 |                 -o -name Root \
 | 
|---|
 | 1354 |                 -o -name Entries \
 | 
|---|
 | 1355 |                 -o -name Tag \
 | 
|---|
 | 1356 |                 -o -name tags \
 | 
|---|
 | 1357 |                 -o -name TAGS \
 | 
|---|
 | 1358 |                 -o -name .cvsignore \
 | 
|---|
 | 1359 |                 -o -name MANIFEST \
 | 
|---|
 | 1360 |                 -o -print
 | 
|---|
 | 1361 | 
 | 
|---|
 | 1362 | # Perform some verification checks on any modified files.
 | 
|---|
 | 1363 | patchcheck:
 | 
|---|
 | 1364 |         $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
 | 
|---|
 | 1365 | 
 | 
|---|
 | 1366 | # Dependencies
 | 
|---|
 | 1367 | 
 | 
|---|
 | 1368 | Python/thread.o: @THREADHEADERS@
 | 
|---|
 | 1369 | 
 | 
|---|
 | 1370 | # Declare targets that aren't real files
 | 
|---|
 | 1371 | .PHONY: all build_all sharedmods oldsharedmods test quicktest memtest
 | 
|---|
 | 1372 | .PHONY: install altinstall oldsharedinstall bininstall altbininstall
 | 
|---|
 | 1373 | .PHONY: maninstall libinstall inclinstall libainstall sharedinstall
 | 
|---|
 | 1374 | .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
 | 
|---|
 | 1375 | .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
 | 
|---|
| [391] | 1376 | .PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
 | 
|---|
 | 1377 | .PHONY: smelly funny patchcheck touch altmaninstall
 | 
|---|
 | 1378 | .PHONY: gdbhooks
 | 
|---|
| [2] | 1379 | 
 | 
|---|
 | 1380 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
 | 
|---|