Advertisement
jakob1379

Untitled

Dec 17th, 2019
1,414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 72.91 KB | None | 0 0
  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. MODBUILT_NAMES=      posix  errno  pwd  _sre  _codecs  _weakref  _functools  _operator  _collections  _abc  itertools  atexit  _signal  _stat  time  _thread  _locale  _io  zipimport  faulthandler  _tracemalloc  _symtable  xxsubtype
  25. MODDISABLED_NAMES=
  26. MODOBJS=             Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/_weakref.o  Modules/_functoolsmodule.o  Modules/_operator.o  Modules/_collectionsmodule.o  Modules/_abc.o  Modules/itertoolsmodule.o  Modules/atexitmodule.o  Modules/signalmodule.o  Modules/_stat.o  Modules/timemodule.o  Modules/_threadmodule.o  Modules/_localemodule.o  Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o  Modules/zipimport.o  Modules/faulthandler.o  Modules/_tracemalloc.o Modules/hashtable.o  Modules/symtablemodule.o  Modules/xxsubtype.o
  27. MODLIBS=           $(LOCALMODLIBS) $(BASEMODLIBS)
  28.  
  29. # === Variables set by configure
  30. VERSION=    3.7
  31. srcdir=     .
  32.  
  33. abs_srcdir= /home/fuzie/Downloads/Python-3.7.5
  34. abs_builddir=   /home/fuzie/Downloads/Python-3.7.5
  35.  
  36.  
  37. CC=     gcc -pthread
  38. CXX=        g++ -pthread
  39. MAINCC=     $(CC)
  40. LINKCC=     $(PURIFY) $(MAINCC)
  41. AR=     ar
  42. READELF=    readelf
  43. SOABI=      cpython-37m-x86_64-linux-gnu
  44. LDVERSION=  $(VERSION)$(ABIFLAGS)
  45. GITVERSION=
  46. GITTAG=    
  47. GITBRANCH= 
  48. PGO_PROF_GEN_FLAG=-fprofile-generate
  49. PGO_PROF_USE_FLAG=-fprofile-use -fprofile-correction
  50. LLVM_PROF_MERGER=true
  51. LLVM_PROF_FILE=
  52. LLVM_PROF_ERR=no
  53. DTRACE=        
  54. DFLAGS=        
  55. DTRACE_HEADERS=
  56. DTRACE_OBJS=    
  57.  
  58. GNULD=      yes
  59.  
  60. # Shell used by make (some versions default to the login shell, which is bad)
  61. SHELL=      /bin/sh
  62.  
  63. # Use this to make a link between python$(VERSION) and python in $(BINDIR)
  64. LN=     ln
  65.  
  66. # Portable install script (configure doesn't always guess right)
  67. INSTALL=    /usr/bin/install -c
  68. INSTALL_PROGRAM=${INSTALL}
  69. INSTALL_SCRIPT= ${INSTALL}
  70. INSTALL_DATA=   ${INSTALL} -m 644
  71. # Shared libraries must be installed with executable mode on some systems;
  72. # rather than figuring out exactly which, we always give them executable mode.
  73. # Also, making them read-only seems to be a good idea...
  74. INSTALL_SHARED= ${INSTALL} -m 555
  75.  
  76. MKDIR_P=    /usr/bin/mkdir -p
  77.  
  78. MAKESETUP=      $(srcdir)/Modules/makesetup
  79.  
  80. # Compiler options
  81. OPT=        -DNDEBUG -g -fwrapv -O3 -Wall
  82. BASECFLAGS=  -Wno-unused-result -Wsign-compare
  83. BASECPPFLAGS=  
  84. CONFIGURE_CFLAGS=  
  85. # CFLAGS_NODIST is used for building the interpreter and stdlib C extensions.
  86. # Use it when a compiler flag should _not_ be part of the distutils CFLAGS
  87. # once Python is installed (Issue #21121).
  88. CONFIGURE_CFLAGS_NODIST= -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wno-cast-function-type -Werror=implicit-function-declaration
  89. # LDFLAGS_NODIST is used in the same manner as CFLAGS_NODIST.
  90. # Use it when a linker flag should _not_ be part of the distutils LDFLAGS
  91. # once Python is installed (bpo-35257)
  92. CONFIGURE_LDFLAGS_NODIST=
  93. CONFIGURE_CPPFLAGS=
  94. CONFIGURE_LDFLAGS= 
  95. # Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the
  96. # command line to append to these values without stomping the pre-set
  97. # values.
  98. PY_CFLAGS=  $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
  99. PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST)
  100. # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
  101. # be able to build extension modules using the directories specified in the
  102. # environment variables
  103. PY_CPPFLAGS=    $(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)
  104. PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS)
  105. PY_LDFLAGS_NODIST=$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST)
  106. NO_AS_NEEDED=   -Wl,--no-as-needed
  107. LDLAST=    
  108. SGI_ABI=    @SGI_ABI@
  109. CCSHARED=   -fPIC
  110. # LINKFORSHARED are the flags passed to the $(CC) command that links
  111. # the python executable -- this is only needed for a few systems
  112. LINKFORSHARED=  -Xlinker -export-dynamic
  113. ARFLAGS=    rcs
  114. # Extra C flags added for building the interpreter object files.
  115. CFLAGSFORSHARED=
  116. # C flags used for building the interpreter object files
  117. PY_STDMODULE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED)
  118. PY_BUILTIN_MODULE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN
  119. PY_CORE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE
  120. # Linker flags used for building the interpreter object files
  121. PY_CORE_LDFLAGS=$(PY_LDFLAGS) $(PY_LDFLAGS_NODIST)
  122. # Strict or non-strict aliasing flags used to compile dtoa.c, see above
  123. CFLAGS_ALIASING=
  124.  
  125.  
  126. # Machine-dependent subdirectories
  127. MACHDEP=    linux
  128.  
  129. # Multiarch directory (may be empty)
  130. MULTIARCH=  x86_64-linux-gnu
  131. MULTIARCH_CPPFLAGS = -DMULTIARCH=\"x86_64-linux-gnu\"
  132.  
  133. # Install prefix for architecture-independent files
  134. prefix=     /usr/local
  135.  
  136. # Install prefix for architecture-dependent files
  137. exec_prefix=    ${prefix}
  138.  
  139. # Install prefix for data files
  140. datarootdir=    ${prefix}/share
  141.  
  142. # Expanded directories
  143. BINDIR=     ${exec_prefix}/bin
  144. LIBDIR=     ${exec_prefix}/lib
  145. MANDIR=     ${datarootdir}/man
  146. INCLUDEDIR= ${prefix}/include
  147. CONFINCLUDEDIR= $(exec_prefix)/include
  148. SCRIPTDIR=  $(prefix)/lib
  149. ABIFLAGS=   m
  150.  
  151. # Detailed destination directories
  152. BINLIBDEST= $(LIBDIR)/python$(VERSION)
  153. LIBDEST=    $(SCRIPTDIR)/python$(VERSION)
  154. INCLUDEPY=  $(INCLUDEDIR)/python$(LDVERSION)
  155. CONFINCLUDEPY=  $(CONFINCLUDEDIR)/python$(LDVERSION)
  156.  
  157. # Symbols used for using shared libraries
  158. SHLIB_SUFFIX=   .so
  159. EXT_SUFFIX= .cpython-37m-x86_64-linux-gnu.so
  160. LDSHARED=   $(CC) -shared $(PY_LDFLAGS)
  161. BLDSHARED=  $(CC) -shared $(PY_CORE_LDFLAGS)
  162. LDCXXSHARED=    $(CXX) -shared
  163. DESTSHARED= $(BINLIBDEST)/lib-dynload
  164.  
  165. # Executable suffix (.exe on Windows and Mac OS X)
  166. EXE=       
  167. BUILDEXE=  
  168.  
  169. # Short name and location for Mac OS X Python framework
  170. UNIVERSALSDK=
  171. PYTHONFRAMEWORK=   
  172. PYTHONFRAMEWORKDIR= no-framework
  173. PYTHONFRAMEWORKPREFIX= 
  174. PYTHONFRAMEWORKINSTALLDIR=
  175. # Deployment target selected during configure, to be checked
  176. # by distutils. The export statement is needed to ensure that the
  177. # deployment target is active during build.
  178. MACOSX_DEPLOYMENT_TARGET=
  179. #export MACOSX_DEPLOYMENT_TARGET
  180.  
  181. # Option to install to strip binaries
  182. STRIPFLAG=-s
  183.  
  184. # Flags to lipo to produce a 32-bit-only universal executable
  185. LIPO_32BIT_FLAGS=
  186.  
  187. # Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
  188. OTHER_LIBTOOL_OPT=
  189.  
  190. # Environment to run shared python without installed libraries
  191. RUNSHARED=      
  192.  
  193. # ensurepip options
  194. ENSUREPIP=      upgrade
  195.  
  196. # OpenSSL options for setup.py so sysconfig can pick up AC_SUBST() vars.
  197. OPENSSL_INCLUDES=
  198. OPENSSL_LIBS=-lssl -lcrypto
  199. OPENSSL_LDFLAGS=
  200.  
  201. # Modes for directories, executables and data files created by the
  202. # install process.  Default to user-only-writable for all file types.
  203. DIRMODE=    755
  204. EXEMODE=    755
  205. FILEMODE=   644
  206.  
  207. # configure script arguments
  208. CONFIG_ARGS=   
  209.  
  210.  
  211. # Subdirectories with code
  212. SRCDIRS=    Parser Objects Python Modules Modules/_io Programs
  213.  
  214. # Other subdirectories
  215. SUBDIRSTOO= Include Lib Misc
  216.  
  217. # Files and directories to be distributed
  218. CONFIGFILES=    configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in
  219. DISTFILES=  README.rst ChangeLog $(CONFIGFILES)
  220. DISTDIRS=   $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
  221. DIST=       $(DISTFILES) $(DISTDIRS)
  222.  
  223.  
  224. LIBRARY=    libpython$(VERSION)$(ABIFLAGS).a
  225. LDLIBRARY=      libpython$(VERSION)$(ABIFLAGS).a
  226. BLDLIBRARY=     $(LDLIBRARY)
  227. PY3LIBRARY=    
  228. DLLLIBRARY=
  229. LDLIBRARYDIR=  
  230. INSTSONAME= $(LDLIBRARY)
  231.  
  232.  
  233. LIBS=       -lcrypt -lpthread -ldl  -lutil
  234. LIBM=       -lm
  235. LIBC=      
  236. SYSLIBS=    $(LIBM) $(LIBC)
  237. SHLIBS=     $(LIBS)
  238.  
  239. DLINCLDIR=  .
  240. DYNLOADFILE=    dynload_shlib.o
  241. MACHDEP_OBJS=  
  242. LIBOBJDIR=  Python/
  243. LIBOBJS=   
  244.  
  245. PYTHON=     python$(EXE)
  246. BUILDPYTHON=    python$(BUILDEXE)
  247.  
  248. PYTHON_FOR_REGEN=python3
  249. UPDATE_FILE=python3 $(srcdir)/Tools/scripts/update_file.py
  250. PYTHON_FOR_BUILD=./$(BUILDPYTHON) -E
  251. _PYTHON_HOST_PLATFORM=
  252. BUILD_GNU_TYPE= x86_64-pc-linux-gnu
  253. HOST_GNU_TYPE=  x86_64-pc-linux-gnu
  254.  
  255. # Tcl and Tk config info from --with-tcltk-includes and -libs options
  256. TCLTK_INCLUDES=
  257. TCLTK_LIBS=
  258.  
  259. # The task to run while instrumented when building the profile-opt target.
  260. # We exclude unittests with -x that take a rediculious amount of time to
  261. # run in the instrumented training build or do not provide much value.
  262. PROFILE_TASK=-m test.regrtest --pgo
  263.  
  264. # report files for gcov / lcov coverage report
  265. COVERAGE_INFO=  $(abs_builddir)/coverage.info
  266. COVERAGE_REPORT=$(abs_builddir)/lcov-report
  267. COVERAGE_REPORT_OPTIONS=--no-branch-coverage --title "CPython lcov report"
  268.  
  269.  
  270. # === Definitions added by makesetup ===
  271.  
  272. LOCALMODLIBS=                      
  273. BASEMODLIBS=
  274. PYTHONPATH=$(COREPYTHONPATH)
  275. COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)
  276. TESTPATH=
  277. SITEPATH=
  278. DESTPATH=
  279. MACHDESTLIB=$(BINLIBDEST)
  280. DESTLIB=$(LIBDEST)
  281.  
  282.  
  283.  
  284. ##########################################################################
  285. # Modules
  286. MODULE_OBJS=    \
  287.         Modules/config.o \
  288.         Modules/getpath.o \
  289.         Modules/main.o \
  290.         Modules/gcmodule.o
  291.  
  292. IO_H=       Modules/_io/_iomodule.h
  293.  
  294. IO_OBJS=    \
  295.         Modules/_io/_iomodule.o \
  296.         Modules/_io/iobase.o \
  297.         Modules/_io/fileio.o \
  298.         Modules/_io/bufferedio.o \
  299.         Modules/_io/textio.o \
  300.         Modules/_io/bytesio.o \
  301.         Modules/_io/stringio.o
  302.  
  303. ##########################################################################
  304.  
  305. LIBFFI_INCLUDEDIR=  /usr/lib/libffi-3.2.1/include
  306.  
  307. ##########################################################################
  308. # Parser
  309. PGEN=       Parser/pgen$(EXE)
  310.  
  311. POBJS=      \
  312.         Parser/acceler.o \
  313.         Parser/grammar1.o \
  314.         Parser/listnode.o \
  315.         Parser/node.o \
  316.         Parser/parser.o \
  317.         Parser/bitset.o \
  318.         Parser/metagrammar.o \
  319.         Parser/firstsets.o \
  320.         Parser/grammar.o \
  321.         Parser/pgen.o
  322.  
  323. PARSER_OBJS=    $(POBJS) Parser/myreadline.o Parser/parsetok.o Parser/tokenizer.o
  324.  
  325. PGOBJS=     \
  326.         Objects/obmalloc.o \
  327.         Python/dynamic_annotations.o \
  328.         Python/mysnprintf.o \
  329.         Python/pyctype.o \
  330.         Parser/tokenizer_pgen.o \
  331.         Parser/printgrammar.o \
  332.         Parser/parsetok_pgen.o \
  333.         Parser/pgenmain.o
  334.  
  335. PARSER_HEADERS= \
  336.         $(srcdir)/Include/grammar.h \
  337.         $(srcdir)/Include/parsetok.h \
  338.         $(srcdir)/Parser/parser.h \
  339.         $(srcdir)/Parser/tokenizer.h
  340.  
  341. PGENOBJS=   $(POBJS) $(PGOBJS)
  342.  
  343. ##########################################################################
  344. # Python
  345.  
  346. PYTHON_OBJS=    \
  347.         Python/_warnings.o \
  348.         Python/Python-ast.o \
  349.         Python/asdl.o \
  350.         Python/ast.o \
  351.         Python/ast_opt.o \
  352.         Python/ast_unparse.o \
  353.         Python/bltinmodule.o \
  354.         Python/ceval.o \
  355.         Python/compile.o \
  356.         Python/codecs.o \
  357.         Python/dynamic_annotations.o \
  358.         Python/errors.o \
  359.         Python/frozenmain.o \
  360.         Python/future.o \
  361.         Python/getargs.o \
  362.         Python/getcompiler.o \
  363.         Python/getcopyright.o \
  364.         Python/getplatform.o \
  365.         Python/getversion.o \
  366.         Python/graminit.o \
  367.         Python/import.o \
  368.         Python/importdl.o \
  369.         Python/marshal.o \
  370.         Python/modsupport.o \
  371.         Python/mysnprintf.o \
  372.         Python/mystrtoul.o \
  373.         Python/pathconfig.o \
  374.         Python/peephole.o \
  375.         Python/pyarena.o \
  376.         Python/pyctype.o \
  377.         Python/pyfpe.o \
  378.         Python/pyhash.o \
  379.         Python/pylifecycle.o \
  380.         Python/pymath.o \
  381.         Python/pystate.o \
  382.         Python/context.o \
  383.         Python/hamt.o \
  384.         Python/pythonrun.o \
  385.         Python/pytime.o \
  386.         Python/bootstrap_hash.o \
  387.         Python/structmember.o \
  388.         Python/symtable.o \
  389.         Python/sysmodule.o \
  390.         Python/thread.o \
  391.         Python/traceback.o \
  392.         Python/getopt.o \
  393.         Python/pystrcmp.o \
  394.         Python/pystrtod.o \
  395.         Python/pystrhex.o \
  396.         Python/dtoa.o \
  397.         Python/formatter_unicode.o \
  398.         Python/fileutils.o \
  399.         Python/$(DYNLOADFILE) \
  400.         $(LIBOBJS) \
  401.         $(MACHDEP_OBJS) \
  402.         $(DTRACE_OBJS)
  403.  
  404.  
  405. ##########################################################################
  406. # Objects
  407. OBJECT_OBJS=    \
  408.         Objects/abstract.o \
  409.         Objects/accu.o \
  410.         Objects/boolobject.o \
  411.         Objects/bytes_methods.o \
  412.         Objects/bytearrayobject.o \
  413.         Objects/bytesobject.o \
  414.         Objects/call.o \
  415.         Objects/cellobject.o \
  416.         Objects/classobject.o \
  417.         Objects/codeobject.o \
  418.         Objects/complexobject.o \
  419.         Objects/descrobject.o \
  420.         Objects/enumobject.o \
  421.         Objects/exceptions.o \
  422.         Objects/genobject.o \
  423.         Objects/fileobject.o \
  424.         Objects/floatobject.o \
  425.         Objects/frameobject.o \
  426.         Objects/funcobject.o \
  427.         Objects/iterobject.o \
  428.         Objects/listobject.o \
  429.         Objects/longobject.o \
  430.         Objects/dictobject.o \
  431.         Objects/odictobject.o \
  432.         Objects/memoryobject.o \
  433.         Objects/methodobject.o \
  434.         Objects/moduleobject.o \
  435.         Objects/namespaceobject.o \
  436.         Objects/object.o \
  437.         Objects/obmalloc.o \
  438.         Objects/capsule.o \
  439.         Objects/rangeobject.o \
  440.         Objects/setobject.o \
  441.         Objects/sliceobject.o \
  442.         Objects/structseq.o \
  443.         Objects/tupleobject.o \
  444.         Objects/typeobject.o \
  445.         Objects/unicodeobject.o \
  446.         Objects/unicodectype.o \
  447.         Objects/weakrefobject.o
  448.  
  449. ##########################################################################
  450. # objects that get linked into the Python library
  451. LIBRARY_OBJS_OMIT_FROZEN=   \
  452.         Modules/getbuildinfo.o \
  453.         $(PARSER_OBJS) \
  454.         $(OBJECT_OBJS) \
  455.         $(PYTHON_OBJS) \
  456.         $(MODULE_OBJS) \
  457.         $(MODOBJS)
  458.  
  459. LIBRARY_OBJS=   \
  460.         $(LIBRARY_OBJS_OMIT_FROZEN) \
  461.         Python/frozen.o
  462.  
  463. ##########################################################################
  464. # DTrace
  465.  
  466. # On some systems, object files that reference DTrace probes need to be modified
  467. # in-place by dtrace(1).
  468. DTRACE_DEPS = \
  469.     Python/ceval.o
  470. # XXX: should gcmodule, etc. be here, too?
  471.  
  472. #########################################################################
  473. # Rules
  474.  
  475. # Default target
  476. all:        build_all
  477. build_all:  check-clean-src $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks \
  478.         Programs/_testembed python-config
  479.  
  480. # Check that the source is clean when building out of source.
  481. check-clean-src:
  482.     @if test -n "$(VPATH)" -a -f "$(srcdir)/Programs/python.o"; then \
  483.         echo "Error: The source directory ($(srcdir)) is not clean" ; \
  484.         echo "Building Python out of the source tree (in $(abs_builddir)) requires a clean source tree ($(abs_srcdir))" ; \
  485.         echo "Try to run: make -C \"$(srcdir)\" clean" ; \
  486.         exit 1; \
  487.     fi
  488.  
  489. # Profile generation build must start from a clean tree.
  490. profile-clean-stamp:
  491.     $(MAKE) clean profile-removal
  492.     touch $@
  493.  
  494. # Compile with profile generation enabled.
  495. profile-gen-stamp: profile-clean-stamp
  496.     @if [ $(LLVM_PROF_ERR) = yes ]; then \
  497.         echo "Error: Cannot perform PGO build because llvm-profdata was not found in PATH" ;\
  498.         echo "Please add it to PATH and run ./configure again" ;\
  499.         exit 1;\
  500.     fi
  501.     @echo "Building with support for profile generation:"
  502.     $(MAKE) build_all_generate_profile
  503.     touch $@
  504.  
  505. # Run task with profile generation build to create profile information.
  506. profile-run-stamp:
  507.     @echo "Running code to generate profile data (this can take a while):"
  508.     # First, we need to create a clean build with profile generation
  509.     # enabled.
  510.     $(MAKE) profile-gen-stamp
  511.     # Next, run the profile task to generate the profile information.
  512.     $(MAKE) run_profile_task
  513.     $(MAKE) build_all_merge_profile
  514.     # Remove profile generation binary since we are done with it.
  515.     $(MAKE) clean
  516.     # This is an expensive target to build and it does not have proper
  517.     # makefile dependency information.  So, we create a "stamp" file
  518.     # to record its completion and avoid re-running it.
  519.     touch $@
  520.  
  521. build_all_generate_profile:
  522.     $(MAKE) all CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"
  523.  
  524. run_profile_task:
  525.     @ # FIXME: can't run for a cross build
  526.     $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
  527.  
  528. build_all_merge_profile:
  529.     $(LLVM_PROF_MERGER)
  530.  
  531. # Compile Python binary with profile guided optimization.
  532. # To force re-running of the profile task, remove the profile-run-stamp file.
  533. profile-opt: profile-run-stamp
  534.     @echo "Rebuilding with profile guided optimizations:"
  535.     -rm -f profile-clean-stamp
  536.     $(MAKE) all CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_USE_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST)"
  537.  
  538. # Compile and run with gcov
  539. .PHONY=coverage coverage-lcov coverage-report
  540. coverage:
  541.     @echo "Building with support for coverage checking:"
  542.     $(MAKE) clean profile-removal
  543.     $(MAKE) all CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -lgcov"
  544.  
  545. coverage-lcov:
  546.     @echo "Creating Coverage HTML report with LCOV:"
  547.     @rm -f $(COVERAGE_INFO)
  548.     @rm -rf $(COVERAGE_REPORT)
  549.     @lcov --capture --directory $(abs_builddir) \
  550.         --base-directory $(realpath $(abs_builddir)) \
  551.         --path $(realpath $(abs_srcdir)) \
  552.         --output-file $(COVERAGE_INFO)
  553.     @ # remove 3rd party modules, system headers and internal files with
  554.     @ # debug, test or dummy functions.
  555.     @lcov --remove $(COVERAGE_INFO) \
  556.         '*/Modules/_blake2/impl/*' \
  557.         '*/Modules/_ctypes/libffi*/*' \
  558.         '*/Modules/_decimal/libmpdec/*' \
  559.         '*/Modules/_sha3/kcp/*' \
  560.         '*/Modules/expat/*' \
  561.         '*/Modules/zlib/*' \
  562.         '*/Include/*' \
  563.         '*/Modules/xx*.c' \
  564.         '*/Parser/listnode.c' \
  565.         '*/Python/pyfpe.c' \
  566.         '*/Python/pystrcmp.c' \
  567.         '/usr/include/*' \
  568.         '/usr/local/include/*' \
  569.         '/usr/lib/gcc/*' \
  570.         --output-file $(COVERAGE_INFO)
  571.     @genhtml $(COVERAGE_INFO) --output-directory $(COVERAGE_REPORT) \
  572.         $(COVERAGE_REPORT_OPTIONS)
  573.     @echo
  574.     @echo "lcov report at $(COVERAGE_REPORT)/index.html"
  575.     @echo
  576.  
  577. # Force regeneration of parser and importlib
  578. coverage-report: regen-grammar regen-importlib
  579.     @ # build with coverage info
  580.     $(MAKE) coverage
  581.     @ # run tests, ignore failures
  582.     $(TESTRUNNER) $(TESTOPTS) || true
  583.     @ # build lcov report
  584.     $(MAKE) coverage-lcov
  585.  
  586. # Run "Argument Clinic" over all source files
  587. .PHONY=clinic
  588. clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
  589.     $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir)
  590.  
  591. # Build the interpreter
  592. $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
  593.     $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
  594.  
  595. platform: $(BUILDPYTHON) pybuilddir.txt
  596.     $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
  597.  
  598. # Create build directory and generate the sysconfig build-time data there.
  599. # pybuilddir.txt contains the name of the build dir and is used for
  600. # sys.path fixup -- see Modules/getpath.c.
  601. # Since this step runs before shared modules are built, try to avoid bootstrap
  602. # problems by creating a dummy pybuilddir.txt just to allow interpreter
  603. # initialization to succeed.  It will be overwritten by generate-posix-vars
  604. # or removed in case of failure.
  605. pybuilddir.txt: $(BUILDPYTHON)
  606.     @echo "none" > ./pybuilddir.txt
  607.     $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars ;\
  608.     if test $$? -ne 0 ; then \
  609.         echo "generate-posix-vars failed" ; \
  610.         rm -f ./pybuilddir.txt ; \
  611.         exit 1 ; \
  612.     fi
  613.  
  614. # This is shared by the math and cmath modules
  615. Modules/_math.o: Modules/_math.c Modules/_math.h
  616.     $(CC) -c $(CCSHARED) $(PY_CORE_CFLAGS) -o $@ $<
  617.  
  618. # blake2s is auto-generated from blake2b
  619. $(srcdir)/Modules/_blake2/blake2s_impl.c: $(srcdir)/Modules/_blake2/blake2b_impl.c $(srcdir)/Modules/_blake2/blake2b2s.py
  620.     $(PYTHON_FOR_REGEN) $(srcdir)/Modules/_blake2/blake2b2s.py
  621.     $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py -f $@
  622.  
  623. # Build the shared modules
  624. # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
  625. # -s, --silent or --quiet is always the first char.
  626. # Under BSD make, MAKEFLAGS might be " -s -v x=y".
  627. # Ignore macros passed by GNU make, passed after --
  628. sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
  629.     @case "`echo X $$MAKEFLAGS | sed 's/^X //;s/ -- .*//'`" in \
  630.         *\ -s*|s*) quiet="-q";; \
  631.         *) quiet="";; \
  632.     esac; \
  633.     echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
  634.         _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
  635.         $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \
  636.     $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
  637.         _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
  638.         $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
  639.  
  640.  
  641. # Build static library
  642. $(LIBRARY): $(LIBRARY_OBJS)
  643.     -rm -f $@
  644.     $(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS)
  645.  
  646. libpython$(LDVERSION).so: $(LIBRARY_OBJS)
  647.     if test $(INSTSONAME) != $(LDLIBRARY); then \
  648.         $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
  649.         $(LN) -f $(INSTSONAME) $@; \
  650.     else \
  651.         $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
  652.     fi
  653.  
  654. libpython3.so:  libpython$(LDVERSION).so
  655.     $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^
  656.  
  657. libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
  658.      $(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); \
  659.  
  660.  
  661. libpython$(VERSION).sl: $(LIBRARY_OBJS)
  662.     $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)
  663.  
  664. # Copy up the gdb python hooks into a position where they can be automatically
  665. # loaded by gdb during Lib/test/test_gdb.py
  666. #
  667. # Distributors are likely to want to install this somewhere else e.g. relative
  668. # to the stripped DWARF data for the shared library.
  669. gdbhooks: $(BUILDPYTHON)-gdb.py
  670.  
  671. SRC_GDB_HOOKS=$(srcdir)/Tools/gdb/libpython.py
  672. $(BUILDPYTHON)-gdb.py: $(SRC_GDB_HOOKS)
  673.     $(INSTALL_DATA) $(SRC_GDB_HOOKS) $(BUILDPYTHON)-gdb.py
  674.  
  675. # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
  676. # minimal framework (not including the Lib directory and such) in the current
  677. # directory.
  678. RESSRCDIR=Mac/Resources/framework
  679. $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
  680.         $(LIBRARY) \
  681.         $(RESSRCDIR)/Info.plist
  682.     $(INSTALL) -d -m $(DIRMODE) $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)
  683.     $(CC) -o $(LDLIBRARY) $(PY_CORE_LDFLAGS) -dynamiclib \
  684.         -all_load $(LIBRARY) -Wl,-single_module \
  685.         -install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) \
  686.         -compatibility_version $(VERSION) \
  687.         -current_version $(VERSION) \
  688.         -framework CoreFoundation $(LIBS);
  689.     $(INSTALL) -d -m $(DIRMODE)  \
  690.         $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj
  691.     $(INSTALL_DATA) $(RESSRCDIR)/Info.plist \
  692.         $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/Info.plist
  693.     $(LN) -fsn $(VERSION) $(PYTHONFRAMEWORKDIR)/Versions/Current
  694.     $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)
  695.     $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources
  696.  
  697. # This rule builds the Cygwin Python DLL and import library if configured
  698. # for a shared core library; otherwise, this rule is a noop.
  699. $(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS)
  700.     if test -n "$(DLLLIBRARY)"; then \
  701.         $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
  702.             $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \
  703.     else true; \
  704.     fi
  705.  
  706.  
  707. oldsharedmods: $(SHAREDMODS)
  708.  
  709.  
  710. Makefile Modules/config.c: Makefile.pre \
  711.                 $(srcdir)/Modules/config.c.in \
  712.                 $(MAKESETUP) \
  713.                 Modules/Setup \
  714.                 Modules/Setup.local
  715.     $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \
  716.                 -s Modules \
  717.                 Modules/Setup.local \
  718.                 Modules/Setup
  719.     @mv config.c Modules
  720.     @echo "The Makefile was updated, you may need to re-run make."
  721.  
  722.  
  723. Modules/Setup: $(srcdir)/Modules/Setup.dist
  724.     @if test -f Modules/Setup; then \
  725.         echo "-----------------------------------------------"; \
  726.         echo "Modules/Setup.dist is newer than Modules/Setup;"; \
  727.         echo "check to make sure you have all the updates you"; \
  728.         echo "need in your Modules/Setup file."; \
  729.         echo "Usually, copying Modules/Setup.dist to Modules/Setup will work."; \
  730.         echo "-----------------------------------------------"; \
  731.     fi
  732.  
  733. Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
  734.     $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
  735.  
  736. ############################################################################
  737. # Importlib
  738.  
  739. Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile
  740.  
  741. Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
  742.     $(LINKCC) $(PY_CORE_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
  743.  
  744. .PHONY: regen-importlib
  745. regen-importlib: Programs/_freeze_importlib
  746.     # Regenerate Python/importlib_external.h
  747.     # from Lib/importlib/_bootstrap_external.py using _freeze_importlib
  748.     ./Programs/_freeze_importlib \
  749.         $(srcdir)/Lib/importlib/_bootstrap_external.py \
  750.         $(srcdir)/Python/importlib_external.h.new
  751.     $(UPDATE_FILE) $(srcdir)/Python/importlib_external.h $(srcdir)/Python/importlib_external.h.new
  752.     # Regenerate Python/importlib.h from Lib/importlib/_bootstrap.py
  753.     # using _freeze_importlib
  754.     ./Programs/_freeze_importlib \
  755.         $(srcdir)/Lib/importlib/_bootstrap.py \
  756.         $(srcdir)/Python/importlib.h.new
  757.     $(UPDATE_FILE) $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib.h.new
  758.  
  759.  
  760. ############################################################################
  761. # Regenerate all generated files
  762.  
  763. regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar \
  764.     regen-ast regen-importlib clinic
  765.  
  766. ############################################################################
  767. # Special rules for object files
  768.  
  769. Modules/getbuildinfo.o: $(PARSER_OBJS) \
  770.         $(OBJECT_OBJS) \
  771.         $(PYTHON_OBJS) \
  772.         $(MODULE_OBJS) \
  773.         $(MODOBJS) \
  774.         $(srcdir)/Modules/getbuildinfo.c
  775.     $(CC) -c $(PY_CORE_CFLAGS) \
  776.           -DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \
  777.           -DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \
  778.           -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \
  779.           -o $@ $(srcdir)/Modules/getbuildinfo.c
  780.  
  781. Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
  782.     $(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
  783.         -DPREFIX='"$(prefix)"' \
  784.         -DEXEC_PREFIX='"$(exec_prefix)"' \
  785.         -DVERSION='"$(VERSION)"' \
  786.         -DVPATH='"$(VPATH)"' \
  787.         -o $@ $(srcdir)/Modules/getpath.c
  788.  
  789. Programs/python.o: $(srcdir)/Programs/python.c
  790.     $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c
  791.  
  792. Programs/_testembed.o: $(srcdir)/Programs/_testembed.c
  793.     $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c
  794.  
  795. Modules/_sre.o: $(srcdir)/Modules/_sre.c $(srcdir)/Modules/sre.h $(srcdir)/Modules/sre_constants.h $(srcdir)/Modules/sre_lib.h
  796.  
  797. Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c $(srcdir)/Modules/posixmodule.h
  798.  
  799. Modules/grpmodule.o: $(srcdir)/Modules/grpmodule.c $(srcdir)/Modules/posixmodule.h
  800.  
  801. Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule.h
  802.  
  803. Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c $(srcdir)/Modules/posixmodule.h
  804.  
  805. Python/dynload_shlib.o: $(srcdir)/Python/dynload_shlib.c Makefile
  806.     $(CC) -c $(PY_CORE_CFLAGS) \
  807.         -DSOABI='"$(SOABI)"' \
  808.         -o $@ $(srcdir)/Python/dynload_shlib.c
  809.  
  810. Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile
  811.     $(CC) -c $(PY_CORE_CFLAGS) \
  812.         -DSHLIB_EXT='"$(EXT_SUFFIX)"' \
  813.         -o $@ $(srcdir)/Python/dynload_hpux.c
  814.  
  815. Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile
  816.     $(CC) -c $(PY_CORE_CFLAGS) \
  817.         -DABIFLAGS='"$(ABIFLAGS)"' \
  818.         $(MULTIARCH_CPPFLAGS) \
  819.         -o $@ $(srcdir)/Python/sysmodule.c
  820.  
  821. $(IO_OBJS): $(IO_H)
  822.  
  823. $(PGEN): $(PGENOBJS)
  824.         $(CC) $(OPT) $(PY_CORE_LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
  825.  
  826. .PHONY: regen-grammar
  827. regen-grammar: $(PGEN)
  828.     # Regenerate Include/graminit.h and Python/graminit.c
  829.     # from Grammar/Grammar using pgen
  830.     @$(MKDIR_P) Include
  831.     $(PGEN) $(srcdir)/Grammar/Grammar \
  832.         $(srcdir)/Include/graminit.h.new \
  833.         $(srcdir)/Python/graminit.c.new
  834.     $(UPDATE_FILE) $(srcdir)/Include/graminit.h $(srcdir)/Include/graminit.h.new
  835.     $(UPDATE_FILE) $(srcdir)/Python/graminit.c $(srcdir)/Python/graminit.c.new
  836.  
  837. Parser/grammar.o:   $(srcdir)/Parser/grammar.c \
  838.                 $(srcdir)/Include/token.h \
  839.                 $(srcdir)/Include/grammar.h
  840. Parser/metagrammar.o:   $(srcdir)/Parser/metagrammar.c
  841.  
  842. Parser/tokenizer_pgen.o:    $(srcdir)/Parser/tokenizer.c
  843. Parser/parsetok_pgen.o: $(srcdir)/Parser/parsetok.c
  844. Parser/printgrammar.o: $(srcdir)/Parser/printgrammar.c
  845.  
  846. Parser/pgenmain.o:  $(srcdir)/Include/parsetok.h
  847.  
  848. .PHONY=regen-ast
  849. regen-ast:
  850.     # Regenerate Include/Python-ast.h using Parser/asdl_c.py -h
  851.     $(MKDIR_P) $(srcdir)/Include
  852.     $(PYTHON_FOR_REGEN) $(srcdir)/Parser/asdl_c.py \
  853.         -h $(srcdir)/Include/Python-ast.h.new \
  854.         $(srcdir)/Parser/Python.asdl
  855.     $(UPDATE_FILE) $(srcdir)/Include/Python-ast.h $(srcdir)/Include/Python-ast.h.new
  856.     # Regenerate Python/Python-ast.c using Parser/asdl_c.py -c
  857.     $(MKDIR_P) $(srcdir)/Python
  858.     $(PYTHON_FOR_REGEN) $(srcdir)/Parser/asdl_c.py \
  859.         -c $(srcdir)/Python/Python-ast.c.new \
  860.         $(srcdir)/Parser/Python.asdl
  861.     $(UPDATE_FILE) $(srcdir)/Python/Python-ast.c $(srcdir)/Python/Python-ast.c.new
  862.  
  863. .PHONY: regen-opcode
  864. regen-opcode:
  865.     # Regenerate Include/opcode.h from Lib/opcode.py
  866.     # using Tools/scripts/generate_opcode_h.py
  867.     $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_opcode_h.py \
  868.         $(srcdir)/Lib/opcode.py \
  869.         $(srcdir)/Include/opcode.h.new
  870.     $(UPDATE_FILE) $(srcdir)/Include/opcode.h $(srcdir)/Include/opcode.h.new
  871.  
  872. 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
  873.  
  874. Python/getplatform.o: $(srcdir)/Python/getplatform.c
  875.         $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
  876.  
  877. Python/importdl.o: $(srcdir)/Python/importdl.c
  878.         $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
  879.  
  880. Objects/unicodectype.o: $(srcdir)/Objects/unicodectype.c \
  881.                 $(srcdir)/Objects/unicodetype_db.h
  882.  
  883. BYTESTR_DEPS = \
  884.         $(srcdir)/Objects/stringlib/count.h \
  885.         $(srcdir)/Objects/stringlib/ctype.h \
  886.         $(srcdir)/Objects/stringlib/fastsearch.h \
  887.         $(srcdir)/Objects/stringlib/find.h \
  888.         $(srcdir)/Objects/stringlib/join.h \
  889.         $(srcdir)/Objects/stringlib/partition.h \
  890.         $(srcdir)/Objects/stringlib/split.h \
  891.         $(srcdir)/Objects/stringlib/stringdefs.h \
  892.         $(srcdir)/Objects/stringlib/transmogrify.h
  893.  
  894. UNICODE_DEPS = \
  895.         $(srcdir)/Objects/stringlib/asciilib.h \
  896.         $(srcdir)/Objects/stringlib/codecs.h \
  897.         $(srcdir)/Objects/stringlib/count.h \
  898.         $(srcdir)/Objects/stringlib/fastsearch.h \
  899.         $(srcdir)/Objects/stringlib/find.h \
  900.         $(srcdir)/Objects/stringlib/find_max_char.h \
  901.         $(srcdir)/Objects/stringlib/localeutil.h \
  902.         $(srcdir)/Objects/stringlib/partition.h \
  903.         $(srcdir)/Objects/stringlib/replace.h \
  904.         $(srcdir)/Objects/stringlib/split.h \
  905.         $(srcdir)/Objects/stringlib/ucs1lib.h \
  906.         $(srcdir)/Objects/stringlib/ucs2lib.h \
  907.         $(srcdir)/Objects/stringlib/ucs4lib.h \
  908.         $(srcdir)/Objects/stringlib/undef.h \
  909.         $(srcdir)/Objects/stringlib/unicode_format.h \
  910.         $(srcdir)/Objects/stringlib/unicodedefs.h
  911.  
  912. Objects/bytes_methods.o: $(srcdir)/Objects/bytes_methods.c $(BYTESTR_DEPS)
  913. Objects/bytesobject.o: $(srcdir)/Objects/bytesobject.c $(BYTESTR_DEPS)
  914. Objects/bytearrayobject.o: $(srcdir)/Objects/bytearrayobject.c $(BYTESTR_DEPS)
  915.  
  916. Objects/unicodeobject.o: $(srcdir)/Objects/unicodeobject.c $(UNICODE_DEPS)
  917.  
  918. Objects/odictobject.o: $(srcdir)/Objects/dict-common.h
  919. Objects/dictobject.o: $(srcdir)/Objects/stringlib/eq.h $(srcdir)/Objects/dict-common.h
  920. Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h
  921.  
  922. .PHONY: regen-opcode-targets
  923. regen-opcode-targets:
  924.     # Regenerate Python/opcode_targets.h from Lib/opcode.py
  925.     # using Python/makeopcodetargets.py
  926.     $(PYTHON_FOR_REGEN) $(srcdir)/Python/makeopcodetargets.py \
  927.         $(srcdir)/Python/opcode_targets.h.new
  928.     $(UPDATE_FILE) $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/opcode_targets.h.new
  929.  
  930. Python/ceval.o: $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/ceval_gil.h
  931.  
  932. Python/frozen.o: $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib_external.h
  933.  
  934. # Generate DTrace probe macros, then rename them (PYTHON_ -> PyDTrace_) to
  935. # follow our naming conventions. dtrace(1) uses the output filename to generate
  936. # an include guard, so we can't use a pipeline to transform its output.
  937. Include/pydtrace_probes.h: $(srcdir)/Include/pydtrace.d
  938.     $(MKDIR_P) Include
  939.     $(DTRACE) $(DFLAGS) -o $@ -h -s $<
  940.     : sed in-place edit with POSIX-only tools
  941.     sed 's/PYTHON_/PyDTrace_/' $@ > $@.tmp
  942.     mv $@.tmp $@
  943.  
  944. Python/pydtrace.o: $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS)
  945.     $(DTRACE) $(DFLAGS) -o $@ -G -s $< $(DTRACE_DEPS)
  946.  
  947. Objects/typeobject.o: Objects/typeslots.inc
  948.  
  949. .PHONY: regen-typeslots
  950. regen-typeslots:
  951.     # Regenerate Objects/typeslots.inc from Include/typeslotsh
  952.     # using Objects/typeslots.py
  953.     $(PYTHON_FOR_REGEN) $(srcdir)/Objects/typeslots.py \
  954.         < $(srcdir)/Include/typeslots.h \
  955.         $(srcdir)/Objects/typeslots.inc.new
  956.     $(UPDATE_FILE) $(srcdir)/Objects/typeslots.inc $(srcdir)/Objects/typeslots.inc.new
  957.  
  958. ############################################################################
  959. # Header files
  960.  
  961. PYTHON_HEADERS= \
  962.         $(srcdir)/Include/Python.h \
  963.         $(srcdir)/Include/abstract.h \
  964.         $(srcdir)/Include/accu.h \
  965.         $(srcdir)/Include/asdl.h \
  966.         $(srcdir)/Include/ast.h \
  967.         $(srcdir)/Include/bitset.h \
  968.         $(srcdir)/Include/bltinmodule.h \
  969.         $(srcdir)/Include/boolobject.h \
  970.         $(srcdir)/Include/bytearrayobject.h \
  971.         $(srcdir)/Include/bytes_methods.h \
  972.         $(srcdir)/Include/bytesobject.h \
  973.         $(srcdir)/Include/cellobject.h \
  974.         $(srcdir)/Include/ceval.h \
  975.         $(srcdir)/Include/classobject.h \
  976.         $(srcdir)/Include/code.h \
  977.         $(srcdir)/Include/codecs.h \
  978.         $(srcdir)/Include/compile.h \
  979.         $(srcdir)/Include/complexobject.h \
  980.         $(srcdir)/Include/context.h \
  981.         $(srcdir)/Include/descrobject.h \
  982.         $(srcdir)/Include/dictobject.h \
  983.         $(srcdir)/Include/dtoa.h \
  984.         $(srcdir)/Include/dynamic_annotations.h \
  985.         $(srcdir)/Include/enumobject.h \
  986.         $(srcdir)/Include/errcode.h \
  987.         $(srcdir)/Include/eval.h \
  988.         $(srcdir)/Include/fileobject.h \
  989.         $(srcdir)/Include/fileutils.h \
  990.         $(srcdir)/Include/floatobject.h \
  991.         $(srcdir)/Include/frameobject.h \
  992.         $(srcdir)/Include/funcobject.h \
  993.         $(srcdir)/Include/genobject.h \
  994.         $(srcdir)/Include/import.h \
  995.         $(srcdir)/Include/intrcheck.h \
  996.         $(srcdir)/Include/iterobject.h \
  997.         $(srcdir)/Include/listobject.h \
  998.         $(srcdir)/Include/longintrepr.h \
  999.         $(srcdir)/Include/longobject.h \
  1000.         $(srcdir)/Include/marshal.h \
  1001.         $(srcdir)/Include/memoryobject.h \
  1002.         $(srcdir)/Include/metagrammar.h \
  1003.         $(srcdir)/Include/methodobject.h \
  1004.         $(srcdir)/Include/modsupport.h \
  1005.         $(srcdir)/Include/moduleobject.h \
  1006.         $(srcdir)/Include/namespaceobject.h \
  1007.         $(srcdir)/Include/node.h \
  1008.         $(srcdir)/Include/object.h \
  1009.         $(srcdir)/Include/objimpl.h \
  1010.         $(srcdir)/Include/odictobject.h \
  1011.         $(srcdir)/Include/opcode.h \
  1012.         $(srcdir)/Include/osdefs.h \
  1013.         $(srcdir)/Include/osmodule.h \
  1014.         $(srcdir)/Include/patchlevel.h \
  1015.         $(srcdir)/Include/pgen.h \
  1016.         $(srcdir)/Include/pgenheaders.h \
  1017.         $(srcdir)/Include/pyarena.h \
  1018.         $(srcdir)/Include/pyatomic.h \
  1019.         $(srcdir)/Include/pycapsule.h \
  1020.         $(srcdir)/Include/pyctype.h \
  1021.         $(srcdir)/Include/pydebug.h \
  1022.         $(srcdir)/Include/pydtrace.h \
  1023.         $(srcdir)/Include/pyerrors.h \
  1024.         $(srcdir)/Include/pyfpe.h \
  1025.         $(srcdir)/Include/pyhash.h \
  1026.         $(srcdir)/Include/pylifecycle.h \
  1027.         $(srcdir)/Include/pymacconfig.h \
  1028.         $(srcdir)/Include/pymacro.h \
  1029.         $(srcdir)/Include/pymath.h \
  1030.         $(srcdir)/Include/pymem.h \
  1031.         $(srcdir)/Include/pyport.h \
  1032.         $(srcdir)/Include/pystate.h \
  1033.         $(srcdir)/Include/pystrcmp.h \
  1034.         $(srcdir)/Include/pystrhex.h \
  1035.         $(srcdir)/Include/pystrtod.h \
  1036.         $(srcdir)/Include/pythonrun.h \
  1037.         $(srcdir)/Include/pythread.h \
  1038.         $(srcdir)/Include/pytime.h \
  1039.         $(srcdir)/Include/rangeobject.h \
  1040.         $(srcdir)/Include/setobject.h \
  1041.         $(srcdir)/Include/sliceobject.h \
  1042.         $(srcdir)/Include/structmember.h \
  1043.         $(srcdir)/Include/structseq.h \
  1044.         $(srcdir)/Include/symtable.h \
  1045.         $(srcdir)/Include/sysmodule.h \
  1046.         $(srcdir)/Include/token.h \
  1047.         $(srcdir)/Include/traceback.h \
  1048.         $(srcdir)/Include/tupleobject.h \
  1049.         $(srcdir)/Include/ucnhash.h \
  1050.         $(srcdir)/Include/unicodeobject.h \
  1051.         $(srcdir)/Include/warnings.h \
  1052.         $(srcdir)/Include/weakrefobject.h \
  1053.         pyconfig.h \
  1054.         $(PARSER_HEADERS) \
  1055.         $(srcdir)/Include/Python-ast.h \
  1056.         $(srcdir)/Include/internal/ceval.h \
  1057.         $(srcdir)/Include/internal/gil.h \
  1058.         $(srcdir)/Include/internal/mem.h \
  1059.         $(srcdir)/Include/internal/pygetopt.h \
  1060.         $(srcdir)/Include/internal/pystate.h \
  1061.         $(srcdir)/Include/internal/context.h \
  1062.         $(srcdir)/Include/internal/warnings.h \
  1063.         $(DTRACE_HEADERS)
  1064.  
  1065. $(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)
  1066.  
  1067.  
  1068. ######################################################################
  1069.  
  1070. TESTOPTS=   $(EXTRATESTOPTS)
  1071. TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS)
  1072. TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
  1073. TESTTIMEOUT=    1200
  1074.  
  1075. .PHONY: test testall testuniversal buildbottest pythoninfo
  1076.  
  1077. # Remove "test_python_*" directories of previous failed test jobs.
  1078. # Pass TESTOPTS options because it can contain --tempdir option.
  1079. cleantest: build_all
  1080.     $(TESTRUNNER) $(TESTOPTS) --cleanup
  1081.  
  1082. # Run a basic set of regression tests.
  1083. # This excludes some tests that are particularly resource-intensive.
  1084. test:       all platform
  1085.         $(TESTRUNNER) $(TESTOPTS)
  1086.  
  1087. # Run the full test suite twice - once without .pyc files, and once with.
  1088. # In the past, we've had problems where bugs in the marshalling or
  1089. # elsewhere caused bytecode read from .pyc files to behave differently
  1090. # than bytecode generated directly from a .py source file.  Sometimes
  1091. # the bytecode read from a .pyc file had the bug, sometimes the directly
  1092. # generated bytecode.  This is sometimes a very shy bug needing a lot of
  1093. # sample data.
  1094. testall:    all platform
  1095.         -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  1096.         $(TESTPYTHON) -E $(srcdir)/Lib/compileall.py
  1097.         -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  1098.         -$(TESTRUNNER) -u all $(TESTOPTS)
  1099.         $(TESTRUNNER) -u all $(TESTOPTS)
  1100.  
  1101. # Run the test suite for both architectures in a Universal build on OSX.
  1102. # Must be run on an Intel box.
  1103. testuniversal:  all platform
  1104.         @if [ `arch` != 'i386' ]; then \
  1105.             echo "This can only be used on OSX/i386" ;\
  1106.             exit 1 ;\
  1107.         fi
  1108.         $(TESTRUNNER) -u all $(TESTOPTS)
  1109.         $(RUNSHARED) /usr/libexec/oah/translate \
  1110.             ./$(BUILDPYTHON) -E -m test -j 0 -u all $(TESTOPTS)
  1111.  
  1112. # Like testall, but with only one pass and without multiple processes.
  1113. # Run an optional script to include information about the build environment.
  1114. buildbottest:   build_all platform
  1115.         -@if which pybuildbot.identify >/dev/null 2>&1; then \
  1116.             pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
  1117.         fi
  1118.         $(TESTRUNNER) -j 1 -u all -W --slowest --fail-env-changed --timeout=$(TESTTIMEOUT) $(TESTOPTS)
  1119.  
  1120. pythoninfo: build_all
  1121.         $(RUNSHARED) ./$(BUILDPYTHON) -m test.pythoninfo
  1122.  
  1123. QUICKTESTOPTS=  $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
  1124.         test_multibytecodec test_urllib2_localnet test_itertools \
  1125.         test_multiprocessing_fork test_multiprocessing_spawn \
  1126.         test_multiprocessing_forkserver \
  1127.         test_mailbox test_socket test_poll \
  1128.         test_select test_zipfile test_concurrent_futures
  1129. quicktest:  all platform
  1130.         $(TESTRUNNER) $(QUICKTESTOPTS)
  1131.  
  1132. # SSL tests
  1133. .PHONY: multisslcompile multissltest
  1134. multisslcompile: build_all
  1135.     $(RUNSHARED) ./$(BUILDPYTHON) Tools/ssl/multissltests.py --steps=modules
  1136.  
  1137. multissltest: build_all
  1138.     $(RUNSHARED) ./$(BUILDPYTHON) Tools/ssl/multissltests.py
  1139.  
  1140. install:  commoninstall bininstall maninstall
  1141.     if test "x$(ENSUREPIP)" != "xno"  ; then \
  1142.         case $(ENSUREPIP) in \
  1143.             upgrade) ensurepip="--upgrade" ;; \
  1144.             install|*) ensurepip="" ;; \
  1145.         esac; \
  1146.         $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
  1147.             $$ensurepip --root=$(DESTDIR)/ ; \
  1148.     fi
  1149.  
  1150. altinstall: commoninstall
  1151.     if test "x$(ENSUREPIP)" != "xno"  ; then \
  1152.         case $(ENSUREPIP) in \
  1153.             upgrade) ensurepip="--altinstall --upgrade" ;; \
  1154.             install|*) ensurepip="--altinstall" ;; \
  1155.         esac; \
  1156.         $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
  1157.             $$ensurepip --root=$(DESTDIR)/ ; \
  1158.     fi
  1159.  
  1160. commoninstall:  check-clean-src  \
  1161.         altbininstall libinstall inclinstall libainstall \
  1162.         sharedinstall oldsharedinstall altmaninstall \
  1163.        
  1164.  
  1165. # Install shared libraries enabled by Setup
  1166. DESTDIRS=   $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
  1167.  
  1168. oldsharedinstall: $(DESTSHARED) $(SHAREDMODS)
  1169.         @for i in X $(SHAREDMODS); do \
  1170.           if test $$i != X; then \
  1171.             echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
  1172.             $(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/`basename $$i`; \
  1173.           fi; \
  1174.         done
  1175.  
  1176. $(DESTSHARED):
  1177.         @for i in $(DESTDIRS); \
  1178.         do \
  1179.             if test ! -d $(DESTDIR)$$i; then \
  1180.                 echo "Creating directory $$i"; \
  1181.                 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  1182.             else    true; \
  1183.             fi; \
  1184.         done
  1185.  
  1186. # Install the interpreter with $(VERSION) affixed
  1187. # This goes into $(exec_prefix)
  1188. altbininstall: $(BUILDPYTHON)
  1189.     @for i in $(BINDIR) $(LIBDIR); \
  1190.     do \
  1191.         if test ! -d $(DESTDIR)$$i; then \
  1192.             echo "Creating directory $$i"; \
  1193.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  1194.         else    true; \
  1195.         fi; \
  1196.     done
  1197.     if test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \
  1198.         $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \
  1199.     else \
  1200.         $(INSTALL_PROGRAM) $(STRIPFLAG) Mac/pythonw $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \
  1201.     fi
  1202.     -if test "$(VERSION)" != "$(LDVERSION)"; then \
  1203.         if test -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE) -o -h $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
  1204.         then rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
  1205.         fi; \
  1206.         (cd $(DESTDIR)$(BINDIR); $(LN) python$(LDVERSION)$(EXE) python$(VERSION)$(EXE)); \
  1207.     fi
  1208.     if test -f $(LDLIBRARY) && test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \
  1209.         if test -n "$(DLLLIBRARY)" ; then \
  1210.             $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \
  1211.         else \
  1212.             $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
  1213.             if test $(LDLIBRARY) != $(INSTSONAME); then \
  1214.                 (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) $(LDLIBRARY)) \
  1215.             fi \
  1216.         fi; \
  1217.         if test -n "$(PY3LIBRARY)"; then \
  1218.             $(INSTALL_SHARED) $(PY3LIBRARY) $(DESTDIR)$(LIBDIR)/$(PY3LIBRARY); \
  1219.         fi; \
  1220.     else    true; \
  1221.     fi
  1222.     if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
  1223.         rm -f $(DESTDIR)$(BINDIR)python$(VERSION)-32$(EXE); \
  1224.         lipo $(LIPO_32BIT_FLAGS) \
  1225.             -output $(DESTDIR)$(BINDIR)/python$(VERSION)-32$(EXE) \
  1226.             $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
  1227.     fi
  1228.  
  1229. bininstall: altbininstall
  1230.     if test ! -d $(DESTDIR)$(LIBPC); then \
  1231.         echo "Creating directory $(LIBPC)"; \
  1232.         $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC); \
  1233.     fi
  1234.     -if test -f $(DESTDIR)$(BINDIR)/python3$(EXE) -o -h $(DESTDIR)$(BINDIR)/python3$(EXE); \
  1235.     then rm -f $(DESTDIR)$(BINDIR)/python3$(EXE); \
  1236.     else true; \
  1237.     fi
  1238.     (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) python3$(EXE))
  1239.     -if test "$(VERSION)" != "$(LDVERSION)"; then \
  1240.         rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config; \
  1241.         (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(LDVERSION)-config python$(VERSION)-config); \
  1242.         rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc; \
  1243.         (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python-$(LDVERSION).pc); \
  1244.     fi
  1245.     -rm -f $(DESTDIR)$(BINDIR)/python3-config
  1246.     (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config)
  1247.     -rm -f $(DESTDIR)$(LIBPC)/python3.pc
  1248.     (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc)
  1249.     -rm -f $(DESTDIR)$(BINDIR)/idle3
  1250.     (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
  1251.     -rm -f $(DESTDIR)$(BINDIR)/pydoc3
  1252.     (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
  1253.     -rm -f $(DESTDIR)$(BINDIR)/2to3
  1254.     (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
  1255.     -rm -f $(DESTDIR)$(BINDIR)/pyvenv
  1256.     (cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) pyvenv)
  1257.     if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
  1258.         rm -f $(DESTDIR)$(BINDIR)/python3-32$(EXE); \
  1259.         (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-32$(EXE) python3-32$(EXE)) \
  1260.     fi
  1261.  
  1262. # Install the versioned manual page
  1263. altmaninstall:
  1264.     @for i in $(MANDIR) $(MANDIR)/man1; \
  1265.     do \
  1266.         if test ! -d $(DESTDIR)$$i; then \
  1267.             echo "Creating directory $$i"; \
  1268.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  1269.         else    true; \
  1270.         fi; \
  1271.     done
  1272.     $(INSTALL_DATA) $(srcdir)/Misc/python.man \
  1273.         $(DESTDIR)$(MANDIR)/man1/python$(VERSION).1
  1274.  
  1275. # Install the unversioned manual page
  1276. maninstall: altmaninstall
  1277.     -rm -f $(DESTDIR)$(MANDIR)/man1/python3.1
  1278.     (cd $(DESTDIR)$(MANDIR)/man1; $(LN) -s python$(VERSION).1 python3.1)
  1279.  
  1280. # Install the library
  1281. XMLLIBSUBDIRS=  xml xml/dom xml/etree xml/parsers xml/sax
  1282. LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
  1283.         tkinter/test/test_ttk site-packages test \
  1284.         test/audiodata \
  1285.         test/capath test/data \
  1286.         test/cjkencodings test/decimaltestdata test/xmltestdata \
  1287.         test/dtracedata \
  1288.         test/eintrdata \
  1289.         test/imghdrdata \
  1290.         test/libregrtest \
  1291.         test/subprocessdata test/sndhdrdata test/support \
  1292.         test/tracedmodules test/encoded_modules \
  1293.         test/test_import \
  1294.         test/test_import/data \
  1295.         test/test_import/data/circular_imports \
  1296.         test/test_import/data/circular_imports/subpkg \
  1297.         test/test_import/data/package \
  1298.         test/test_import/data/package2 \
  1299.         importlib \
  1300.         test/test_importlib \
  1301.         test/test_importlib/builtin \
  1302.         test/test_importlib/data01 \
  1303.         test/test_importlib/data01/subdirectory \
  1304.         test/test_importlib/data02 \
  1305.         test/test_importlib/data02/one \
  1306.         test/test_importlib/data02/two \
  1307.         test/test_importlib/data03 \
  1308.         test/test_importlib/data03/namespace \
  1309.         test/test_importlib/data03/namespace/portion1 \
  1310.         test/test_importlib/data03/namespace/portion2 \
  1311.         test/test_importlib/extension \
  1312.         test/test_importlib/frozen \
  1313.         test/test_importlib/import_ \
  1314.         test/test_importlib/namespace_pkgs \
  1315.         test/test_importlib/namespace_pkgs/both_portions \
  1316.         test/test_importlib/namespace_pkgs/both_portions/foo \
  1317.         test/test_importlib/namespace_pkgs/module_and_namespace_package \
  1318.         test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
  1319.         test/test_importlib/namespace_pkgs/not_a_namespace_pkg \
  1320.         test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo \
  1321.         test/test_importlib/namespace_pkgs/portion1 \
  1322.         test/test_importlib/namespace_pkgs/portion1/foo \
  1323.         test/test_importlib/namespace_pkgs/portion2 \
  1324.         test/test_importlib/namespace_pkgs/portion2/foo \
  1325.         test/test_importlib/namespace_pkgs/project1 \
  1326.         test/test_importlib/namespace_pkgs/project1/parent \
  1327.         test/test_importlib/namespace_pkgs/project1/parent/child \
  1328.         test/test_importlib/namespace_pkgs/project2 \
  1329.         test/test_importlib/namespace_pkgs/project2/parent \
  1330.         test/test_importlib/namespace_pkgs/project2/parent/child \
  1331.         test/test_importlib/namespace_pkgs/project3 \
  1332.         test/test_importlib/namespace_pkgs/project3/parent \
  1333.         test/test_importlib/namespace_pkgs/project3/parent/child \
  1334.         test/test_importlib/source \
  1335.         test/test_importlib/zipdata01 \
  1336.         test/test_importlib/zipdata02 \
  1337.         asyncio \
  1338.         test/test_asyncio \
  1339.         collections concurrent concurrent/futures encodings \
  1340.         email email/mime test/test_email test/test_email/data \
  1341.         ensurepip ensurepip/_bundled \
  1342.         html json test/test_json http dbm xmlrpc \
  1343.         sqlite3 sqlite3/test \
  1344.         logging csv wsgiref urllib \
  1345.         lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \
  1346.         lib2to3/tests/data lib2to3/tests/data/fixers \
  1347.         lib2to3/tests/data/fixers/myfixes \
  1348.         ctypes ctypes/test ctypes/macholib \
  1349.         idlelib idlelib/Icons idlelib/idle_test \
  1350.         distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
  1351.         test/test_tools test/test_warnings test/test_warnings/data \
  1352.         turtledemo \
  1353.         multiprocessing multiprocessing/dummy \
  1354.         unittest unittest/test unittest/test/testmock \
  1355.         venv venv/scripts venv/scripts/common venv/scripts/posix \
  1356.         curses pydoc_data
  1357. libinstall: build_all $(srcdir)/Modules/xxmodule.c
  1358.     @for i in $(SCRIPTDIR) $(LIBDEST); \
  1359.     do \
  1360.         if test ! -d $(DESTDIR)$$i; then \
  1361.             echo "Creating directory $$i"; \
  1362.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  1363.         else    true; \
  1364.         fi; \
  1365.     done
  1366.     @for d in $(LIBSUBDIRS); \
  1367.     do \
  1368.         a=$(srcdir)/Lib/$$d; \
  1369.         if test ! -d $$a; then continue; else true; fi; \
  1370.         b=$(LIBDEST)/$$d; \
  1371.         if test ! -d $(DESTDIR)$$b; then \
  1372.             echo "Creating directory $$b"; \
  1373.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \
  1374.         else    true; \
  1375.         fi; \
  1376.     done
  1377.     @for i in $(srcdir)/Lib/*.py; \
  1378.     do \
  1379.         if test -x $$i; then \
  1380.             $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
  1381.             echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \
  1382.         else \
  1383.             $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
  1384.             echo $(INSTALL_DATA) $$i $(LIBDEST); \
  1385.         fi; \
  1386.     done
  1387.     @for d in $(LIBSUBDIRS); \
  1388.     do \
  1389.         a=$(srcdir)/Lib/$$d; \
  1390.         if test ! -d $$a; then continue; else true; fi; \
  1391.         if test `ls $$a | wc -l` -lt 1; then continue; fi; \
  1392.         b=$(LIBDEST)/$$d; \
  1393.         for i in $$a/*; \
  1394.         do \
  1395.             case $$i in \
  1396.             *CVS) ;; \
  1397.             *.py[co]) ;; \
  1398.             *.orig) ;; \
  1399.             *~) ;; \
  1400.             *) \
  1401.                 if test -d $$i; then continue; fi; \
  1402.                 if test -x $$i; then \
  1403.                     echo $(INSTALL_SCRIPT) $$i $$b; \
  1404.                     $(INSTALL_SCRIPT) $$i $(DESTDIR)$$b; \
  1405.                 else \
  1406.                     echo $(INSTALL_DATA) $$i $$b; \
  1407.                     $(INSTALL_DATA) $$i $(DESTDIR)$$b; \
  1408.                 fi;; \
  1409.             esac; \
  1410.         done; \
  1411.     done
  1412.     $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \
  1413.         $(DESTDIR)$(LIBDEST); \
  1414.     $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
  1415.     if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
  1416.         $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
  1417.             $(DESTDIR)$(LIBDEST)/distutils/tests ; \
  1418.     fi
  1419.     -PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
  1420.         $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
  1421.         -d $(LIBDEST) -f \
  1422.         -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
  1423.         $(DESTDIR)$(LIBDEST)
  1424.     -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1425.         $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
  1426.         -d $(LIBDEST) -f \
  1427.         -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
  1428.         $(DESTDIR)$(LIBDEST)
  1429.     -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1430.         $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
  1431.         -d $(LIBDEST) -f \
  1432.         -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
  1433.         $(DESTDIR)$(LIBDEST)
  1434.     -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1435.         $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
  1436.         -d $(LIBDEST)/site-packages -f \
  1437.         -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  1438.     -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1439.         $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
  1440.         -d $(LIBDEST)/site-packages -f \
  1441.         -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  1442.     -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1443.         $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
  1444.         -d $(LIBDEST)/site-packages -f \
  1445.         -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  1446.     -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1447.         $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
  1448.     -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1449.         $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
  1450.  
  1451. python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
  1452.     @ # Substitution happens here, as the completely-expanded BINDIR
  1453.     @ # is not available in configure
  1454.     sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py
  1455.     @ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}
  1456.     LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config
  1457.     @ # On Darwin, always use the python version of the script, the shell
  1458.     @ # version doesn't use the compiler customizations that are provided
  1459.     @ # in python (_osx_support.py).
  1460.     @if test `uname -s` = Darwin; then \
  1461.         cp python-config.py python-config; \
  1462.     fi
  1463.  
  1464.  
  1465. # Install the include files
  1466. INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
  1467. inclinstall:
  1468.     @for i in $(INCLDIRSTOMAKE); \
  1469.     do \
  1470.         if test ! -d $(DESTDIR)$$i; then \
  1471.             echo "Creating directory $$i"; \
  1472.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  1473.         else    true; \
  1474.         fi; \
  1475.     done
  1476.     @if test ! -d $(DESTDIR)$(INCLUDEPY)/internal; then \
  1477.         echo "Creating directory $(DESTDIR)$(INCLUDEPY)/internal"; \
  1478.         $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(INCLUDEPY)/internal; \
  1479.     else    true; \
  1480.     fi
  1481.     @for i in $(srcdir)/Include/*.h; \
  1482.     do \
  1483.         echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
  1484.         $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
  1485.     done
  1486.     @for i in $(srcdir)/Include/internal/*.h; \
  1487.     do \
  1488.         echo $(INSTALL_DATA) $$i $(INCLUDEPY)/internal; \
  1489.         $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY)/internal; \
  1490.     done
  1491.     $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
  1492.  
  1493. # Install the library and miscellaneous stuff needed for extending/embedding
  1494. # This goes into $(exec_prefix)
  1495. LIBPL=      $(prefix)/lib/python3.7/config-$(VERSION)$(ABIFLAGS)-x86_64-linux-gnu
  1496.  
  1497. # pkgconfig directory
  1498. LIBPC=      $(LIBDIR)/pkgconfig
  1499.  
  1500. libainstall:    all python-config
  1501.     @for i in $(LIBDIR) $(LIBPL) $(LIBPC); \
  1502.     do \
  1503.         if test ! -d $(DESTDIR)$$i; then \
  1504.             echo "Creating directory $$i"; \
  1505.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  1506.         else    true; \
  1507.         fi; \
  1508.     done
  1509.     @if test -d $(LIBRARY); then :; else \
  1510.         if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
  1511.             if test "$(SHLIB_SUFFIX)" = .dll; then \
  1512.                 $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
  1513.             else \
  1514.                 $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
  1515.             fi; \
  1516.         else \
  1517.             echo Skip install of $(LIBRARY) - use make frameworkinstall; \
  1518.         fi; \
  1519.     fi
  1520.     $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
  1521.     $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o
  1522.     $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
  1523.     $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
  1524.     $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
  1525.     $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
  1526.     $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
  1527.     $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
  1528.     $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
  1529.     $(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
  1530.     $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config
  1531.     @if [ -s Modules/python.exp -a \
  1532.         "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
  1533.         echo; echo "Installing support files for building shared extension modules on AIX:"; \
  1534.         $(INSTALL_DATA) Modules/python.exp      \
  1535.                 $(DESTDIR)$(LIBPL)/python.exp;      \
  1536.         echo; echo "$(LIBPL)/python.exp";       \
  1537.         $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix  \
  1538.                 $(DESTDIR)$(LIBPL)/makexp_aix;      \
  1539.         echo "$(LIBPL)/makexp_aix";         \
  1540.         $(INSTALL_SCRIPT) Modules/ld_so_aix \
  1541.                 $(DESTDIR)$(LIBPL)/ld_so_aix;       \
  1542.         echo "$(LIBPL)/ld_so_aix";          \
  1543.         echo; echo "See Misc/AIX-NOTES for details.";   \
  1544.     else true; \
  1545.     fi
  1546.  
  1547. # Install the dynamically loadable modules
  1548. # This goes into $(exec_prefix)
  1549. sharedinstall: sharedmods
  1550.     $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
  1551.         --prefix=$(prefix) \
  1552.         --install-scripts=$(BINDIR) \
  1553.         --install-platlib=$(DESTSHARED) \
  1554.         --root=$(DESTDIR)/
  1555.     -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py
  1556.     -rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
  1557.  
  1558. # Here are a couple of targets for MacOSX again, to install a full
  1559. # framework-based Python. frameworkinstall installs everything, the
  1560. # subtargets install specific parts. Much of the actual work is offloaded to
  1561. # the Makefile in Mac
  1562. #
  1563. #
  1564. # This target is here for backward compatibility, previous versions of Python
  1565. # hadn't integrated framework installation in the normal install process.
  1566. frameworkinstall: install
  1567.  
  1568. # On install, we re-make the framework
  1569. # structure in the install location, /Library/Frameworks/ or the argument to
  1570. # --enable-framework. If --enable-framework has been specified then we have
  1571. # automatically set prefix to the location deep down in the framework, so we
  1572. # only have to cater for the structural bits of the framework.
  1573.  
  1574. frameworkinstallframework: frameworkinstallstructure install frameworkinstallmaclib
  1575.  
  1576. frameworkinstallstructure:  $(LDLIBRARY)
  1577.     @if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
  1578.         echo Not configured with --enable-framework; \
  1579.         exit 1; \
  1580.     else true; \
  1581.     fi
  1582.     @for i in $(prefix)/Resources/English.lproj $(prefix)/lib; do\
  1583.         if test ! -d $(DESTDIR)$$i; then \
  1584.             echo "Creating directory $(DESTDIR)$$i"; \
  1585.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  1586.         else    true; \
  1587.         fi; \
  1588.     done
  1589.     $(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers
  1590.     sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
  1591.     $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
  1592.     $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
  1593.     $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
  1594.     $(LN) -fsn Versions/Current/Resources $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Resources
  1595.     $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(PYTHONFRAMEWORKPREFIX)/$(LDLIBRARY)
  1596.  
  1597. # This installs Mac/Lib into the framework
  1598. # Install a number of symlinks to keep software that expects a normal unix
  1599. # install (which includes python-config) happy.
  1600. frameworkinstallmaclib:
  1601.     $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).a"
  1602.     $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).dylib"
  1603.     $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).a"
  1604.     $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).dylib"
  1605.     $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(LDVERSION).dylib"
  1606.     $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(VERSION).dylib"
  1607.  
  1608. # This installs the IDE, the Launcher and other apps into /Applications
  1609. frameworkinstallapps:
  1610.     cd Mac && $(MAKE) installapps DESTDIR="$(DESTDIR)"
  1611.  
  1612. # Build the bootstrap executable that will spawn the interpreter inside
  1613. # an app bundle within the framework.  This allows the interpreter to
  1614. # run OS X GUI APIs.
  1615. frameworkpythonw:
  1616.     cd Mac && $(MAKE) pythonw
  1617.  
  1618. # This installs the python* and other bin symlinks in $prefix/bin or in
  1619. # a bin directory relative to the framework root
  1620. frameworkinstallunixtools:
  1621.     cd Mac && $(MAKE) installunixtools DESTDIR="$(DESTDIR)"
  1622.  
  1623. frameworkaltinstallunixtools:
  1624.     cd Mac && $(MAKE) altinstallunixtools DESTDIR="$(DESTDIR)"
  1625.  
  1626. # This installs the Tools into the applications directory.
  1627. # It is not part of a normal frameworkinstall
  1628. frameworkinstallextras:
  1629.     cd Mac && $(MAKE) installextras DESTDIR="$(DESTDIR)"
  1630.  
  1631. # This installs a few of the useful scripts in Tools/scripts
  1632. scriptsinstall:
  1633.     SRCDIR=$(srcdir) $(RUNSHARED) \
  1634.     $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/setup.py install \
  1635.     --prefix=$(prefix) \
  1636.     --install-scripts=$(BINDIR) \
  1637.     --root=$(DESTDIR)/
  1638.  
  1639. # Build the toplevel Makefile
  1640. Makefile.pre: $(srcdir)/Makefile.pre.in config.status
  1641.     CONFIG_FILES=Makefile.pre CONFIG_HEADERS= $(SHELL) config.status
  1642.     $(MAKE) -f Makefile.pre Makefile
  1643.  
  1644. # Run the configure script.
  1645. config.status:  $(srcdir)/configure
  1646.     $(SHELL) $(srcdir)/configure $(CONFIG_ARGS)
  1647.  
  1648. .PRECIOUS: config.status $(BUILDPYTHON) Makefile Makefile.pre
  1649.  
  1650. # Some make's put the object file in the current directory
  1651. .c.o:
  1652.     $(CC) -c $(PY_CORE_CFLAGS) -o $@ $<
  1653.  
  1654. # bpo-30104: dtoa.c uses union to cast double to unsigned long[2]. clang 4.0
  1655. # with -O2 or higher and strict aliasing miscompiles the ratio() function
  1656. # causing rounding issues. Compile dtoa.c using -fno-strict-aliasing on clang.
  1657. # https://bugs.llvm.org//show_bug.cgi?id=31928
  1658. Python/dtoa.o: Python/dtoa.c
  1659.     $(CC) -c $(PY_CORE_CFLAGS) $(CFLAGS_ALIASING) -o $@ $<
  1660.  
  1661. # Run reindent on the library
  1662. reindent:
  1663.     ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
  1664.  
  1665. # Rerun configure with the same options as it was run last time,
  1666. # provided the config.status script exists
  1667. recheck:
  1668.     $(SHELL) config.status --recheck
  1669.     $(SHELL) config.status
  1670.  
  1671. # Regenerate configure and pyconfig.h.in
  1672. .PHONY: autoconf
  1673. autoconf:
  1674.     # Regenerate the configure script from configure.ac using autoconf
  1675.     (cd $(srcdir); autoconf -Wall)
  1676.     # Regenerate pyconfig.h.in from configure.ac using autoheader
  1677.     (cd $(srcdir); autoheader -Wall)
  1678.  
  1679. # Create a tags file for vi
  1680. tags::
  1681.     ctags -w $(srcdir)/Include/*.h $(srcdir)/Include/internal/*.h
  1682.     for i in $(SRCDIRS); do ctags -f tags -w -a $(srcdir)/$$i/*.[ch]; done
  1683.     ctags -f tags -w -a $(srcdir)/Modules/_ctypes/*.[ch]
  1684.     LC_ALL=C sort -o tags tags
  1685.  
  1686. # Create a tags file for GNU Emacs
  1687. TAGS::
  1688.     cd $(srcdir); \
  1689.     etags Include/*.h Include/internal/*.h; \
  1690.     for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done
  1691.  
  1692. # Sanitation targets -- clean leaves libraries, executables and tags
  1693. # files, which clobber removes as well
  1694. pycremoval:
  1695.     -find $(srcdir) -depth -name '__pycache__' -exec rm -rf {} ';'
  1696.     -find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
  1697.  
  1698. rmtestturds:
  1699.     -rm -f *BAD *GOOD *SKIPPED
  1700.     -rm -rf OUT
  1701.     -rm -f *.TXT
  1702.     -rm -f *.txt
  1703.     -rm -f gb-18030-2000.xml
  1704.  
  1705. docclean:
  1706.     -rm -rf Doc/build
  1707.     -rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils
  1708.  
  1709. clean: pycremoval
  1710.     find . -name '*.[oa]' -exec rm -f {} ';'
  1711.     find . -name '*.s[ol]' -exec rm -f {} ';'
  1712.     find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
  1713.     find build -name 'fficonfig.h' -exec rm -f {} ';' || true
  1714.     find build -name '*.py' -exec rm -f {} ';' || true
  1715.     find build -name '*.py[co]' -exec rm -f {} ';' || true
  1716.     -rm -f pybuilddir.txt
  1717.     -rm -f Lib/lib2to3/*Grammar*.pickle
  1718.     -rm -f Programs/_testembed Programs/_freeze_importlib
  1719.     -find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
  1720.     -rm -f Include/pydtrace_probes.h
  1721.     -rm -f profile-gen-stamp
  1722.  
  1723. profile-removal:
  1724.     find . -name '*.gc??' -exec rm -f {} ';'
  1725.     find . -name '*.profclang?' -exec rm -f {} ';'
  1726.     find . -name '*.dyn' -exec rm -f {} ';'
  1727.     rm -f $(COVERAGE_INFO)
  1728.     rm -rf $(COVERAGE_REPORT)
  1729.     rm -f profile-run-stamp
  1730.  
  1731. clobber: clean profile-removal
  1732.     -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
  1733.         tags TAGS \
  1734.         config.cache config.log pyconfig.h Modules/config.c
  1735.     -rm -rf build platform
  1736.     -rm -rf $(PYTHONFRAMEWORKDIR)
  1737.     -rm -f python-config.py python-config
  1738.     -rm -f profile-gen-stamp profile-clean-stamp
  1739.  
  1740. # Make things extra clean, before making a distribution:
  1741. # remove all generated files, even Makefile[.pre]
  1742. # Keep configure and Python-ast.[ch], it's possible they can't be generated
  1743. distclean: clobber
  1744.     for file in $(srcdir)/Lib/test/data/* ; do \
  1745.         if test "$$file" != "$(srcdir)/Lib/test/data/README"; then rm "$$file"; fi; \
  1746.     done
  1747.     -rm -f core Makefile Makefile.pre config.status \
  1748.         Modules/Setup Modules/Setup.local \
  1749.         Modules/ld_so_aix Modules/python.exp Misc/python.pc \
  1750.         Misc/python-config.sh
  1751.     -rm -f python*-gdb.py
  1752.     # Issue #28258: set LC_ALL to avoid issues with Estonian locale.
  1753.     # Expansion is performed here by shell (spawned by make) itself before
  1754.     # arguments are passed to find. So LC_ALL=C must be set as a separate
  1755.     # command.
  1756.     LC_ALL=C; find $(srcdir)/[a-zA-Z]* '(' -name '*.fdc' -o -name '*~' \
  1757.                      -o -name '[@,#]*' -o -name '*.old' \
  1758.                      -o -name '*.orig' -o -name '*.rej' \
  1759.                      -o -name '*.bak' ')' \
  1760.                      -exec rm -f {} ';'
  1761.  
  1762. # Check that all symbols exported by libpython start with "Py" or "_Py"
  1763. smelly: all
  1764.     $(RUNSHARED) ./$(BUILDPYTHON) Tools/scripts/smelly.py
  1765.  
  1766. # Find files with funny names
  1767. funny:
  1768.     find $(SUBDIRS) $(SUBDIRSTOO) \
  1769.         -type d \
  1770.         -o -name '*.[chs]' \
  1771.         -o -name '*.py' \
  1772.         -o -name '*.pyw' \
  1773.         -o -name '*.dat' \
  1774.         -o -name '*.el' \
  1775.         -o -name '*.fd' \
  1776.         -o -name '*.in' \
  1777.         -o -name '*.gif' \
  1778.         -o -name '*.txt' \
  1779.         -o -name '*.xml' \
  1780.         -o -name '*.xbm' \
  1781.         -o -name '*.xpm' \
  1782.         -o -name '*.uue' \
  1783.         -o -name '*.decTest' \
  1784.         -o -name '*.tmCommand' \
  1785.         -o -name '*.tmSnippet' \
  1786.         -o -name 'Setup' \
  1787.         -o -name 'Setup.*' \
  1788.         -o -name README \
  1789.         -o -name NEWS \
  1790.         -o -name HISTORY \
  1791.         -o -name Makefile \
  1792.         -o -name ChangeLog \
  1793.         -o -name .hgignore \
  1794.         -o -name MANIFEST \
  1795.         -o -print
  1796.  
  1797. # Perform some verification checks on any modified files.
  1798. patchcheck: all
  1799.     $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
  1800.  
  1801. # Dependencies
  1802.  
  1803. Python/thread.o:  $(srcdir)/Python/thread_nt.h $(srcdir)/Python/thread_pthread.h
  1804.  
  1805. # Declare targets that aren't real files
  1806. .PHONY: all build_all sharedmods check-clean-src oldsharedmods test quicktest
  1807. .PHONY: install altinstall oldsharedinstall bininstall altbininstall
  1808. .PHONY: maninstall libinstall inclinstall libainstall sharedinstall
  1809. .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
  1810. .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
  1811. .PHONY: frameworkaltinstallunixtools recheck clean clobber distclean
  1812. .PHONY: smelly funny patchcheck touch altmaninstall commoninstall
  1813. .PHONY: gdbhooks
  1814.  
  1815. # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
  1816. # Local Variables:
  1817. # mode: makefile
  1818. # End:
  1819.  
  1820. # Rules appended by makedepend
  1821.  
  1822. Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -DPy_BUILD_CORE -c $(srcdir)/Modules/posixmodule.c -o Modules/posixmodule.o
  1823. Modules/posix$(EXT_SUFFIX):  Modules/posixmodule.o; $(BLDSHARED)  Modules/posixmodule.o   -o Modules/posix$(EXT_SUFFIX)
  1824. Modules/errnomodule.o: $(srcdir)/Modules/errnomodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/errnomodule.c -o Modules/errnomodule.o
  1825. Modules/errno$(EXT_SUFFIX):  Modules/errnomodule.o; $(BLDSHARED)  Modules/errnomodule.o   -o Modules/errno$(EXT_SUFFIX)
  1826. Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/pwdmodule.c -o Modules/pwdmodule.o
  1827. Modules/pwd$(EXT_SUFFIX):  Modules/pwdmodule.o; $(BLDSHARED)  Modules/pwdmodule.o   -o Modules/pwd$(EXT_SUFFIX)
  1828. Modules/_sre.o: $(srcdir)/Modules/_sre.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/_sre.c -o Modules/_sre.o
  1829. Modules/_sre$(EXT_SUFFIX):  Modules/_sre.o; $(BLDSHARED)  Modules/_sre.o   -o Modules/_sre$(EXT_SUFFIX)
  1830. Modules/_codecsmodule.o: $(srcdir)/Modules/_codecsmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/_codecsmodule.c -o Modules/_codecsmodule.o
  1831. Modules/_codecs$(EXT_SUFFIX):  Modules/_codecsmodule.o; $(BLDSHARED)  Modules/_codecsmodule.o   -o Modules/_codecs$(EXT_SUFFIX)
  1832. Modules/_weakref.o: $(srcdir)/Modules/_weakref.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/_weakref.c -o Modules/_weakref.o
  1833. Modules/_weakref$(EXT_SUFFIX):  Modules/_weakref.o; $(BLDSHARED)  Modules/_weakref.o   -o Modules/_weakref$(EXT_SUFFIX)
  1834. Modules/_functoolsmodule.o: $(srcdir)/Modules/_functoolsmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -DPy_BUILD_CORE -c $(srcdir)/Modules/_functoolsmodule.c -o Modules/_functoolsmodule.o
  1835. Modules/_functools$(EXT_SUFFIX):  Modules/_functoolsmodule.o; $(BLDSHARED)  Modules/_functoolsmodule.o   -o Modules/_functools$(EXT_SUFFIX)
  1836. Modules/_operator.o: $(srcdir)/Modules/_operator.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/_operator.c -o Modules/_operator.o
  1837. Modules/_operator$(EXT_SUFFIX):  Modules/_operator.o; $(BLDSHARED)  Modules/_operator.o   -o Modules/_operator$(EXT_SUFFIX)
  1838. Modules/_collectionsmodule.o: $(srcdir)/Modules/_collectionsmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/_collectionsmodule.c -o Modules/_collectionsmodule.o
  1839. Modules/_collections$(EXT_SUFFIX):  Modules/_collectionsmodule.o; $(BLDSHARED)  Modules/_collectionsmodule.o   -o Modules/_collections$(EXT_SUFFIX)
  1840. Modules/_abc.o: $(srcdir)/Modules/_abc.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/_abc.c -o Modules/_abc.o
  1841. Modules/_abc$(EXT_SUFFIX):  Modules/_abc.o; $(BLDSHARED)  Modules/_abc.o   -o Modules/_abc$(EXT_SUFFIX)
  1842. Modules/itertoolsmodule.o: $(srcdir)/Modules/itertoolsmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/itertoolsmodule.c -o Modules/itertoolsmodule.o
  1843. Modules/itertools$(EXT_SUFFIX):  Modules/itertoolsmodule.o; $(BLDSHARED)  Modules/itertoolsmodule.o   -o Modules/itertools$(EXT_SUFFIX)
  1844. Modules/atexitmodule.o: $(srcdir)/Modules/atexitmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/atexitmodule.c -o Modules/atexitmodule.o
  1845. Modules/atexit$(EXT_SUFFIX):  Modules/atexitmodule.o; $(BLDSHARED)  Modules/atexitmodule.o   -o Modules/atexit$(EXT_SUFFIX)
  1846. Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -DPy_BUILD_CORE -c $(srcdir)/Modules/signalmodule.c -o Modules/signalmodule.o
  1847. Modules/_signal$(EXT_SUFFIX):  Modules/signalmodule.o; $(BLDSHARED)  Modules/signalmodule.o   -o Modules/_signal$(EXT_SUFFIX)
  1848. Modules/_stat.o: $(srcdir)/Modules/_stat.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/_stat.c -o Modules/_stat.o
  1849. Modules/_stat$(EXT_SUFFIX):  Modules/_stat.o; $(BLDSHARED)  Modules/_stat.o   -o Modules/_stat$(EXT_SUFFIX)
  1850. Modules/timemodule.o: $(srcdir)/Modules/timemodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -DPy_BUILD_CORE -c $(srcdir)/Modules/timemodule.c -o Modules/timemodule.o
  1851. Modules/time$(EXT_SUFFIX):  Modules/timemodule.o; $(BLDSHARED)  Modules/timemodule.o   -o Modules/time$(EXT_SUFFIX)
  1852. Modules/_threadmodule.o: $(srcdir)/Modules/_threadmodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -DPy_BUILD_CORE -c $(srcdir)/Modules/_threadmodule.c -o Modules/_threadmodule.o
  1853. Modules/_thread$(EXT_SUFFIX):  Modules/_threadmodule.o; $(BLDSHARED)  Modules/_threadmodule.o   -o Modules/_thread$(EXT_SUFFIX)
  1854. Modules/_localemodule.o: $(srcdir)/Modules/_localemodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/_localemodule.c -o Modules/_localemodule.o
  1855. Modules/_locale$(EXT_SUFFIX):  Modules/_localemodule.o; $(BLDSHARED)  Modules/_localemodule.o   -o Modules/_locale$(EXT_SUFFIX)
  1856. Modules/_iomodule.o: $(srcdir)/Modules/_io/_iomodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -DPy_BUILD_CORE -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/_iomodule.c -o Modules/_iomodule.o
  1857. Modules/iobase.o: $(srcdir)/Modules/_io/iobase.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -DPy_BUILD_CORE -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/iobase.c -o Modules/iobase.o
  1858. Modules/fileio.o: $(srcdir)/Modules/_io/fileio.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -DPy_BUILD_CORE -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/fileio.c -o Modules/fileio.o
  1859. Modules/bytesio.o: $(srcdir)/Modules/_io/bytesio.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -DPy_BUILD_CORE -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/bytesio.c -o Modules/bytesio.o
  1860. Modules/bufferedio.o: $(srcdir)/Modules/_io/bufferedio.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -DPy_BUILD_CORE -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/bufferedio.c -o Modules/bufferedio.o
  1861. Modules/textio.o: $(srcdir)/Modules/_io/textio.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -DPy_BUILD_CORE -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/textio.c -o Modules/textio.o
  1862. Modules/stringio.o: $(srcdir)/Modules/_io/stringio.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -DPy_BUILD_CORE -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/stringio.c -o Modules/stringio.o
  1863. Modules/_io$(EXT_SUFFIX):  Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o; $(BLDSHARED)  Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o   -o Modules/_io$(EXT_SUFFIX)
  1864. Modules/zipimport.o: $(srcdir)/Modules/zipimport.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -DPy_BUILD_CORE -c $(srcdir)/Modules/zipimport.c -o Modules/zipimport.o
  1865. Modules/zipimport$(EXT_SUFFIX):  Modules/zipimport.o; $(BLDSHARED)  Modules/zipimport.o   -o Modules/zipimport$(EXT_SUFFIX)
  1866. Modules/faulthandler.o: $(srcdir)/Modules/faulthandler.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/faulthandler.c -o Modules/faulthandler.o
  1867. Modules/faulthandler$(EXT_SUFFIX):  Modules/faulthandler.o; $(BLDSHARED)  Modules/faulthandler.o   -o Modules/faulthandler$(EXT_SUFFIX)
  1868. Modules/_tracemalloc.o: $(srcdir)/Modules/_tracemalloc.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/_tracemalloc.c -o Modules/_tracemalloc.o
  1869. Modules/hashtable.o: $(srcdir)/Modules/hashtable.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/hashtable.c -o Modules/hashtable.o
  1870. Modules/_tracemalloc$(EXT_SUFFIX):  Modules/_tracemalloc.o Modules/hashtable.o; $(BLDSHARED)  Modules/_tracemalloc.o Modules/hashtable.o   -o Modules/_tracemalloc$(EXT_SUFFIX)
  1871. Modules/symtablemodule.o: $(srcdir)/Modules/symtablemodule.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/symtablemodule.c -o Modules/symtablemodule.o
  1872. Modules/_symtable$(EXT_SUFFIX):  Modules/symtablemodule.o; $(BLDSHARED)  Modules/symtablemodule.o   -o Modules/_symtable$(EXT_SUFFIX)
  1873. Modules/xxsubtype.o: $(srcdir)/Modules/xxsubtype.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS)  -c $(srcdir)/Modules/xxsubtype.c -o Modules/xxsubtype.o
  1874. Modules/xxsubtype$(EXT_SUFFIX):  Modules/xxsubtype.o; $(BLDSHARED)  Modules/xxsubtype.o   -o Modules/xxsubtype$(EXT_SUFFIX)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement