Makefile.pre.in (2,209 lines of code) (raw):

# Top-level Makefile for Python # # As distributed, this file is called Makefile.pre.in; it is processed # into the real Makefile by running the script ./configure, which # replaces things like @spam@ with values appropriate for your system. # This means that if you edit Makefile, your changes get lost the next # time you run the configure script. Ideally, you can do: # # ./configure # make # make test # make install # # If you have a previous version of Python installed that you don't # want to overwrite, you can use "make altinstall" instead of "make # install". Refer to the "Installing" section in the README file for # additional details. # # See also the section "Build instructions" in the README file. # Unless the user provides something like VERBOSE=1, we try to print a single, # short line per target built, rather than the full command. ifndef VERBOSE V = @echo '>> $@'; # VPRE is used for non-terminal commands in recipes that should be printed # as-is in VERBOSE mode but never in normal (quiet) mode. VPRE = @ endif # === Variables set by makesetup === MODBUILT_NAMES= _MODBUILT_NAMES_ MODDISABLED_NAMES= _MODDISABLED_NAMES_ MODOBJS= _MODOBJS_ MODLIBS= _MODLIBS_ # === Variables set by configure VERSION= @VERSION@ srcdir= @srcdir@ VPATH= @srcdir@ abs_srcdir= @abs_srcdir@ abs_builddir= @abs_builddir@ CC= @CC@ CXX= @CXX@ LINKCC= @LINKCC@ AR= @AR@ RANLIB= ranlib READELF= @READELF@ SOABI= @SOABI@ FB_COMPAT_SOABI= @FB_COMPAT_SOABI@ USE_COMPAT_SOABI= @USE_COMPAT_SOABI@ LDVERSION= @LDVERSION@ LIBPYTHON= @LIBPYTHON@ GITVERSION= @GITVERSION@ GITTAG= @GITTAG@ GITBRANCH= @GITBRANCH@ PGO_PROF_GEN_FLAG=@PGO_PROF_GEN_FLAG@ PGO_PROF_USE_FLAG=@PGO_PROF_USE_FLAG@ LLVM_PROF_MERGER=@LLVM_PROF_MERGER@ LLVM_PROF_FILE=@LLVM_PROF_FILE@ LLVM_PROF_ERR=@LLVM_PROF_ERR@ DTRACE= @DTRACE@ DFLAGS= @DFLAGS@ CEVAL_DTRACE_HEADER=@CEVAL_DTRACE_HEADER@ GCMODULE_DTRACE_HEADER=@GCMODULE_DTRACE_HEADER@ IMPORT_DTRACE_HEADER=@IMPORT_DTRACE_HEADER@ GNULD= @GNULD@ # Shell used by make (some versions default to the login shell, which is bad) SHELL= /bin/sh # Use this to make a link between python$(VERSION) and python in $(BINDIR) LN= @LN@ # Portable install script (configure doesn't always guess right) INSTALL= @INSTALL@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ INSTALL_SCRIPT= @INSTALL_SCRIPT@ INSTALL_DATA= @INSTALL_DATA@ # Shared libraries must be installed with executable mode on some systems; # rather than figuring out exactly which, we always give them executable mode. INSTALL_SHARED= ${INSTALL} -m 755 MKDIR_P= @MKDIR_P@ MAKESETUP= $(srcdir)/Modules/makesetup # Compiler options OPT= @OPT@ OPTCXX= @OPTCXX@ BASECFLAGS= @BASECFLAGS@ BASECPPFLAGS= @BASECPPFLAGS@ BASECXXFLAGS= @BASECXXFLAGS@ CONFIGURE_CFLAGS= @CFLAGS@ CONFIGURE_CXXFLAGS= @CXXFLAGS@ # C{XX}FLAGS_NODIST is used for building the interpreter and stdlib C extensions. # Use it when a compiler flag should _not_ be part of the distutils CFLAGS # once Python is installed (Issue #21121). CONFIGURE_CFLAGS_NODIST=@CFLAGS_NODIST@ # LDFLAGS_NODIST is used in the same manner as CFLAGS_NODIST. # Use it when a linker flag should _not_ be part of the distutils LDFLAGS # once Python is installed (bpo-35257) CONFIGURE_LDFLAGS_NODIST=@LDFLAGS_NODIST@ CONFIGURE_CXXFLAGS_NODIST=@CXXFLAGS_NODIST@ CONFIGURE_CPPFLAGS= @CPPFLAGS@ CONFIGURE_LDFLAGS= @LDFLAGS@ # Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the # command line to append to these values without stomping the pre-set # values. PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include/internal PY_CXXFLAGS=$(BASECXXFLAGS) $(OPTCXX) $(CONFIGURE_CXXFLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS) PY_CXXFLAGS_NODIST=$(CONFIGURE_CXXFLAGS_NODIST) $(CXXFLAGS_NODIST) -I$(srcdir)/Include/internal # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to # be able to build extension modules using the directories specified in the # environment variables PY_CPPFLAGS= $(BASECPPFLAGS) -I. -I$(srcdir)/Include -I$(srcdir)/ThirdParty/fmt-6.1.1/include -I$(srcdir)/ThirdParty/i386-dis -I$(srcdir)/ThirdParty/json $(CONFIGURE_CPPFLAGS) $(CPPFLAGS) -DFMT_HEADER_ONLY=1 PY_LDFLAGS_NODIST=$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST) OS_NAME := $(shell uname -s) ifeq ($(OS_NAME), Darwin) LRT_FLAG= else LRT_FLAG=-lrt endif PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS) NO_AS_NEEDED= @NO_AS_NEEDED@ SGI_ABI= @SGI_ABI@ CCSHARED= @CCSHARED@ # LINKFORSHARED are the flags passed to the $(CC) command that links # the python executable -- this is only needed for a few systems LINKFORSHARED= @LINKFORSHARED@ ARFLAGS= @ARFLAGS@ # Extra C flags added for building the interpreter object files. CFLAGSFORSHARED=@CFLAGSFORSHARED@ # C flags used for building the interpreter object files PY_STDMODULE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) PY_BUILTIN_MODULE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE # C++ flags used for building the interpreter object files. # Based on configure.ac, CFLAGSFORSHARED appears to be intended to be used for both C and C++ compilers PY_CORE_CXXFLAGS=$(PY_CXXFLAGS) $(PY_CXXFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE # Linker flags used for building the interpreter object files PY_CORE_LDFLAGS=$(PY_LDFLAGS) $(PY_LDFLAGS_NODIST) # Strict or non-strict aliasing flags used to compile dtoa.c, see above CFLAGS_ALIASING=@CFLAGS_ALIASING@ # Machine-dependent subdirectories MACHDEP= @MACHDEP@ # Multiarch directory (may be empty) MULTIARCH= @MULTIARCH@ MULTIARCH_CPPFLAGS = @MULTIARCH_CPPFLAGS@ # Install prefix for architecture-independent files prefix= @prefix@ # Install prefix for architecture-dependent files exec_prefix= @exec_prefix@ # Install prefix for data files datarootdir= @datarootdir@ # Expanded directories BINDIR= @bindir@ LIBDIR= @libdir@ MANDIR= @mandir@ INCLUDEDIR= @includedir@ CONFINCLUDEDIR= $(exec_prefix)/include SCRIPTDIR= $(prefix)/lib ABIFLAGS= @ABIFLAGS@ # Detailed destination directories BINLIBDEST= $(LIBDIR)/python$(VERSION) LIBDEST= $(SCRIPTDIR)/python$(VERSION) INCLUDEPY= $(INCLUDEDIR)/python$(LDVERSION) CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(LDVERSION) # Symbols used for using shared libraries SHLIB_SUFFIX= @SHLIB_SUFFIX@ EXT_SUFFIX= @EXT_SUFFIX@ LDSHARED= @LDSHARED@ $(PY_LDFLAGS) BLDSHARED= @BLDSHARED@ $(PY_CORE_LDFLAGS) LDCXXSHARED= @LDCXXSHARED@ DESTSHARED= $(BINLIBDEST)/lib-dynload # Executable suffix (.exe on Windows and Mac OS X) EXE= @EXEEXT@ BUILDEXE= @BUILDEXEEXT@ # Short name and location for Mac OS X Python framework UNIVERSALSDK=@UNIVERSALSDK@ PYTHONFRAMEWORK= @PYTHONFRAMEWORK@ PYTHONFRAMEWORKDIR= @PYTHONFRAMEWORKDIR@ PYTHONFRAMEWORKPREFIX= @PYTHONFRAMEWORKPREFIX@ PYTHONFRAMEWORKINSTALLDIR= @PYTHONFRAMEWORKINSTALLDIR@ # Deployment target selected during configure, to be checked # by distutils. The export statement is needed to ensure that the # deployment target is active during build. MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ @EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET # Option to install to strip binaries STRIPFLAG=-s # Flags to lipo to produce a 32-bit-only universal executable LIPO_32BIT_FLAGS=@LIPO_32BIT_FLAGS@ # Options to enable prebinding (for fast startup prior to Mac OS X 10.3) OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@ # Environment to run shared python without installed libraries RUNSHARED= @RUNSHARED@ # ensurepip options ENSUREPIP= @ENSUREPIP@ # OpenSSL options for setup.py so sysconfig can pick up AC_SUBST() vars. OPENSSL_INCLUDES=@OPENSSL_INCLUDES@ OPENSSL_LIBS=@OPENSSL_LIBS@ OPENSSL_LDFLAGS=@OPENSSL_LDFLAGS@ # Modes for directories, executables and data files created by the # install process. Default to user-only-writable for all file types. DIRMODE= 755 EXEMODE= 755 FILEMODE= 644 # configure script arguments CONFIG_ARGS= @CONFIG_ARGS@ # Subdirectories with code SRCDIRS= @SRCDIRS@ # Other subdirectories SUBDIRSTOO= Include Lib Misc # Files and directories to be distributed CONFIGFILES= configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in DISTFILES= README.rst ChangeLog $(CONFIGFILES) DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy DIST= $(DISTFILES) $(DISTDIRS) LIBRARY= @LIBRARY@ LDLIBRARY= @LDLIBRARY@ BLDLIBRARY= @BLDLIBRARY@ PY3LIBRARY= @PY3LIBRARY@ DLLLIBRARY= @DLLLIBRARY@ LDLIBRARYDIR= @LDLIBRARYDIR@ INSTSONAME= @INSTSONAME@ LIBS= @LIBS@ LIBM= @LIBM@ LIBC= @LIBC@ SYSLIBS= $(LIBM) $(LIBC) SHLIBS= @SHLIBS@ DLINCLDIR= @DLINCLDIR@ DYNLOADFILE= @DYNLOADFILE@ MACHDEP_OBJS= @MACHDEP_OBJS@ LIBOBJDIR= Python/ LIBOBJS= @LIBOBJS@ PYTHON= python$(EXE) BUILDPYTHON= python$(BUILDEXE) PYTHON_FOR_REGEN=@PYTHON_FOR_REGEN@ UPDATE_FILE=@PYTHON_FOR_REGEN@ $(srcdir)/Tools/scripts/update_file.py PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@ _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@ BUILD_GNU_TYPE= @build@ HOST_GNU_TYPE= @host@ # Tcl and Tk config info from --with-tcltk-includes and -libs options TCLTK_INCLUDES= @TCLTK_INCLUDES@ TCLTK_LIBS= @TCLTK_LIBS@ # The task to run while instrumented when building the profile-opt target. # We exclude unittests with -x that take a ridiculious amount of time to # run in the instrumented training build or do not provide much value. PROFILE_TASK=-m test.regrtest --pgo # report files for gcov / lcov coverage report COVERAGE_INFO= $(abs_builddir)/coverage.info COVERAGE_REPORT=$(abs_builddir)/lcov-report COVERAGE_REPORT_OPTIONS=--no-branch-coverage --title "CPython lcov report" ASMJIT_DIR=ThirdParty/asmjit/src ASMJIT_SRCDIR=$(srcdir)/$(ASMJIT_DIR) PY_CORE_CXXFLAGS += -I$(ASMJIT_SRCDIR) PY_CORE_CXXFLAGS += -I$(srcdir)/ThirdParty/parallel-hashmap GTEST_DIR=ThirdParty/googletest-1.8.1/googletest GTEST_SRCDIR=$(srcdir)/$(GTEST_DIR) RUNTIME_TESTS_DIR=RuntimeTests RUNTIME_TESTS_SRCDIR=$(srcdir)/$(RUNTIME_TESTS_DIR) STRICTM_TESTS_DIR=StrictModules/Tests STRICTM_TESTS_SRCDIR=$(srcdir)/$(STRICTM_TESTS_DIR) # Environment variables injected by ./configure when ASAN is enabled, to make # all tests pass. ASAN_TEST_ENV= @ASAN_TEST_ENV@ ASAN_TEST_ENV_WITH_LSAN= @ASAN_TEST_ENV_WITH_LSAN@ # === Definitions added by makesetup === ########################################################################## # Modules MODULE_OBJS= \ Modules/config.o \ Modules/getpath.o \ Modules/main.o \ @GCMODULE_MAYBE_PROBED@ IO_H= Modules/_io/_iomodule.h IO_OBJS= \ Modules/_io/_iomodule.o \ Modules/_io/iobase.o \ Modules/_io/fileio.o \ Modules/_io/bufferedio.o \ Modules/_io/textio.o \ Modules/_io/bytesio.o \ Modules/_io/stringio.o ########################################################################## LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ ########################################################################## # Parser POBJS= \ Parser/acceler.o \ Parser/grammar1.o \ Parser/listnode.o \ Parser/node.o \ Parser/parser.o \ Parser/token.o \ PARSER_OBJS= $(POBJS) Parser/myreadline.o Parser/parsetok.o Parser/tokenizer.o PARSER_HEADERS= \ $(srcdir)/Include/grammar.h \ $(srcdir)/Include/parsetok.h \ $(srcdir)/Parser/parser.h \ $(srcdir)/Parser/tokenizer.h ########################################################################## # Python PYTHON_OBJS= \ Python/_warnings.o \ Python/Python-ast.o \ Python/arraymodule.o \ Python/asdl.o \ Python/ast.o \ Python/ast_opt.o \ Python/ast_unparse.o \ Python/bltinmodule.o \ @CEVAL_MAYBE_PROBED@ \ Python/classloader.o \ Python/codecs.o \ Python/compile.o \ Python/context.o \ Python/dynamic_annotations.o \ Python/errors.o \ Python/frozenmain.o \ Python/future.o \ Python/getargs.o \ Python/getcompiler.o \ Python/getcopyright.o \ Python/getplatform.o \ Python/getversion.o \ Python/graminit.o \ Python/hamt.o \ @IMPORT_MAYBE_PROBED@ \ Python/importdl.o \ Python/initconfig.o \ Python/immutable_global.o \ Python/marshal.o \ Python/modsupport.o \ Python/mysnprintf.o \ Python/mystrtoul.o \ Python/pathconfig.o \ Python/peephole.o \ Python/preconfig.o \ Python/pyarena.o \ Python/pyctype.o \ Python/pyfpe.o \ Python/pyhash.o \ Python/pylifecycle.o \ Python/pymath.o \ Python/pystate.o \ Python/pythonrun.o \ Python/pytime.o \ Python/bootstrap_hash.o \ Python/shadowcode.o \ Python/structmember.o \ Python/switchboard.o \ Python/symtable.o \ Python/sysmodule.o \ Python/thread.o \ Python/traceback.o \ Python/getopt.o \ Python/pystrcmp.o \ Python/pystrtod.o \ Python/pystrhex.o \ Python/dtoa.o \ Python/formatter_unicode.o \ Python/fileutils.o \ Python/$(DYNLOADFILE) \ $(LIBOBJS) \ $(MACHDEP_OBJS) \ ########################################################################## # Jit JIT_OBJS= \ Jit/bitvector.o \ Jit/bytecode.o \ Jit/code_allocator.o \ Jit/compiler.o \ Jit/deopt.o \ Jit/deopt_patcher.o \ Jit/dict_watch.o \ Jit/disassembler.o \ Jit/frame.o \ Jit/hir/hir.o \ Jit/hir/alias_class.o \ Jit/hir/analysis.o \ Jit/hir/builder.o \ Jit/hir/memory_effects.o \ Jit/hir/optimization.o \ Jit/hir/parser.o \ Jit/hir/preload.o \ Jit/hir/printer.o \ Jit/hir/refcount_insertion.o \ Jit/hir/simplify.o \ Jit/hir/ssa.o \ Jit/hir/type.o \ Jit/inline_cache.o \ Jit/jit_context.o \ Jit/jit_flag_processor.o \ Jit/jit_gdb_support.o \ Jit/jit_list.o \ Jit/jit_rt.o \ Jit/jit_time_log.o \ Jit/live_type_map.o \ Jit/log.o \ Jit/patternmatch.o \ Jit/perf_jitdump.o \ Jit/profile_data.o \ Jit/pyjit.o \ Jit/runtime.o \ Jit/runtime_support.o \ Jit/slot_gen.o \ Jit/type_profiler.o \ Jit/util.o \ Jit/codegen/annotations.o \ Jit/codegen/autogen.o \ Jit/codegen/copy_graph.o \ Jit/codegen/environ.o \ Jit/codegen/gen_asm.o \ Jit/codegen/gen_asm_utils.o \ Jit/codegen/x86_64.o \ Jit/lir/block_builder.o \ Jit/lir/dce.o \ Jit/lir/lir.o \ Jit/lir/block.o \ Jit/lir/blocksorter.o \ Jit/lir/c_helper_translations.o \ Jit/lir/c_helper_translations_auto.o \ Jit/lir/function.o \ Jit/lir/generator.o \ Jit/lir/inliner.o \ Jit/lir/instruction.o \ Jit/lir/operand.o \ Jit/lir/parser.o \ Jit/lir/postalloc.o \ Jit/lir/postgen.o \ Jit/lir/printer.o \ Jit/lir/regalloc.o \ Jit/lir/rewrite.o \ Jit/lir/verify.o \ Jit/lir/symbol_mapping.o I386_DASM_OBJS = \ ThirdParty/i386-dis/i386-dis.o \ ThirdParty/i386-dis/dis-buf.o ########################################################################## # Strict Modules STRICTM_OBJS= \ StrictModules/Compiler/analyzed_module.o \ StrictModules/Compiler/abstract_module_loader.o \ StrictModules/Compiler/module_info.o \ StrictModules/Compiler/stub.o \ StrictModules/Objects/base_object.o \ StrictModules/Objects/callable.o \ StrictModules/Objects/instance.o \ StrictModules/Objects/module.o \ StrictModules/Objects/numerics.o \ StrictModules/Objects/type.o \ StrictModules/Objects/constants.o \ StrictModules/Objects/exception_object.o \ StrictModules/Objects/module_type.o \ StrictModules/Objects/object_type.o \ StrictModules/Objects/string_object.o \ StrictModules/Objects/type_type.o \ StrictModules/Objects/union.o \ StrictModules/Objects/unknown.o \ StrictModules/Objects/iterable_objects.o \ StrictModules/Objects/iterator_objects.o \ StrictModules/Objects/dict_object.o \ StrictModules/Objects/function.o \ StrictModules/Objects/codeobject.o \ StrictModules/Objects/signature.o \ StrictModules/Objects/super.o \ StrictModules/Objects/property.o \ StrictModules/Objects/builtins.o \ StrictModules/Objects/lazy_object.o \ StrictModules/Objects/strict_modules_builtins.o \ StrictModules/Objects/objects.o \ StrictModules/Objects/object_interface.o \ StrictModules/symbol_table.o \ StrictModules/analyzer.o \ StrictModules/ast_visitor.o \ StrictModules/ast_preprocessor.o \ StrictModules/parser_util.o \ StrictModules/strict_module_checker_interface.o \ StrictModules/scope.o \ StrictModules/pystrictmodule.o \ StrictModules/exceptions.o \ StrictModules/error_sink.o ########################################################################## # Objects OBJECT_OBJS= \ Objects/abstract.o \ Objects/accu.o \ Objects/boolobject.o \ Objects/bytes_methods.o \ Objects/bytearrayobject.o \ Objects/bytesobject.o \ Objects/call.o \ Objects/capsule.o \ Objects/cellobject.o \ Objects/classobject.o \ Objects/codeobject.o \ Objects/complexobject.o \ Objects/constobject.o \ Objects/descrobject.o \ Objects/enumobject.o \ Objects/exceptions.o \ Objects/genobject.o \ Objects/fileobject.o \ Objects/floatobject.o \ Objects/frameobject.o \ Objects/funccredobject.o \ Objects/funcobject.o \ Objects/interpreteridobject.o \ Objects/iterobject.o \ Objects/listobject.o \ Objects/longobject.o \ Objects/dictobject.o \ Objects/odictobject.o \ Objects/memoryobject.o \ Objects/methodobject.o \ Objects/moduleobject.o \ Objects/namespaceobject.o \ Objects/object.o \ Objects/obmalloc.o \ Objects/picklebufobject.o \ Objects/rangeobject.o \ Objects/setobject.o \ Objects/sliceobject.o \ Objects/structseq.o \ Objects/tupleobject.o \ Objects/typeobject.o \ Objects/unicodeobject.o \ Objects/unicodectype.o \ Objects/unionobject.o \ Objects/weakrefobject.o ########################################################################## # asmjit objects ASMJIT_OBJS = $(ASMJIT_DIR)/asmjit/core/arch.o \ $(ASMJIT_DIR)/asmjit/core/assembler.o \ $(ASMJIT_DIR)/asmjit/core/builder.o \ $(ASMJIT_DIR)/asmjit/core/callconv.o \ $(ASMJIT_DIR)/asmjit/core/codeholder.o \ $(ASMJIT_DIR)/asmjit/core/compiler.o \ $(ASMJIT_DIR)/asmjit/core/constpool.o \ $(ASMJIT_DIR)/asmjit/core/cpuinfo.o \ $(ASMJIT_DIR)/asmjit/core/emitter.o \ $(ASMJIT_DIR)/asmjit/core/func.o \ $(ASMJIT_DIR)/asmjit/core/globals.o \ $(ASMJIT_DIR)/asmjit/core/inst.o \ $(ASMJIT_DIR)/asmjit/core/jitallocator.o \ $(ASMJIT_DIR)/asmjit/core/jitruntime.o \ $(ASMJIT_DIR)/asmjit/core/logging.o \ $(ASMJIT_DIR)/asmjit/core/operand.o \ $(ASMJIT_DIR)/asmjit/core/osutils.o \ $(ASMJIT_DIR)/asmjit/core/ralocal.o \ $(ASMJIT_DIR)/asmjit/core/rapass.o \ $(ASMJIT_DIR)/asmjit/core/rastack.o \ $(ASMJIT_DIR)/asmjit/core/string.o \ $(ASMJIT_DIR)/asmjit/core/support.o \ $(ASMJIT_DIR)/asmjit/core/target.o \ $(ASMJIT_DIR)/asmjit/core/type.o \ $(ASMJIT_DIR)/asmjit/core/virtmem.o \ $(ASMJIT_DIR)/asmjit/core/zone.o \ $(ASMJIT_DIR)/asmjit/core/zonehash.o \ $(ASMJIT_DIR)/asmjit/core/zonelist.o \ $(ASMJIT_DIR)/asmjit/core/zonestack.o \ $(ASMJIT_DIR)/asmjit/core/zonetree.o \ $(ASMJIT_DIR)/asmjit/core/zonevector.o \ $(ASMJIT_DIR)/asmjit/x86/x86assembler.o \ $(ASMJIT_DIR)/asmjit/x86/x86builder.o \ $(ASMJIT_DIR)/asmjit/x86/x86callconv.o \ $(ASMJIT_DIR)/asmjit/x86/x86compiler.o \ $(ASMJIT_DIR)/asmjit/x86/x86features.o \ $(ASMJIT_DIR)/asmjit/x86/x86instapi.o \ $(ASMJIT_DIR)/asmjit/x86/x86instdb.o \ $(ASMJIT_DIR)/asmjit/x86/x86internal.o \ $(ASMJIT_DIR)/asmjit/x86/x86logging.o \ $(ASMJIT_DIR)/asmjit/x86/x86operand.o \ $(ASMJIT_DIR)/asmjit/x86/x86rapass.o ########################################################################## # objects that get linked into the Python library LIBRARY_OBJS_OMIT_FROZEN= \ Modules/getbuildinfo.o \ $(PARSER_OBJS) \ $(OBJECT_OBJS) \ $(PYTHON_OBJS) \ $(ASMJIT_OBJS) \ $(JIT_OBJS) \ $(STRICTM_OBJS) \ $(I386_DASM_OBJS) \ $(MODULE_OBJS) \ $(MODOBJS) LIBRARY_OBJS= \ $(LIBRARY_OBJS_OMIT_FROZEN) \ Python/frozen.o ######################################################################### # Rules # Default target all: @DEF_MAKE_ALL_RULE@ build_all: check-clean-src $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks \ Programs/_testembed python-config # Check that the source is clean when building out of source. check-clean-src: @if test -n "$(VPATH)" -a -f "$(srcdir)/Programs/python.o"; then \ echo "Error: The source directory ($(srcdir)) is not clean" ; \ echo "Building Python out of the source tree (in $(abs_builddir)) requires a clean source tree ($(abs_srcdir))" ; \ echo "Try to run: make -C \"$(srcdir)\" clean" ; \ exit 1; \ fi # Profile generation build must start from a clean tree. profile-clean-stamp: $(MAKE) clean $(MAKE) profile-removal touch $@ # Compile with profile generation enabled. profile-gen-stamp: profile-clean-stamp @if [ $(LLVM_PROF_ERR) = yes ]; then \ echo "Error: Cannot perform PGO build because llvm-profdata was not found in PATH" ;\ echo "Please add it to PATH and run ./configure again" ;\ exit 1;\ fi @echo "Building with support for profile generation:" $(MAKE) build_all_generate_profile touch $@ # Run task with profile generation build to create profile information. profile-run-stamp: @echo "Running code to generate profile data (this can take a while):" # First, we need to create a clean build with profile generation # enabled. $(MAKE) profile-gen-stamp # Next, run the profile task to generate the profile information. $(MAKE) run_profile_task $(MAKE) build_all_merge_profile # Remove profile generation binary since we are done with it. $(MAKE) clean # This is an expensive target to build and it does not have proper # makefile dependency information. So, we create a "stamp" file # to record its completion and avoid re-running it. touch $@ build_all_generate_profile: $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)" run_profile_task: @ # FIXME: can't run for a cross build $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true build_all_merge_profile: $(LLVM_PROF_MERGER) # Compile Python binary with profile guided optimization. # To force re-running of the profile task, remove the profile-run-stamp file. profile-opt: profile-run-stamp @echo "Rebuilding with profile guided optimizations:" -rm -f profile-clean-stamp $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_USE_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST)" # Compile and run with gcov .PHONY=coverage coverage-lcov coverage-report coverage: @echo "Building with support for coverage checking:" $(MAKE) clean $(MAKE) profile-removal $(MAKE) @DEF_MAKE_RULE@ CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -lgcov" coverage-lcov: @echo "Creating Coverage HTML report with LCOV:" @rm -f $(COVERAGE_INFO) @rm -rf $(COVERAGE_REPORT) @lcov --capture --directory $(abs_builddir) \ --base-directory $(realpath $(abs_builddir)) \ --path $(realpath $(abs_srcdir)) \ --output-file $(COVERAGE_INFO) @ # remove 3rd party modules, system headers and internal files with @ # debug, test or dummy functions. @lcov --remove $(COVERAGE_INFO) \ '*/Modules/_blake2/impl/*' \ '*/Modules/_ctypes/libffi*/*' \ '*/Modules/_decimal/libmpdec/*' \ '*/Modules/_sha3/kcp/*' \ '*/Modules/expat/*' \ '*/Modules/zlib/*' \ '*/Include/*' \ '*/Modules/xx*.c' \ '*/Parser/listnode.c' \ '*/Python/pyfpe.c' \ '*/Python/pystrcmp.c' \ '/usr/include/*' \ '/usr/local/include/*' \ '/usr/lib/gcc/*' \ --output-file $(COVERAGE_INFO) @genhtml $(COVERAGE_INFO) --output-directory $(COVERAGE_REPORT) \ $(COVERAGE_REPORT_OPTIONS) @echo @echo "lcov report at $(COVERAGE_REPORT)/index.html" @echo # Force regeneration of parser and importlib coverage-report: regen-grammar regen-token regen-importlib @ # build with coverage info $(MAKE) coverage @ # run tests, ignore failures $(TESTRUNNER) $(TESTOPTS) || true @ # build lcov report $(MAKE) coverage-lcov # Run "Argument Clinic" over all source files .PHONY=clinic clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir) # Build the interpreter $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(V)$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) $(LRT_FLAG) platform: $(BUILDPYTHON) pybuilddir.txt $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform # Create build directory and generate the sysconfig build-time data there. # pybuilddir.txt contains the name of the build dir and is used for # sys.path fixup -- see Modules/getpath.c. # Since this step runs before shared modules are built, try to avoid bootstrap # problems by creating a dummy pybuilddir.txt just to allow interpreter # initialization to succeed. It will be overwritten by generate-posix-vars # or removed in case of failure. pybuilddir.txt: $(BUILDPYTHON) @echo "none" > ./pybuilddir.txt $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars ;\ if test $$? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi # This is shared by the math and cmath modules Modules/_math.o: Modules/_math.c Modules/_math.h $(V)$(CC) -c $(CCSHARED) $(PY_CORE_CFLAGS) -o $@ $< # blake2s is auto-generated from blake2b $(srcdir)/Modules/_blake2/blake2s_impl.c: $(srcdir)/Modules/_blake2/blake2b_impl.c $(srcdir)/Modules/_blake2/blake2b2s.py $(PYTHON_FOR_REGEN) $(srcdir)/Modules/_blake2/blake2b2s.py $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py -f $@ # Build the shared modules # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for # -s, --silent or --quiet is always the first char. # Under BSD make, MAKEFLAGS might be " -s -v x=y". # Ignore macros passed by GNU make, passed after -- sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o @case "`echo X $$MAKEFLAGS | sed 's/^X //;s/ -- .*//'`" in \ *\ -s*|s*) quiet="-q";; \ *) quiet="";; \ esac; \ echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build # Build static library $(LIBRARY): $(LIBRARY_OBJS) -$(VPRE)rm -f $@ $(V)$(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS) libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACE_OBJS) if test $(INSTSONAME) != $(LDLIBRARY); then \ $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \ $(LN) -f $(INSTSONAME) $@; \ else \ $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \ fi libpython3.so: libpython$(LDVERSION).so $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^ libpython$(LDVERSION).dylib: $(LIBRARY_OBJS) $(V)$(CC) -dynamiclib -Wl,-single_module $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ libpython$(VERSION).sl: $(LIBRARY_OBJS) $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) # Copy up the gdb python hooks into a position where they can be automatically # loaded by gdb during Lib/test/test_gdb.py # # Distributors are likely to want to install this somewhere else e.g. relative # to the stripped DWARF data for the shared library. gdbhooks: $(BUILDPYTHON)-gdb.py SRC_GDB_HOOKS=$(srcdir)/Tools/gdb/libpython.py $(BUILDPYTHON)-gdb.py: $(SRC_GDB_HOOKS) $(INSTALL_DATA) $(SRC_GDB_HOOKS) $(BUILDPYTHON)-gdb.py # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary # minimal framework (not including the Lib directory and such) in the current # directory. RESSRCDIR=Mac/Resources/framework $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \ $(LIBRARY) \ $(RESSRCDIR)/Info.plist $(INSTALL) -d -m $(DIRMODE) $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION) $(CC) -o $(LDLIBRARY) $(PY_CORE_LDFLAGS) -dynamiclib \ -all_load $(LIBRARY) -Wl,-single_module \ -install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) \ -compatibility_version $(VERSION) \ -current_version $(VERSION) \ -framework CoreFoundation $(LIBS); $(INSTALL) -d -m $(DIRMODE) \ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj $(INSTALL_DATA) $(RESSRCDIR)/Info.plist \ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/Info.plist $(LN) -fsn $(VERSION) $(PYTHONFRAMEWORKDIR)/Versions/Current $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK) $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources # This rule builds the Cygwin Python DLL and import library if configured # for a shared core library; otherwise, this rule is a noop. $(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS) if test -n "$(DLLLIBRARY)"; then \ $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \ $(LIBS) $(MODLIBS) $(SYSLIBS); \ else true; \ fi oldsharedmods: $(SHAREDMODS) Makefile Modules/config.c: Makefile.pre \ $(srcdir)/Modules/config.c.in \ $(MAKESETUP) \ $(srcdir)/Modules/Setup \ Modules/Setup.local $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \ -s Modules \ Modules/Setup.local \ $(srcdir)/Modules/Setup @mv config.c Modules @echo "The Makefile was updated, you may need to re-run make." Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LRT_FLAG) ############################################################################ # Importlib Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LINKCC) $(PY_CORE_LDFLAGS) $(LRT_FLAG) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) .PHONY: regen-importlib regen-importlib: Programs/_freeze_importlib # Regenerate Python/importlib_external.h # from Lib/importlib/_bootstrap_external.py using _freeze_importlib ./Programs/_freeze_importlib importlib._bootstrap_external \ $(srcdir)/Lib/importlib/_bootstrap_external.py \ $(srcdir)/Python/importlib_external.h.new $(UPDATE_FILE) $(srcdir)/Python/importlib_external.h $(srcdir)/Python/importlib_external.h.new # Regenerate Python/importlib.h from Lib/importlib/_bootstrap.py # using _freeze_importlib ./Programs/_freeze_importlib importlib._bootstrap \ $(srcdir)/Lib/importlib/_bootstrap.py \ $(srcdir)/Python/importlib.h.new $(UPDATE_FILE) $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib.h.new # Regenerate Python/importlib_zipimport.h from Lib/zipimport.py # using _freeze_importlib ./Programs/_freeze_importlib zipimport \ $(srcdir)/Lib/zipimport.py \ $(srcdir)/Python/importlib_zipimport.h.new $(UPDATE_FILE) $(srcdir)/Python/importlib_zipimport.h $(srcdir)/Python/importlib_zipimport.h.new ############################################################################ # Regenerate all generated files regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar \ regen-token regen-keyword regen-symbol regen-ast regen-importlib clinic \ regen-jit ############################################################################ # Special rules for object files # Make pydtrace depend on dtrace headers Include/pydtrace.h: \ $(CEVAL_DTRACE_HEADER) \ $(GCMODULE_DTRACE_HEADER) \ $(IMPORT_DTRACE_HEADER) Modules/getbuildinfo.o: $(PARSER_OBJS) \ $(OBJECT_OBJS) \ $(PYTHON_OBJS) \ $(ASMJIT_OBJS) \ $(JIT_OBJS) \ $(STRICTM_OBJS) \ $(MODULE_OBJS) \ $(MODOBJS) \ $(DTRACE_OBJS) \ $(srcdir)/Modules/getbuildinfo.c $(V)$(CC) -c $(PY_CORE_CFLAGS) \ -DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \ -DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \ -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \ -o $@ $(srcdir)/Modules/getbuildinfo.c Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile $(V)$(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \ -DPREFIX='"$(prefix)"' \ -DEXEC_PREFIX='"$(exec_prefix)"' \ -DVERSION='"$(VERSION)"' \ -DVPATH='"$(VPATH)"' \ -o $@ $(srcdir)/Modules/getpath.c Programs/python.o: $(srcdir)/Programs/python.c $(V)$(CXX) -c $(PY_CORE_CXXFLAGS) -o $@ $(srcdir)/Programs/python.c Programs/_testembed.o: $(srcdir)/Programs/_testembed.c $(V)$(CC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c Modules/_sre.o: $(srcdir)/Modules/_sre.c $(srcdir)/Modules/sre.h $(srcdir)/Modules/sre_constants.h $(srcdir)/Modules/sre_lib.h Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c $(srcdir)/Modules/posixmodule.h Modules/grpmodule.o: $(srcdir)/Modules/grpmodule.c $(srcdir)/Modules/posixmodule.h Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule.h Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c $(srcdir)/Modules/posixmodule.h Python/dynload_shlib.o: $(srcdir)/Python/dynload_shlib.c Makefile $(V)$(CC) -c $(PY_CORE_CFLAGS) \ -DSOABI='"$(SOABI)"' \ -DUSE_COMPAT_SOABI='$(USE_COMPAT_SOABI)' \ -DFB_COMPAT_SOABI='"$(FB_COMPAT_SOABI)"' \ -o $@ $(srcdir)/Python/dynload_shlib.c Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile $(V)$(CC) -c $(PY_CORE_CFLAGS) \ -DSHLIB_EXT='"$(EXT_SUFFIX)"' \ -o $@ $(srcdir)/Python/dynload_hpux.c Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(V)$(CC) -c $(PY_CORE_CFLAGS) \ -DABIFLAGS='"$(ABIFLAGS)"' \ $(MULTIARCH_CPPFLAGS) \ -o $@ $(srcdir)/Python/sysmodule.c $(IO_OBJS): $(IO_H) .PHONY: regen-grammar regen-grammar: regen-token # Regenerate Include/graminit.h and Python/graminit.c # from Grammar/Grammar using pgen @$(MKDIR_P) Include PYTHONPATH=$(srcdir) $(PYTHON_FOR_REGEN) -m Parser.pgen $(srcdir)/Grammar/Grammar \ $(srcdir)/Grammar/Tokens \ $(srcdir)/Include/graminit.h.new \ $(srcdir)/Python/graminit.c.new $(UPDATE_FILE) $(srcdir)/Include/graminit.h $(srcdir)/Include/graminit.h.new $(UPDATE_FILE) $(srcdir)/Python/graminit.c $(srcdir)/Python/graminit.c.new .PHONY=regen-ast regen-ast: # Regenerate Include/Python-ast.h using Parser/asdl_c.py -h $(MKDIR_P) $(srcdir)/Include $(PYTHON_FOR_REGEN) $(srcdir)/Parser/asdl_c.py \ -h $(srcdir)/Include/Python-ast.h.new \ $(srcdir)/Parser/Python.asdl $(UPDATE_FILE) $(srcdir)/Include/Python-ast.h $(srcdir)/Include/Python-ast.h.new # Regenerate Python/Python-ast.c using Parser/asdl_c.py -c $(MKDIR_P) $(srcdir)/Python $(PYTHON_FOR_REGEN) $(srcdir)/Parser/asdl_c.py \ -c $(srcdir)/Python/Python-ast.c.new \ $(srcdir)/Parser/Python.asdl $(UPDATE_FILE) $(srcdir)/Python/Python-ast.c $(srcdir)/Python/Python-ast.c.new .PHONY: regen-opcode regen-opcode: # Regenerate Include/opcode.h from Lib/opcode.py # using Tools/scripts/generate_opcode_h.py $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_opcode_h.py \ $(srcdir)/Lib/opcode.py \ $(srcdir)/Include/opcode.h.new $(UPDATE_FILE) $(srcdir)/Include/opcode.h $(srcdir)/Include/opcode.h.new .PHONY: regen-token regen-token: # Regenerate Doc/library/token-list.inc from Grammar/Tokens # using Tools/scripts/generate_token.py $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py rst \ $(srcdir)/Grammar/Tokens \ $(srcdir)/Doc/library/token-list.inc # Regenerate Include/token.h from Grammar/Tokens # using Tools/scripts/generate_token.py $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py h \ $(srcdir)/Grammar/Tokens \ $(srcdir)/Include/token.h # Regenerate Parser/token.c from Grammar/Tokens # using Tools/scripts/generate_token.py $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py c \ $(srcdir)/Grammar/Tokens \ $(srcdir)/Parser/token.c # Regenerate Lib/token.py from Grammar/Tokens # using Tools/scripts/generate_token.py $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py py \ $(srcdir)/Grammar/Tokens \ $(srcdir)/Lib/token.py .PHONY: regen-keyword regen-keyword: # Regenerate Lib/keyword.py from Grammar/Grammar and Grammar/Tokens # using Parser/pgen PYTHONPATH=$(srcdir) $(PYTHON_FOR_REGEN) -m Parser.pgen.keywordgen $(srcdir)/Grammar/Grammar \ $(srcdir)/Grammar/Tokens \ $(srcdir)/Lib/keyword.py.new $(UPDATE_FILE) $(srcdir)/Lib/keyword.py $(srcdir)/Lib/keyword.py.new .PHONY: regen-symbol regen-symbol: $(srcdir)/Include/graminit.h # Regenerate Lib/symbol.py from Include/graminit.h # using Tools/scripts/generate_symbol_py.py $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_symbol_py.py \ $(srcdir)/Include/graminit.h \ $(srcdir)/Lib/symbol.py Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o Python/future.o Parser/parsetok.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h Python/getplatform.o: $(srcdir)/Python/getplatform.c $(V)$(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c Python/importdl.o: $(srcdir)/Python/importdl.c $(V)$(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c Objects/unicodectype.o: $(srcdir)/Objects/unicodectype.c \ $(srcdir)/Objects/unicodetype_db.h BYTESTR_DEPS = \ $(srcdir)/Objects/stringlib/count.h \ $(srcdir)/Objects/stringlib/ctype.h \ $(srcdir)/Objects/stringlib/fastsearch.h \ $(srcdir)/Objects/stringlib/find.h \ $(srcdir)/Objects/stringlib/join.h \ $(srcdir)/Objects/stringlib/partition.h \ $(srcdir)/Objects/stringlib/split.h \ $(srcdir)/Objects/stringlib/stringdefs.h \ $(srcdir)/Objects/stringlib/transmogrify.h UNICODE_DEPS = \ $(srcdir)/Objects/stringlib/asciilib.h \ $(srcdir)/Objects/stringlib/codecs.h \ $(srcdir)/Objects/stringlib/count.h \ $(srcdir)/Objects/stringlib/fastsearch.h \ $(srcdir)/Objects/stringlib/find.h \ $(srcdir)/Objects/stringlib/find_max_char.h \ $(srcdir)/Objects/stringlib/localeutil.h \ $(srcdir)/Objects/stringlib/partition.h \ $(srcdir)/Objects/stringlib/replace.h \ $(srcdir)/Objects/stringlib/split.h \ $(srcdir)/Objects/stringlib/ucs1lib.h \ $(srcdir)/Objects/stringlib/ucs2lib.h \ $(srcdir)/Objects/stringlib/ucs4lib.h \ $(srcdir)/Objects/stringlib/undef.h \ $(srcdir)/Objects/stringlib/unicode_format.h \ $(srcdir)/Objects/stringlib/unicodedefs.h Objects/bytes_methods.o: $(srcdir)/Objects/bytes_methods.c $(BYTESTR_DEPS) Objects/bytesobject.o: $(srcdir)/Objects/bytesobject.c $(BYTESTR_DEPS) Objects/bytearrayobject.o: $(srcdir)/Objects/bytearrayobject.c $(BYTESTR_DEPS) Objects/unicodeobject.o: $(srcdir)/Objects/unicodeobject.c $(UNICODE_DEPS) Objects/odictobject.o: $(srcdir)/Objects/dict-common.h Objects/dictobject.o: $(srcdir)/Objects/stringlib/eq.h $(srcdir)/Objects/dict-common.h Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h .PHONY: regen-opcode-targets regen-opcode-targets: # Regenerate Python/opcode_targets.h from Lib/opcode.py # using Python/makeopcodetargets.py $(PYTHON_FOR_REGEN) $(srcdir)/Python/makeopcodetargets.py \ $(srcdir)/Python/opcode_targets.h.new $(UPDATE_FILE) $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/opcode_targets.h.new Python/ceval.o: $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/ceval_gil.h \ $(srcdir)/Python/condvar.h Python/frozen.o: $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib_external.h \ $(srcdir)/Python/importlib_zipimport.h # Generate DTrace probe macros, then rename them (PYTHON_ -> PyDTrace_) to # follow our naming conventions. dtrace(1) uses the output filename to generate # an include guard, so we can't use a pipeline to transform its output. Include/pydtrace_probes_ceval.h: $(srcdir)/Include/pydtrace_ceval.d $(MKDIR_P) Include $(DTRACE) $(DFLAGS) -o $@ -h -s $< : sed in-place edit with POSIX-only tools sed -i 's/PYTHON_/PyDTrace_/' $@ sed -i 's,sys/sdt.h,Include/folly/tracing/StaticTracepoint.h,' $@ sed -i -E 's,DTRACE_PROBE([0-9]+),FOLLY_SDT,' $@ Include/pydtrace_probes_gcmodule.h: $(srcdir)/Include/pydtrace_gcmodule.d $(MKDIR_P) Include $(DTRACE) $(DFLAGS) -o $@ -h -s $< : sed in-place edit with POSIX-only tools sed -i 's/PYTHON_/PyDTrace_/' $@ sed -i 's,sys/sdt.h,Include/folly/tracing/StaticTracepoint.h,' $@ sed -i -E 's,DTRACE_PROBE([0-9]+),FOLLY_SDT,' $@ Include/pydtrace_probes_import.h: $(srcdir)/Include/pydtrace_import.d $(MKDIR_P) Include $(DTRACE) $(DFLAGS) -o $@ -h -s $< : sed in-place edit with POSIX-only tools sed -i 's/PYTHON_/PyDTrace_/' $@ sed -i 's,sys/sdt.h,Include/folly/tracing/StaticTracepoint.h,' $@ sed -i -E 's,DTRACE_PROBE([0-9]+),FOLLY_SDT,' $@ Python/ceval_probes.o: $(srcdir)/Include/pydtrace_ceval.d Python/ceval.o $(DTRACE) $(DFLAGS) -o $@ -G -s $< Python/ceval.o Python/ceval_probed.o: Python/ceval_probes.o Python/ceval.o $(LINKCC) -nostdlib -Wl,-r -o $@ Python/ceval_probes.o Python/ceval.o Modules/gcmodule_probes.o: $(srcdir)/Include/pydtrace_gcmodule.d Modules/gcmodule.o $(DTRACE) $(DFLAGS) -o $@ -G -s $< Modules/gcmodule.o Modules/gcmodule_probed.o: Modules/gcmodule_probes.o Modules/gcmodule.o $(LINKCC) -nostdlib -Wl,-r -o $@ Modules/gcmodule_probes.o Modules/gcmodule.o Python/import_probes.o: $(srcdir)/Include/pydtrace_import.d Python/import.o $(DTRACE) $(DFLAGS) -o $@ -G -s $< Python/import.o #Python/ceval.o: $(srcdir)/Include/pydtrace.h #Python/import.o: $(srcdir)/Include/pydtrace.h #Modules/gcmodule.o: $(srcdir)/Include/pydtrace.h Python/import_probed.o: Python/import_probes.o Python/import.o $(LINKCC) -nostdlib -Wl,-r -o $@ Python/import_probes.o Python/import.o Objects/typeobject.o: Objects/typeslots.inc .PHONY: regen-typeslots regen-typeslots: # Regenerate Objects/typeslots.inc from Include/typeslotsh # using Objects/typeslots.py $(PYTHON_FOR_REGEN) $(srcdir)/Objects/typeslots.py \ < $(srcdir)/Include/typeslots.h \ $(srcdir)/Objects/typeslots.inc.new $(UPDATE_FILE) $(srcdir)/Objects/typeslots.inc $(srcdir)/Objects/typeslots.inc.new ############################################################################ # Header files # Private interface for the JIT that isn't exposed to the rest of CPython JIT_PRIVATE_HEADERS= \ $(srcdir)/Jit/bitvector.h \ $(srcdir)/Jit/bytecode.h \ $(srcdir)/Jit/capsule.h \ $(srcdir)/Jit/code_allocator.h \ $(srcdir)/Jit/compiler.h \ $(srcdir)/Jit/dataflow.h \ $(srcdir)/Jit/deopt.h \ $(srcdir)/Jit/deopt_patcher.h \ $(srcdir)/Jit/dict_watch.h \ $(srcdir)/Jit/disassembler.h \ $(srcdir)/Jit/fixed_type_profiler.h \ $(srcdir)/Jit/frame.h \ $(srcdir)/Jit/hir/hir.h \ $(srcdir)/Jit/hir/alias_class.h \ $(srcdir)/Jit/hir/analysis.h \ $(srcdir)/Jit/hir/builder.h \ $(srcdir)/Jit/hir/memory_effects.h \ $(srcdir)/Jit/hir/optimization.h \ $(srcdir)/Jit/hir/parser.h \ $(srcdir)/Jit/hir/preload.h \ $(srcdir)/Jit/hir/printer.h \ $(srcdir)/Jit/hir/ssa.h \ $(srcdir)/Jit/hir/type.h \ $(srcdir)/Jit/hir/type_generated.h \ $(srcdir)/Jit/hir/type_inl.h \ $(srcdir)/Jit/inline_cache.h \ $(srcdir)/Jit/intrusive_list.h \ $(srcdir)/Jit/live_type_map.h \ $(srcdir)/Jit/log.h \ $(srcdir)/Jit/jit_context.h \ $(srcdir)/Jit/jit_flag_processor.h \ $(srcdir)/Jit/jit_gdb_support.h \ $(srcdir)/Jit/jit_list.h \ $(srcdir)/Jit/jit_rt.h \ $(srcdir)/Jit/jit_time_log.h \ $(srcdir)/Jit/patternmatch.h \ $(srcdir)/Jit/perf_jitdump.h \ $(srcdir)/Jit/profile_data.h \ $(srcdir)/Jit/ref.h \ $(srcdir)/Jit/runtime.h \ $(srcdir)/Jit/runtime_support.h \ $(srcdir)/Jit/slot_gen.h \ $(srcdir)/Jit/stack.h \ $(srcdir)/Jit/type_profiler.h \ $(srcdir)/Jit/util.h \ $(srcdir)/Jit/codegen/annotations.h \ $(srcdir)/Jit/codegen/autogen.h \ $(srcdir)/Jit/codegen/code_section.h \ $(srcdir)/Jit/codegen/copy_graph.h \ $(srcdir)/Jit/codegen/environ.h \ $(srcdir)/Jit/codegen/gen_asm.h \ $(srcdir)/Jit/codegen/x86_64.h \ $(srcdir)/Jit/lir/block_builder.h \ $(srcdir)/Jit/lir/dce.h \ $(srcdir)/Jit/lir/lir.h \ $(srcdir)/Jit/lir/block.h \ $(srcdir)/Jit/lir/blocksorter.h \ $(srcdir)/Jit/lir/c_helper_translations.h \ $(srcdir)/Jit/lir/c_helper_translations_auto.h \ $(srcdir)/Jit/lir/function.h \ $(srcdir)/Jit/lir/generator.h \ $(srcdir)/Jit/lir/inliner.h \ $(srcdir)/Jit/lir/instruction.h \ $(srcdir)/Jit/lir/operand.h \ $(srcdir)/Jit/lir/parser.h \ $(srcdir)/Jit/lir/postalloc.h \ $(srcdir)/Jit/lir/postgen.h \ $(srcdir)/Jit/lir/printer.h \ $(srcdir)/Jit/lir/regalloc.h \ $(srcdir)/Jit/lir/rewrite.h \ $(srcdir)/Jit/lir/verify.h \ $(srcdir)/Jit/lir/symbol_mapping.h \ $(srcdir)/Jit/lir/x86_64.h # Public interface for the JIT that is intended to be consumed by CPython # Changing these will cause a full rebuild JIT_PUBLIC_HEADERS= \ $(srcdir)/Jit/pyjit.h \ $(srcdir)/Jit/pyjit_result.h \ $(srcdir)/Jit/pyjit_typeslots.h JIT_HEADERS= \ $(JIT_PRIVATE_HEADERS) \ $(JIT_PUBLIC_HEADERS) STRICTM_PRIVATE_HEADERS= \ $(srcdir)/Jit/ref.h \ $(srcdir)/Jit/util.h \ $(srcdir)/Jit/log.h \ $(srcdir)/StrictModules/Compiler/module_info.h \ $(srcdir)/StrictModules/Compiler/analyzed_module.h \ $(srcdir)/StrictModules/Compiler/abstract_module_loader.h\ $(srcdir)/StrictModules/Compiler/stub.h\ $(srcdir)/StrictModules/Objects/base_object.h \ $(srcdir)/StrictModules/Objects/callable.h \ $(srcdir)/StrictModules/Objects/callable_wrapper.h \ $(srcdir)/StrictModules/Objects/helper.h \ $(srcdir)/StrictModules/Objects/instance.h \ $(srcdir)/StrictModules/Objects/module.h \ $(srcdir)/StrictModules/Objects/numerics.h \ $(srcdir)/StrictModules/Objects/type.h \ $(srcdir)/StrictModules/Objects/constants.h \ $(srcdir)/StrictModules/Objects/exception_object.h \ $(srcdir)/StrictModules/Objects/module_type.h \ $(srcdir)/StrictModules/Objects/object_type.h \ $(srcdir)/StrictModules/Objects/string_object.h \ $(srcdir)/StrictModules/Objects/type_type.h \ $(srcdir)/StrictModules/Objects/iterable_objects.h \ $(srcdir)/StrictModules/Objects/iterator_objects.h \ $(srcdir)/StrictModules/Objects/dict_object.h \ $(srcdir)/StrictModules/Objects/function.h \ $(srcdir)/StrictModules/Objects/codeobject.h \ $(srcdir)/StrictModules/Objects/signature.h \ $(srcdir)/StrictModules/Objects/union.h \ $(srcdir)/StrictModules/Objects/unknown.h \ $(srcdir)/StrictModules/Objects/super.h \ $(srcdir)/StrictModules/Objects/property.h \ $(srcdir)/StrictModules/Objects/lazy_object.h \ $(srcdir)/StrictModules/Objects/strict_modules_builtins.h \ $(srcdir)/StrictModules/Objects/object_interface.h \ $(srcdir)/StrictModules/Objects/objects.h \ $(srcdir)/StrictModules/Objects/builtins.h \ $(srcdir)/StrictModules/sequence_map.h \ $(srcdir)/StrictModules/symbol_table.h \ $(srcdir)/StrictModules/ast_visitor.h \ $(srcdir)/StrictModules/analyzer.h \ $(srcdir)/StrictModules/ast_preprocessor.h \ $(srcdir)/StrictModules/parser_util.h \ $(srcdir)/StrictModules/strict_module_checker_interface.h \ $(srcdir)/StrictModules/scope.h \ $(srcdir)/StrictModules/scope_impl.h \ $(srcdir)/StrictModules/exceptions.h \ $(srcdir)/StrictModules/error_sink.h \ $(srcdir)/StrictModules/py_headers.h \ $(srcdir)/StrictModules/caller_context.h \ $(srcdir)/StrictModules/caller_context_impl.h STRICTM_PUBLIC_HEADERS= \ $(srcdir)/StrictModules/pystrictmodule.h STRICTM_HEADERS = \ $(STRICTM_PRIVATE_HEADERS) \ $(STRICTM_PUBLIC_HEADERS) I386_DASM_HEADERS = \ $(srcdir)/ThirdParty/i386-dis/dis-asm.h JSON_HEADERS = $(srcdir)/ThirdParty/json/json.hpp PYTHON_HEADERS= \ $(srcdir)/Include/Python.h \ $(srcdir)/Include/abstract.h \ $(srcdir)/Include/asdl.h \ $(srcdir)/Include/ast.h \ $(srcdir)/Include/bitset.h \ $(srcdir)/Include/bltinmodule.h \ $(srcdir)/Include/boolobject.h \ $(srcdir)/Include/bytearrayobject.h \ $(srcdir)/Include/bytes_methods.h \ $(srcdir)/Include/bytesobject.h \ $(srcdir)/Include/cellobject.h \ $(srcdir)/Include/ceval.h \ $(srcdir)/Include/classloader.h \ $(srcdir)/Include/classobject.h \ $(srcdir)/Include/code.h \ $(srcdir)/Include/codecs.h \ $(srcdir)/Include/compile.h \ $(srcdir)/Include/complexobject.h \ $(srcdir)/Include/constobject.h \ $(srcdir)/Include/context.h \ $(srcdir)/Include/descrobject.h \ $(srcdir)/Include/dictobject.h \ $(srcdir)/Include/dtoa.h \ $(srcdir)/Include/dynamic_annotations.h \ $(srcdir)/Include/enumobject.h \ $(srcdir)/Include/errcode.h \ $(srcdir)/Include/eval.h \ $(srcdir)/Include/fileobject.h \ $(srcdir)/Include/fileutils.h \ $(srcdir)/Include/floatobject.h \ $(srcdir)/Include/frameobject.h \ $(srcdir)/Include/funccredobject.h \ $(srcdir)/Include/funcobject.h \ $(srcdir)/Include/genobject.h \ $(srcdir)/Include/immutable_global.h \ $(srcdir)/Include/import.h \ $(srcdir)/Include/interpreteridobject.h \ $(srcdir)/Include/intrcheck.h \ $(srcdir)/Include/iterobject.h \ $(srcdir)/Include/listobject.h \ $(srcdir)/Include/longintrepr.h \ $(srcdir)/Include/longobject.h \ $(srcdir)/Include/marshal.h \ $(srcdir)/Include/memoryobject.h \ $(srcdir)/Include/methodobject.h \ $(srcdir)/Include/modsupport.h \ $(srcdir)/Include/moduleobject.h \ $(srcdir)/Include/namespaceobject.h \ $(srcdir)/Include/node.h \ $(srcdir)/Include/object.h \ $(srcdir)/Include/objimpl.h \ $(srcdir)/Include/odictobject.h \ $(srcdir)/Include/opcode.h \ $(srcdir)/Include/osdefs.h \ $(srcdir)/Include/osmodule.h \ $(srcdir)/Include/patchlevel.h \ $(srcdir)/Include/picklebufobject.h \ $(srcdir)/Include/pyarena.h \ $(srcdir)/Include/pycapsule.h \ $(srcdir)/Include/pyctype.h \ $(srcdir)/Include/pydebug.h \ $(srcdir)/Include/pydtrace.h \ $(srcdir)/Include/pyerrors.h \ $(srcdir)/Include/py_immutable_error.h \ $(srcdir)/Include/pyfpe.h \ $(srcdir)/Include/pyhash.h \ $(srcdir)/Include/pylifecycle.h \ $(srcdir)/Include/pymacconfig.h \ $(srcdir)/Include/pymacro.h \ $(srcdir)/Include/pymath.h \ $(srcdir)/Include/pymem.h \ $(srcdir)/Include/pyport.h \ $(srcdir)/Include/pystate.h \ $(srcdir)/Include/pystrcmp.h \ $(srcdir)/Include/pystrhex.h \ $(srcdir)/Include/pystrtod.h \ $(srcdir)/Include/pythonrun.h \ $(srcdir)/Include/pythread.h \ $(srcdir)/Include/pytime.h \ $(srcdir)/Include/rangeobject.h \ $(srcdir)/Include/setobject.h \ $(srcdir)/Include/sliceobject.h \ $(srcdir)/Include/structmember.h \ $(srcdir)/Include/structseq.h \ $(srcdir)/Include/switchboard.h \ $(srcdir)/Include/symtable.h \ $(srcdir)/Include/sysmodule.h \ $(srcdir)/Include/token.h \ $(srcdir)/Include/traceback.h \ $(srcdir)/Include/tracemalloc.h \ $(srcdir)/Include/tupleobject.h \ $(srcdir)/Include/ucnhash.h \ $(srcdir)/Include/unicodeobject.h \ $(srcdir)/Include/warnings.h \ $(srcdir)/Include/weakrefobject.h \ \ pyconfig.h \ $(PARSER_HEADERS) \ $(srcdir)/Include/Python-ast.h \ $(srcdir)/Include/cpython/abstract.h \ $(srcdir)/Include/cpython/dictobject.h \ $(srcdir)/Include/cpython/fileobject.h \ $(srcdir)/Include/cpython/initconfig.h \ $(srcdir)/Include/cpython/interpreteridobject.h \ $(srcdir)/Include/cpython/object.h \ $(srcdir)/Include/cpython/objimpl.h \ $(srcdir)/Include/cpython/pyerrors.h \ $(srcdir)/Include/cpython/pylifecycle.h \ $(srcdir)/Include/cpython/pymem.h \ $(srcdir)/Include/cpython/pystate.h \ $(srcdir)/Include/cpython/sysmodule.h \ $(srcdir)/Include/cpython/traceback.h \ $(srcdir)/Include/cpython/tupleobject.h \ $(srcdir)/Include/cpython/unicodeobject.h \ \ $(srcdir)/Include/internal/pycore_accu.h \ $(srcdir)/Include/internal/pycore_atomic.h \ $(srcdir)/Include/internal/pycore_ceval.h \ $(srcdir)/Include/internal/pycore_code.h \ $(srcdir)/Include/internal/pycore_condvar.h \ $(srcdir)/Include/internal/pycore_context.h \ $(srcdir)/Include/internal/pycore_fileutils.h \ $(srcdir)/Include/internal/pycore_getopt.h \ $(srcdir)/Include/internal/pycore_gil.h \ $(srcdir)/Include/internal/pycore_hamt.h \ $(srcdir)/Include/internal/pycore_initconfig.h \ $(srcdir)/Include/internal/pycore_object.h \ $(srcdir)/Include/internal/pycore_pathconfig.h \ $(srcdir)/Include/internal/pycore_pyerrors.h \ $(srcdir)/Include/internal/pycore_pyhash.h \ $(srcdir)/Include/internal/pycore_pylifecycle.h \ $(srcdir)/Include/internal/pycore_pymem.h \ $(srcdir)/Include/internal/pycore_pystate.h \ $(srcdir)/Include/internal/pycore_shadow_frame.h \ $(srcdir)/Include/internal/pycore_shadow_frame_struct.h \ $(srcdir)/Include/internal/pycore_shadowcode.h \ $(srcdir)/Include/internal/pycore_traceback.h \ $(srcdir)/Include/internal/pycore_tupleobject.h \ $(srcdir)/Include/internal/pycore_warnings.h \ $(srcdir)/Include/internal/pycore_unionobject.h \ $(JIT_HEADERS) \ $(JIT_PUBLIC_HEADERS) \ $(STRICTM_HEADERS) \ $(STRICTM_PUBLIC_HEADERS) $(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS) $(I386_DASM_HEADERS) $(JSON_HEADERS) $(JIT_OBJS): $(JIT_HEADERS) $(STRICTM_OBJS): $(STRICTM_HEADERS) ###################################################################### TESTOPTS= $(EXTRATESTOPTS) TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS) TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py TESTRUNNERPYCOMPILER= $(TESTPYTHON) -X usepycompiler $(srcdir)/Tools/scripts/run_tests.py TESTTIMEOUT= 1200 .PHONY: test testall testuniversal buildbottest pythoninfo # Remove "test_python_*" directories of previous failed test jobs. # Pass TESTOPTS options because it can contain --tempdir option. cleantest: build_all $(TESTRUNNER) $(TESTOPTS) --cleanup # Run a basic set of regression tests. # This excludes some tests that are particularly resource-intensive. test: @DEF_MAKE_RULE@ platform $(TESTRUNNER) $(TESTOPTS) # Run the full test suite twice - once without .pyc files, and once with. # In the past, we've had problems where bugs in the marshalling or # elsewhere caused bytecode read from .pyc files to behave differently # than bytecode generated directly from a .py source file. Sometimes # the bytecode read from a .pyc file had the bug, sometimes the directly # generated bytecode. This is sometimes a very shy bug needing a lot of # sample data. testall: @DEF_MAKE_RULE@ platform -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f $(TESTPYTHON) -E $(srcdir)/Lib/compileall.py -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f -$(TESTRUNNER) -u all $(TESTOPTS) $(TESTRUNNER) -u all $(TESTOPTS) # Run the test suite for both architectures in a Universal build on OSX. # Must be run on an Intel box. testuniversal: @DEF_MAKE_RULE@ platform @if [ `arch` != 'i386' ]; then \ echo "This can only be used on OSX/i386" ;\ exit 1 ;\ fi $(TESTRUNNER) -u all $(TESTOPTS) $(RUNSHARED) /usr/libexec/oah/translate \ ./$(BUILDPYTHON) -E -m test -j 0 -u all $(TESTOPTS) # Like testall, but with only one pass and without multiple processes. # Run an optional script to include information about the build environment. buildbottest: build_all platform -@if which pybuildbot.identify >/dev/null 2>&1; then \ pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \ fi $(TESTRUNNER) -j 1 -u all -W --slowest --fail-env-changed --timeout=$(TESTTIMEOUT) $(TESTOPTS) pythoninfo: build_all $(RUNSHARED) ./$(BUILDPYTHON) -m test.pythoninfo QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \ test_multibytecodec test_urllib2_localnet test_itertools \ test_multiprocessing_fork test_multiprocessing_spawn \ test_multiprocessing_forkserver \ test_mailbox test_socket test_poll \ test_select test_zipfile test_concurrent_futures quicktest: @DEF_MAKE_RULE@ platform $(TESTRUNNER) $(QUICKTESTOPTS) # Exclude tests that will not pass on devservers because of environmental restrictions # (e.g. lack of outbound network access). DEV_SKIP_TESTS = $(srcdir)/Tools/scripts/devserver_skip_tests.txt # Exclude tests that are currently broken for refleak check REFLEAK_SKIP_TESTS = $(srcdir)/Tools/scripts/refleak_skip_tests.txt ASAN_SKIP_TESTS= ifneq ($(strip $(ASAN_TEST_ENV)),) ASAN_SKIP_TESTS = $(srcdir)/Tools/scripts/asan_skip_tests.txt endif TESTCINDEROPTS= $(TESTOPTS) -x $$(cat $(DEV_SKIP_TESTS) $(ASAN_SKIP_TESTS)) TESTCINDER_REFLEAK_OPTS= $(TESTOPTS) -x $$(cat $(DEV_SKIP_TESTS)) --ignorefile $(REFLEAK_SKIP_TESTS) -R : ifneq ($(strip $(USE_RR)),) JIT_TEST_RR_ARGS=--use-rr endif ifneq ($(strip $(RECORDING_METADATA_PATH)),) JIT_TEST_RR_ARGS += --recording-metadata-path=$(strip $(RECORDING_METADATA_PATH)) endif JIT_TEST_RUNNER=$(srcdir)/Tools/scripts/jit_test_runner.py dispatcher $(JIT_TEST_RUNNER_ARGS) $(JIT_TEST_RR_ARGS) -- -w testcinder: @DEF_MAKE_RULE@ platform $(ASAN_TEST_ENV)$(TESTRUNNER) $(TESTCINDEROPTS) $(ASAN_TEST_ENV)$(TESTRUNNERPYCOMPILER) $(TESTCINDEROPTS) testcinder_jit: @DEF_MAKE_RULE@ platform $(ASAN_TEST_ENV)$(TESTPYTHON) -X jit $(JIT_TEST_RUNNER) $(TESTOPTS) $(ASAN_TEST_ENV)$(TESTPYTHON) -X usepycompiler -X jit $(JIT_TEST_RUNNER) $(TESTOPTS) # TODO re-enable when it doesn't crash on exit # $(ASAN_TEST_ENV)$(TESTPYTHON) -X jit -X jit-multithreaded-compile-test -X jit-batch-compile-workers=10 $(srcdir)/Lib/test/multithreaded_compile_test.py $(TESTOPTS) testcinder_jit_shadowframe: @DEF_MAKE_RULE@ platform $(ASAN_TEST_ENV)$(TESTPYTHON) -X jit -X jit-shadow-frame $(JIT_TEST_RUNNER) $(TESTOPTS) $(ASAN_TEST_ENV)$(TESTPYTHON) -X usepycompiler -X jit -X jit-shadow-frame $(JIT_TEST_RUNNER) $(TESTOPTS) # TODO re-enable when it doesn't crash on exit # $(ASAN_TEST_ENV)$(TESTPYTHON) -X jit -X jit-shadow-frame -X jit-multithreaded-compile-test -X jit-batch-compile-workers=10 $(srcdir)/Lib/test/multithreaded_compile_test.py $(TESTOPTS) testcinder_jit_inliner: @DEF_MAKE_RULE@ platform $(ASAN_TEST_ENV)$(TESTPYTHON) -X jit -X jit-enable-hir-inliner $(JIT_TEST_RUNNER) $(TESTOPTS) $(ASAN_TEST_ENV)$(TESTPYTHON) -X usepycompiler -X jit -X jit-enable-hir-inliner $(JIT_TEST_RUNNER) $(TESTOPTS) # TODO re-enable when it doesn't crash on exit # $(ASAN_TEST_ENV)$(TESTPYTHON) -X jit -X jit-enable-hir-inliner -X jit-multithreaded-compile-test -X jit-batch-compile-workers=10 $(srcdir)/Lib/test/multithreaded_compile_test.py testcinder_jit_shadowframe_inliner: @DEF_MAKE_RULE@ platform $(ASAN_TEST_ENV)$(TESTPYTHON) -X jit -X jit-shadow-frame -X jit-enable-hir-inliner $(JIT_TEST_RUNNER) $(TESTOPTS) $(ASAN_TEST_ENV)$(TESTPYTHON) -X usepycompiler -X jit -X jit-shadow-frame -X jit-enable-hir-inliner $(JIT_TEST_RUNNER) $(TESTOPTS) # TODO re-enable when it doesn't crash on exit # $(ASAN_TEST_ENV)$(TESTPYTHON) -X jit -X jit-shadow-frame -X jit-enable-hir-inliner -X jit-multithreaded-compile-test -X jit-batch-compile-workers=10 $(srcdir)/Lib/test/multithreaded_compile_test.py testcinder_refleak: @DEF_MAKE_RULE@ platform $(ASAN_TEST_ENV)$(TESTRUNNER) $(TESTCINDER_REFLEAK_OPTS) $(ASAN_TEST_ENV)$(TESTRUNNERPYCOMPILER) $(TESTCINDER_REFLEAK_OPTS) # SSL tests .PHONY: multisslcompile multissltest multisslcompile: build_all $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/ssl/multissltests.py --steps=modules multissltest: build_all $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/ssl/multissltests.py install: @FRAMEWORKINSTALLFIRST@ commoninstall bininstall maninstall @FRAMEWORKINSTALLLAST@ if test "x$(ENSUREPIP)" != "xno" ; then \ case $(ENSUREPIP) in \ upgrade) ensurepip="--upgrade" ;; \ install|*) ensurepip="" ;; \ esac; \ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ $$ensurepip --root=$(DESTDIR)/ ; \ fi altinstall: commoninstall if test "x$(ENSUREPIP)" != "xno" ; then \ case $(ENSUREPIP) in \ upgrade) ensurepip="--altinstall --upgrade" ;; \ install|*) ensurepip="--altinstall" ;; \ esac; \ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ $$ensurepip --root=$(DESTDIR)/ ; \ fi commoninstall: check-clean-src @FRAMEWORKALTINSTALLFIRST@ \ altbininstall libinstall inclinstall libainstall \ sharedinstall oldsharedinstall altmaninstall \ @FRAMEWORKALTINSTALLLAST@ # Install shared libraries enabled by Setup DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED) oldsharedinstall: $(DESTSHARED) $(SHAREDMODS) @for i in X $(SHAREDMODS); do \ if test $$i != X; then \ echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \ $(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/`basename $$i`; \ fi; \ done $(DESTSHARED): @for i in $(DESTDIRS); \ do \ if test ! -d $(DESTDIR)$$i; then \ echo "Creating directory $$i"; \ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ else true; \ fi; \ done # Install the interpreter with $(VERSION) affixed # This goes into $(exec_prefix) altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@ @for i in $(BINDIR) $(LIBDIR); \ do \ if test ! -d $(DESTDIR)$$i; then \ echo "Creating directory $$i"; \ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ else true; \ fi; \ done if test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \ $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \ else \ $(INSTALL_PROGRAM) $(STRIPFLAG) Mac/pythonw $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \ fi -if test "$(VERSION)" != "$(LDVERSION)"; then \ if test -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE) -o -h $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \ then rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \ fi; \ (cd $(DESTDIR)$(BINDIR); $(LN) python$(LDVERSION)$(EXE) python$(VERSION)$(EXE)); \ fi if test -f $(LDLIBRARY) && test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \ if test -n "$(DLLLIBRARY)" ; then \ $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \ else \ $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \ if test $(LDLIBRARY) != $(INSTSONAME); then \ (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) $(LDLIBRARY)) \ fi \ fi; \ if test -n "$(PY3LIBRARY)"; then \ $(INSTALL_SHARED) $(PY3LIBRARY) $(DESTDIR)$(LIBDIR)/$(PY3LIBRARY); \ fi; \ else true; \ fi if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \ rm -f $(DESTDIR)$(BINDIR)python$(VERSION)-32$(EXE); \ lipo $(LIPO_32BIT_FLAGS) \ -output $(DESTDIR)$(BINDIR)/python$(VERSION)-32$(EXE) \ $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \ fi bininstall: altbininstall if test ! -d $(DESTDIR)$(LIBPC); then \ echo "Creating directory $(LIBPC)"; \ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC); \ fi -if test -f $(DESTDIR)$(BINDIR)/python3$(EXE) -o -h $(DESTDIR)$(BINDIR)/python3$(EXE); \ then rm -f $(DESTDIR)$(BINDIR)/python3$(EXE); \ else true; \ fi (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) python3$(EXE)) -if test "$(VERSION)" != "$(LDVERSION)"; then \ rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config; \ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(LDVERSION)-config python$(VERSION)-config); \ rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc; \ (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python-$(LDVERSION).pc); \ rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION)-embed.pc; \ (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python-$(LDVERSION)-embed.pc); \ fi -rm -f $(DESTDIR)$(BINDIR)/python3-config (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config) -rm -f $(DESTDIR)$(LIBPC)/python3.pc (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc) -rm -f $(DESTDIR)$(LIBPC)/python3-embed.pc (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python3-embed.pc) -rm -f $(DESTDIR)$(BINDIR)/idle3 (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3) -rm -f $(DESTDIR)$(BINDIR)/pydoc3 (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) -rm -f $(DESTDIR)$(BINDIR)/2to3 (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3) if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \ rm -f $(DESTDIR)$(BINDIR)/python3-32$(EXE); \ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-32$(EXE) python3-32$(EXE)) \ fi # Install the versioned manual page altmaninstall: @for i in $(MANDIR) $(MANDIR)/man1; \ do \ if test ! -d $(DESTDIR)$$i; then \ echo "Creating directory $$i"; \ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ else true; \ fi; \ done $(INSTALL_DATA) $(srcdir)/Misc/python.man \ $(DESTDIR)$(MANDIR)/man1/python$(VERSION).1 # Install the unversioned manual page maninstall: altmaninstall -rm -f $(DESTDIR)$(MANDIR)/man1/python3.1 (cd $(DESTDIR)$(MANDIR)/man1; $(LN) -s python$(VERSION).1 python3.1) # Install the library XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ tkinter/test/test_ttk site-packages test \ test/audiodata \ test/capath test/data \ test/cjkencodings test/decimaltestdata \ test/xmltestdata test/xmltestdata/c14n-20 \ test/dtracedata \ test/eintrdata \ test/imghdrdata \ test/libregrtest \ test/subprocessdata test/sndhdrdata test/support \ test/tracedmodules test/encoded_modules \ test/test_import \ test/test_import/data \ test/test_import/data/circular_imports \ test/test_import/data/circular_imports/subpkg \ test/test_import/data/package \ test/test_import/data/package2 \ test/test_import/data/unwritable \ importlib \ importlib/metadata \ test/test_importlib \ test/test_importlib/builtin \ test/test_importlib/data \ test/test_importlib/data01 \ test/test_importlib/data01/subdirectory \ test/test_importlib/data02 \ test/test_importlib/data02/one \ test/test_importlib/data02/two \ test/test_importlib/data03 \ test/test_importlib/data03/namespace \ test/test_importlib/data03/namespace/portion1 \ test/test_importlib/data03/namespace/portion2 \ test/test_importlib/extension \ test/test_importlib/frozen \ test/test_importlib/import_ \ test/test_importlib/namespace_pkgs \ test/test_importlib/namespace_pkgs/both_portions \ test/test_importlib/namespace_pkgs/both_portions/foo \ test/test_importlib/namespace_pkgs/module_and_namespace_package \ test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \ test/test_importlib/namespace_pkgs/not_a_namespace_pkg \ test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo \ test/test_importlib/namespace_pkgs/portion1 \ test/test_importlib/namespace_pkgs/portion1/foo \ test/test_importlib/namespace_pkgs/portion2 \ test/test_importlib/namespace_pkgs/portion2/foo \ test/test_importlib/namespace_pkgs/project1 \ test/test_importlib/namespace_pkgs/project1/parent \ test/test_importlib/namespace_pkgs/project1/parent/child \ test/test_importlib/namespace_pkgs/project2 \ test/test_importlib/namespace_pkgs/project2/parent \ test/test_importlib/namespace_pkgs/project2/parent/child \ test/test_importlib/namespace_pkgs/project3 \ test/test_importlib/namespace_pkgs/project3/parent \ test/test_importlib/namespace_pkgs/project3/parent/child \ test/test_importlib/source \ test/test_importlib/zipdata01 \ test/test_importlib/zipdata02 \ test/ziptestdata \ asyncio \ test/test_asyncio \ collections concurrent concurrent/futures encodings \ email email/mime test/test_email test/test_email/data \ ensurepip ensurepip/_bundled \ html json test/test_json http dbm xmlrpc \ sqlite3 sqlite3/test \ logging csv wsgiref urllib \ lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \ lib2to3/tests/data lib2to3/tests/data/fixers \ lib2to3/tests/data/fixers/myfixes \ ctypes ctypes/test ctypes/macholib \ idlelib idlelib/Icons idlelib/idle_test \ distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \ test/test_tools test/test_warnings test/test_warnings/data \ turtledemo \ multiprocessing multiprocessing/dummy \ unittest unittest/test unittest/test/testmock \ venv venv/scripts venv/scripts/common venv/scripts/posix \ curses pydoc_data compiler compiler/py38 compiler/static __static__ \ compiler/readonly compiler/strict compiler/strict/rewriter __strict__ \ compiler/strict/stubs compiler/strict/stubs/asyncio compiler/strict/stubs/collections libinstall: build_all $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ if test ! -d $(DESTDIR)$$i; then \ echo "Creating directory $$i"; \ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ else true; \ fi; \ done @for d in $(LIBSUBDIRS); \ do \ a=$(srcdir)/Lib/$$d; \ if test ! -d $$a; then continue; else true; fi; \ b=$(LIBDEST)/$$d; \ if test ! -d $(DESTDIR)$$b; then \ echo "Creating directory $$b"; \ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \ else true; \ fi; \ done @for i in $(srcdir)/Lib/*.py; \ do \ if test -x $$i; then \ $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \ echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \ else \ $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \ echo $(INSTALL_DATA) $$i $(LIBDEST); \ fi; \ done @for d in $(LIBSUBDIRS); \ do \ a=$(srcdir)/Lib/$$d; \ if test ! -d $$a; then continue; else true; fi; \ if test `ls $$a | wc -l` -lt 1; then continue; fi; \ b=$(LIBDEST)/$$d; \ for i in $$a/*; \ do \ case $$i in \ *CVS) ;; \ *.py[co]) ;; \ *.orig) ;; \ *~) ;; \ *) \ if test -d $$i; then continue; fi; \ if test -x $$i; then \ echo $(INSTALL_SCRIPT) $$i $$b; \ $(INSTALL_SCRIPT) $$i $(DESTDIR)$$b; \ else \ echo $(INSTALL_DATA) $$i $$b; \ $(INSTALL_DATA) $$i $(DESTDIR)$$b; \ fi;; \ esac; \ done; \ done $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \ $(DESTDIR)$(LIBDEST); \ $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ $(DESTDIR)$(LIBDEST)/distutils/tests ; \ fi -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -j0 -d $(LIBDEST) -f \ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ $(DESTDIR)$(LIBDEST) -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ -j0 -d $(LIBDEST) -f \ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ $(DESTDIR)$(LIBDEST) -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \ -j0 -d $(LIBDEST) -f \ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ $(DESTDIR)$(LIBDEST) -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -j0 -d $(LIBDEST)/site-packages -f \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ -j0 -d $(LIBDEST)/site-packages -f \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \ -j0 -d $(LIBDEST)/site-packages -f \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt # bpo-21536: Misc/python-config.sh is generated in the build directory # from $(srcdir)Misc/python-config.sh.in. python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh @ # Substitution happens here, as the completely-expanded BINDIR @ # is not available in configure sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py @ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config @ # On Darwin, always use the python version of the script, the shell @ # version doesn't use the compiler customizations that are provided @ # in python (_osx_support.py). @if test `uname -s` = Darwin; then \ cp python-config.py python-config; \ fi # Install the include files INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY) inclinstall: @for i in $(INCLDIRSTOMAKE); \ do \ if test ! -d $(DESTDIR)$$i; then \ echo "Creating directory $$i"; \ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ else true; \ fi; \ done @if test ! -d $(DESTDIR)$(INCLUDEPY)/cpython; then \ echo "Creating directory $(DESTDIR)$(INCLUDEPY)/cpython"; \ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(INCLUDEPY)/cpython; \ else true; \ fi @if test ! -d $(DESTDIR)$(INCLUDEPY)/internal; then \ echo "Creating directory $(DESTDIR)$(INCLUDEPY)/internal"; \ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(INCLUDEPY)/internal; \ else true; \ fi @for i in $(srcdir)/Include/*.h; \ do \ echo $(INSTALL_DATA) $$i $(INCLUDEPY); \ $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \ done @for i in $(srcdir)/Include/cpython/*.h; \ do \ echo $(INSTALL_DATA) $$i $(INCLUDEPY)/cpython; \ $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY)/cpython; \ done @for i in $(srcdir)/Include/internal/*.h; \ do \ echo $(INSTALL_DATA) $$i $(INCLUDEPY)/internal; \ $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY)/internal; \ done $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h # Install the library and miscellaneous stuff needed for extending/embedding # This goes into $(exec_prefix) LIBPL= @LIBPL@ # pkgconfig directory LIBPC= $(LIBDIR)/pkgconfig libainstall: @DEF_MAKE_RULE@ python-config @for i in $(LIBDIR) $(LIBPL) $(LIBPC); \ do \ if test ! -d $(DESTDIR)$$i; then \ echo "Creating directory $$i"; \ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ else true; \ fi; \ done @if test -d $(LIBRARY); then :; else \ if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ if test "$(SHLIB_SUFFIX)" = .dll; then \ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ else \ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ fi; \ else \ echo Skip install of $(LIBRARY) - use make frameworkinstall; \ fi; \ fi $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile $(INSTALL_DATA) $(srcdir)/Modules/Setup $(DESTDIR)$(LIBPL)/Setup $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc $(INSTALL_DATA) Misc/python-embed.pc $(DESTDIR)$(LIBPC)/python-$(VERSION)-embed.pc $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh $(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config @if [ -s Modules/python.exp -a \ "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \ echo; echo "Installing support files for building shared extension modules on AIX:"; \ $(INSTALL_DATA) Modules/python.exp \ $(DESTDIR)$(LIBPL)/python.exp; \ echo; echo "$(LIBPL)/python.exp"; \ $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \ $(DESTDIR)$(LIBPL)/makexp_aix; \ echo "$(LIBPL)/makexp_aix"; \ $(INSTALL_SCRIPT) Modules/ld_so_aix \ $(DESTDIR)$(LIBPL)/ld_so_aix; \ echo "$(LIBPL)/ld_so_aix"; \ echo; echo "See Misc/AIX-NOTES for details."; \ else true; \ fi # Install the dynamically loadable modules # This goes into $(exec_prefix) sharedinstall: sharedmods $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ --prefix=$(prefix) \ --install-scripts=$(BINDIR) \ --install-platlib=$(DESTSHARED) \ --root=$(DESTDIR)/ -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py -rm -r $(DESTDIR)$(DESTSHARED)/__pycache__ # Here are a couple of targets for MacOSX again, to install a full # framework-based Python. frameworkinstall installs everything, the # subtargets install specific parts. Much of the actual work is offloaded to # the Makefile in Mac # # # This target is here for backward compatibility, previous versions of Python # hadn't integrated framework installation in the normal install process. frameworkinstall: install # On install, we re-make the framework # structure in the install location, /Library/Frameworks/ or the argument to # --enable-framework. If --enable-framework has been specified then we have # automatically set prefix to the location deep down in the framework, so we # only have to cater for the structural bits of the framework. frameworkinstallframework: frameworkinstallstructure install frameworkinstallmaclib frameworkinstallstructure: $(LDLIBRARY) @if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ echo Not configured with --enable-framework; \ exit 1; \ else true; \ fi @for i in $(prefix)/Resources/English.lproj $(prefix)/lib; do\ if test ! -d $(DESTDIR)$$i; then \ echo "Creating directory $(DESTDIR)$$i"; \ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ else true; \ fi; \ done $(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK) $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers $(LN) -fsn Versions/Current/Resources $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Resources $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(PYTHONFRAMEWORKPREFIX)/$(LDLIBRARY) # This installs Mac/Lib into the framework # Install a number of symlinks to keep software that expects a normal unix # install (which includes python-config) happy. frameworkinstallmaclib: $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).a" $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).dylib" $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).a" $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).dylib" $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(LDVERSION).dylib" $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(VERSION).dylib" # This installs the IDE, the Launcher and other apps into /Applications frameworkinstallapps: cd Mac && $(MAKE) installapps DESTDIR="$(DESTDIR)" # Build the bootstrap executable that will spawn the interpreter inside # an app bundle within the framework. This allows the interpreter to # run OS X GUI APIs. frameworkpythonw: cd Mac && $(MAKE) pythonw # This installs the python* and other bin symlinks in $prefix/bin or in # a bin directory relative to the framework root frameworkinstallunixtools: cd Mac && $(MAKE) installunixtools DESTDIR="$(DESTDIR)" frameworkaltinstallunixtools: cd Mac && $(MAKE) altinstallunixtools DESTDIR="$(DESTDIR)" # This installs the Tools into the applications directory. # It is not part of a normal frameworkinstall frameworkinstallextras: cd Mac && $(MAKE) installextras DESTDIR="$(DESTDIR)" # Build the toplevel Makefile Makefile.pre: $(srcdir)/Makefile.pre.in config.status CONFIG_FILES=Makefile.pre CONFIG_HEADERS= $(SHELL) config.status $(MAKE) -f Makefile.pre Makefile # Run the configure script. config.status: $(srcdir)/configure $(SHELL) $(srcdir)/configure $(CONFIG_ARGS) .PRECIOUS: config.status $(BUILDPYTHON) Makefile Makefile.pre # Some make's put the object file in the current directory .c.o: $(V)$(CC) -c $(PY_CORE_CFLAGS) -o $@ $< .cpp.o: $(V)$(CXX) -c $(PY_CORE_CXXFLAGS) -o $@ $< # bpo-30104: dtoa.c uses union to cast double to unsigned long[2]. clang 4.0 # with -O2 or higher and strict aliasing miscompiles the ratio() function # causing rounding issues. Compile dtoa.c using -fno-strict-aliasing on clang. # https://bugs.llvm.org//show_bug.cgi?id=31928 Python/dtoa.o: Python/dtoa.c $(V)$(CC) -c $(PY_CORE_CFLAGS) $(CFLAGS_ALIASING) -o $@ $< # Run reindent on the library reindent: ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib # Rerun configure with the same options as it was run last time, # provided the config.status script exists recheck: $(SHELL) config.status --recheck $(SHELL) config.status # Regenerate configure and pyconfig.h.in .PHONY: autoconf autoconf: # Regenerate the configure script from configure.ac using autoconf (cd $(srcdir); autoconf -Wall) # Regenerate pyconfig.h.in from configure.ac using autoheader (cd $(srcdir); autoheader -Wall) # Create a tags file for vi tags:: ctags -w $(srcdir)/Include/*.h $(srcdir)/Include/cpython/*.h $(srcdir)/Include/internal/*.h for i in $(SRCDIRS); do ctags -f tags -w -a $(srcdir)/$$i/*.[ch]; done ctags -f tags -w -a $(srcdir)/Modules/_ctypes/*.[ch] find $(srcdir)/Lib -type f -name "*.py" -not -name "test_*.py" -not -path "*/test/*" -not -path "*/tests/*" -not -path "*/*_test/*" | ctags -f tags -w -a -L - LC_ALL=C sort -o tags tags # Create a tags file for GNU Emacs TAGS:: cd $(srcdir); \ etags Include/*.h Include/cpython/*.h Include/internal/*.h; \ for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done etags -a $(srcdir)/Modules/_ctypes/*.[ch] find $(srcdir)/Lib -type f -name "*.py" -not -name "test_*.py" -not -path "*/test/*" -not -path "*/tests/*" -not -path "*/*_test/*" | etags - -a # Sanitation targets -- clean leaves libraries, executables and tags # files, which clobber removes as well pycremoval: -find $(srcdir) -depth -name '__pycache__' -exec rm -rf {} ';' -find $(srcdir) -name '*.py[co]' -exec rm -f {} ';' rmtestturds: -rm -f *BAD *GOOD *SKIPPED -rm -rf OUT -rm -f *.TXT -rm -f *.txt -rm -f gb-18030-2000.xml docclean: -rm -rf Doc/build -rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils clean: pycremoval find . -name '*.[oa]' -exec rm -f {} ';' find . -name '*.s[ol]' -exec rm -f {} ';' find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';' find build -name 'fficonfig.h' -exec rm -f {} ';' || true find build -name '*.py' -exec rm -f {} ';' || true find build -name '*.py[co]' -exec rm -f {} ';' || true -rm -f pybuilddir.txt -rm -f Lib/lib2to3/*Grammar*.pickle -rm -f Programs/_testembed Programs/_freeze_importlib -find build -type f -a ! -name '*.gc??' -exec rm -f {} ';' -rm -f Include/pydtrace_probes_ceval.h -rm -f Include/pydtrace_probes_gcmodule.h -rm -f Include/pydtrace_probes_import.h -rm -f profile-gen-stamp profile-removal: find . -name '*.gc??' -exec rm -f {} ';' find . -name '*.profclang?' -exec rm -f {} ';' find . -name '*.dyn' -exec rm -f {} ';' rm -f $(COVERAGE_INFO) rm -rf $(COVERAGE_REPORT) rm -f profile-run-stamp clobber: clean profile-removal -rm -f $(BUILDPYTHON) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \ tags TAGS \ config.cache config.log pyconfig.h Modules/config.c -rm -rf build platform -rm -rf $(PYTHONFRAMEWORKDIR) -rm -f python-config.py python-config -rm -f profile-gen-stamp profile-clean-stamp # Make things extra clean, before making a distribution: # remove all generated files, even Makefile[.pre] # Keep configure and Python-ast.[ch], it's possible they can't be generated distclean: clobber for file in $(srcdir)/Lib/test/data/* ; do \ if test "$$file" != "$(srcdir)/Lib/test/data/README"; then rm "$$file"; fi; \ done -rm -f core Makefile Makefile.pre config.status Modules/Setup.local \ Modules/ld_so_aix Modules/python.exp Misc/python.pc \ Misc/python-embed.pc Misc/python-config.sh -rm -f python*-gdb.py # Issue #28258: set LC_ALL to avoid issues with Estonian locale. # Expansion is performed here by shell (spawned by make) itself before # arguments are passed to find. So LC_ALL=C must be set as a separate # command. LC_ALL=C; find $(srcdir)/[a-zA-Z]* '(' -name '*.fdc' -o -name '*~' \ -o -name '[@,#]*' -o -name '*.old' \ -o -name '*.orig' -o -name '*.rej' \ -o -name '*.bak' ')' \ -exec rm -f {} ';' # Check that all symbols exported by libpython start with "Py" or "_Py" smelly: @DEF_MAKE_RULE@ $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/smelly.py # Find files with funny names funny: find $(SUBDIRS) $(SUBDIRSTOO) \ -type d \ -o -name '*.[chs]' \ -o -name '*.py' \ -o -name '*.pyw' \ -o -name '*.dat' \ -o -name '*.el' \ -o -name '*.fd' \ -o -name '*.in' \ -o -name '*.gif' \ -o -name '*.txt' \ -o -name '*.xml' \ -o -name '*.xbm' \ -o -name '*.xpm' \ -o -name '*.uue' \ -o -name '*.decTest' \ -o -name '*.tmCommand' \ -o -name '*.tmSnippet' \ -o -name 'Setup' \ -o -name 'Setup.*' \ -o -name README \ -o -name NEWS \ -o -name HISTORY \ -o -name Makefile \ -o -name ChangeLog \ -o -name .hgignore \ -o -name MANIFEST \ -o -print # Perform some verification checks on any modified files. patchcheck: @DEF_MAKE_RULE@ $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py # Dependencies Python/thread.o: @THREADHEADERS@ $(srcdir)/Python/condvar.h .PHONY: regen-jit regen-jit: $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/typed/generate_jit_type_h.py \ $(srcdir)/Jit/hir/type_generated.h.new $(UPDATE_FILE) $(srcdir)/Jit/hir/type_generated.h \ $(srcdir)/Jit/hir/type_generated.h.new # # Runtime tests and supporting infrastructure # # These are tests for private runtime components that are easier to write in C # ${GTEST_DIR}/libgtest.a: ${GTEST_SRCDIR}/src/gtest-all.cc $(VPRE)$(CXX) -std=c++11 -isystem ${GTEST_SRCDIR}/include -I${GTEST_SRCDIR} -pthread -c $< -o ${GTEST_DIR}/gtest-all.o $(V)ar -rv $@ ${GTEST_DIR}/gtest-all.o RUNTIME_TEST_HEADERS = \ ${RUNTIME_TESTS_SRCDIR}/fixtures.h \ ${RUNTIME_TESTS_SRCDIR}/testutil.h RUNTIME_TESTS_OBJS= \ ${RUNTIME_TESTS_DIR}/alias_class_test.o \ ${RUNTIME_TESTS_DIR}/backend_test.o \ ${RUNTIME_TESTS_DIR}/bitvector_test.o \ ${RUNTIME_TESTS_DIR}/block_canonicalizer_test.o \ ${RUNTIME_TESTS_DIR}/bytecode_test.o \ ${RUNTIME_TESTS_DIR}/cmdline_test.o \ ${RUNTIME_TESTS_DIR}/copy_graph_test.o \ ${RUNTIME_TESTS_DIR}/dataflow_test.o \ ${RUNTIME_TESTS_DIR}/deopt_patcher_test.o \ ${RUNTIME_TESTS_DIR}/deopt_test.o \ ${RUNTIME_TESTS_DIR}/fixtures.o \ ${RUNTIME_TESTS_DIR}/gen_asm_test.o \ ${RUNTIME_TESTS_DIR}/hir_analysis_test.o \ ${RUNTIME_TESTS_DIR}/hir_copy_propagation_test.o \ ${RUNTIME_TESTS_DIR}/hir_frame_state_test.o \ ${RUNTIME_TESTS_DIR}/hir_guard_test.o \ ${RUNTIME_TESTS_DIR}/hir_operand_type_test.o \ ${RUNTIME_TESTS_DIR}/hir_parser_test.o \ ${RUNTIME_TESTS_DIR}/hir_ssa_test.o \ ${RUNTIME_TESTS_DIR}/hir_test.o \ ${RUNTIME_TESTS_DIR}/hir_type_test.o \ ${RUNTIME_TESTS_DIR}/intrusive_list_test.o \ ${RUNTIME_TESTS_DIR}/jit_context_test.o \ ${RUNTIME_TESTS_DIR}/jit_flag_processor_test.o \ ${RUNTIME_TESTS_DIR}/jit_list_test.o \ ${RUNTIME_TESTS_DIR}/jit_time_log_test.o \ ${RUNTIME_TESTS_DIR}/lir_dce_test.o \ ${RUNTIME_TESTS_DIR}/lir_inliner_test.o \ ${RUNTIME_TESTS_DIR}/lir_postalloc_test.o \ ${RUNTIME_TESTS_DIR}/lir_rewrite_test.o \ ${RUNTIME_TESTS_DIR}/lir_verify_test.o \ ${RUNTIME_TESTS_DIR}/lir_test.o \ ${RUNTIME_TESTS_DIR}/live_type_map_test.o \ ${RUNTIME_TESTS_DIR}/main.o \ ${RUNTIME_TESTS_DIR}/ref_test.o \ ${RUNTIME_TESTS_DIR}/regalloc_test.o \ ${RUNTIME_TESTS_DIR}/sanity_test.o \ ${RUNTIME_TESTS_DIR}/slot_gen_test.o \ ${RUNTIME_TESTS_DIR}/switchboard_test.o \ ${RUNTIME_TESTS_DIR}/testutil.o \ ${RUNTIME_TESTS_DIR}/type_profiler_test.o \ ${RUNTIME_TESTS_DIR}/util_test.o STRICTM_TEST_HEADERS = \ ${STRICTM_TESTS_SRCDIR}/test.h \ ${STRICTM_TESTS_SRCDIR}/test_util.h STRICTM_TESTS_OBJS= \ ${STRICTM_TESTS_DIR}/parse_test.o \ ${STRICTM_TESTS_DIR}/analyzer_test.o \ ${STRICTM_TESTS_DIR}/module_loader_test.o \ ${STRICTM_TESTS_DIR}/scope_test.o \ ${STRICTM_TESTS_DIR}/test_util.o \ ${STRICTM_TESTS_DIR}/main.o $(RUNTIME_TESTS_OBJS): $(RUNTIME_TESTS_DIR)/%.o: $(RUNTIME_TESTS_SRCDIR)/%.cpp pyembed_includes: platform python-config $(V)./$(BUILDPYTHON) python-config.py --includes > pyembed_includes $(RUNTIME_TESTS_OBJS): $(RUNTIME_TESTS_DIR)/%.o: pyembed_includes $(RUNTIME_TEST_HEADERS) $(V)$(CXX) $(PY_CORE_CXXFLAGS) $(shell cat pyembed_includes) \ -isystem $(srcdir)/ThirdParty -isystem $(GTEST_SRCDIR)/include -c $(filter %.cpp,$^) -o $@ $(STRICTM_TESTS_OBJS): $(STRICTM_TESTS_DIR)/%.o: $(STRICTM_TESTS_SRCDIR)/%.cpp $(STRICTM_TESTS_OBJS): $(STRICTM_TESTS_DIR)/%.o: pyembed_includes $(STRICTM_TEST_HEADERS) $(V)$(CXX) $(PY_CORE_CXXFLAGS) $(shell cat pyembed_includes) \ -isystem $(srcdir)/ThirdParty -isystem $(GTEST_SRCDIR)/include -c $(filter %.cpp,$^) -o $@ runtime_tests: ${GTEST_DIR}/libgtest.a platform $(RUNTIME_TESTS_OBJS) $(JIT_HEADERS) $(BUILDPYTHON) $(eval PYEMBED_LIBS := $$(shell ./$(BUILDPYTHON) python-config.py --libs | sed -e "s/-lpython[^ ]*//")) $(V)$(CXX) -std=c++17 -I. -isystem ${GTEST_SRCDIR}/include -pthread \ $(RUNTIME_TESTS_OBJS) \ ${GTEST_DIR}/libgtest.a $(BLDLIBRARY) $(PY3LIBRARY) $(LINKFORSHARED) \ $(PY_DYNLISTFLAG) \ -o runtime_tests -ggdb -rdynamic $(PY_LDFLAGS) $(PYEMBED_LIBS) $(LRT_FLAG) testruntime: runtime_tests cd $(srcdir) && \ env PYTHONPATH=`cat $(abs_builddir)/pybuilddir.txt` $(ASAN_TEST_ENV_WITH_LSAN) \ ThirdParty/gtest-parallel/gtest-parallel \ $(abs_builddir)/runtime_tests testruntime_serial: runtime_tests cd $(srcdir) && \ env PYTHONPATH=`cat $(abs_builddir)/pybuilddir.txt` $(ASAN_TEST_ENV_WITH_LSAN) \ $(abs_builddir)/runtime_tests strict_module_tests: ${GTEST_DIR}/libgtest.a platform $(STRICTM_TESTS_OBJS) $(STRICTM_HEADERS) $(BUILDPYTHON) $(eval PYEMBED_LIBS := $$(shell ./$(BUILDPYTHON) python-config.py --libs | sed -e "s/-lpython[^ ]*//")) $(V)$(CXX) -std=c++17 -I. -isystem ${GTEST_SRCDIR}/include -pthread \ $(STRICTM_TESTS_OBJS) \ ${GTEST_DIR}/libgtest.a $(BLDLIBRARY) $(PY3LIBRARY) $(LINKFORSHARED) \ $(PY_DYNLISTFLAG) \ -o strict_module_tests -ggdb -rdynamic $(PY_LDFLAGS) $(PYEMBED_LIBS) $(LRT_FLAG) STRICTM_ASAN_SKIP_TESTS= ifneq ($(strip $(ASAN_TEST_ENV)),) STRICTM_ASAN_SKIP_TESTS = $(srcdir)/Tools/scripts/facebook/strictm_asan_skip_tests.txt endif test_strict_module: strict_module_tests cd $(srcdir) && \ env PYTHONPATH=`cat $(abs_builddir)/pybuilddir.txt` \ ThirdParty/gtest-parallel/gtest-parallel \ $(abs_builddir)/strict_module_tests -- $(STRICTM_ASAN_SKIP_TESTS) # asmjit ASMJIT_CXXFLAGS = # -DASMJIT_EMBED -DASMJIT_BUILD_X86 -DASMJIT_DISABLE_BUILDER -DASMJIT_DISABLE_LOGGING ${ASMJIT}/src/asmjit/base/%.o: ${ASMJIT}/src/asmjit/base/%.cpp $(V)$(CXX) $(CXXFLAGS) -I$(ASMJIT)/src/asmjit $(ASMJIT_CXXFLAGS) $< ${ASMJIT}/src/asmjit/x86/%.o: ${ASMJIT}/src/asmjit/x86/%.cpp $(V)$(CXX) $(CXXFLAGS) -I$(ASMJIT)/src/asmjit $(ASMJIT_CXXFLAGS) $< # Declare targets that aren't real files .PHONY: all build_all sharedmods check-clean-src oldsharedmods test quicktest .PHONY: install altinstall oldsharedinstall bininstall altbininstall .PHONY: maninstall libinstall inclinstall libainstall sharedinstall .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools .PHONY: frameworkaltinstallunixtools recheck clean clobber distclean .PHONY: smelly funny patchcheck touch altmaninstall commoninstall .PHONY: gdbhooks testcinder testcinder_jit testruntime # IF YOU PUT ANYTHING HERE IT WILL GO AWAY # Local Variables: # mode: makefile # End: