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