Makefile 111 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721
  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. # === Variables set by makesetup ===
  22. MODBUILT_NAMES= atexit faulthandler posix _signal _tracemalloc _codecs _collections errno _io itertools _sre _thread time _weakref _abc _functools _locale _operator _stat _symtable pwd xxsubtype
  23. MODSHARED_NAMES=
  24. MODDISABLED_NAMES=
  25. MODOBJS= Modules/atexitmodule.o Modules/faulthandler.o Modules/posixmodule.o Modules/signalmodule.o Modules/_tracemalloc.o Modules/_codecsmodule.o Modules/_collectionsmodule.o Modules/errnomodule.o Modules/_io/_iomodule.o Modules/_io/iobase.o Modules/_io/fileio.o Modules/_io/bytesio.o Modules/_io/bufferedio.o Modules/_io/textio.o Modules/_io/stringio.o Modules/itertoolsmodule.o Modules/_sre/sre.o Modules/_threadmodule.o Modules/timemodule.o Modules/_weakref.o Modules/_abc.o Modules/_functoolsmodule.o Modules/_localemodule.o Modules/_operator.o Modules/_stat.o Modules/symtablemodule.o Modules/pwdmodule.o Modules/xxsubtype.o
  26. MODLIBS= $(LOCALMODLIBS) $(BASEMODLIBS)
  27. # === Variables set by configure
  28. VERSION= 3.11
  29. srcdir= ..
  30. VPATH= ..
  31. abs_srcdir= /root/Python-3.11.2/build-arm64/..
  32. abs_builddir= /root/Python-3.11.2/build-arm64
  33. CC= /root/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang
  34. CXX= /root/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang++
  35. MAINCC= $(CC)
  36. LINKCC= $(PURIFY) $(MAINCC)
  37. AR= /root/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
  38. READELF= /root/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-readelf
  39. SOABI= cpython-311
  40. LDVERSION= $(VERSION)$(ABIFLAGS)
  41. LIBPYTHON= -lpython3.11
  42. GITVERSION=
  43. GITTAG=
  44. GITBRANCH=
  45. PGO_PROF_GEN_FLAG=-fprofile-instr-generate
  46. PGO_PROF_USE_FLAG=-fprofile-instr-use=code.profclangd
  47. LLVM_PROF_MERGER=/root/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-profdata merge -output=code.profclangd *.profclangr
  48. LLVM_PROF_FILE=LLVM_PROFILE_FILE="code-%p.profclangr"
  49. LLVM_PROF_ERR=no
  50. DTRACE=
  51. DFLAGS=
  52. DTRACE_HEADERS=
  53. DTRACE_OBJS=
  54. GNULD= yes
  55. # Shell used by make (some versions default to the login shell, which is bad)
  56. SHELL= /bin/sh
  57. # Use this to make a link between python$(VERSION) and python in $(BINDIR)
  58. LN= ln
  59. # Portable install script (configure doesn't always guess right)
  60. INSTALL= /usr/bin/install -c
  61. INSTALL_PROGRAM=${INSTALL}
  62. INSTALL_SCRIPT= ${INSTALL}
  63. INSTALL_DATA= ${INSTALL} -m 644
  64. # Shared libraries must be installed with executable mode on some systems;
  65. # rather than figuring out exactly which, we always give them executable mode.
  66. INSTALL_SHARED= ${INSTALL} -m 755
  67. MKDIR_P= /usr/bin/mkdir -p
  68. MAKESETUP= $(srcdir)/Modules/makesetup
  69. # Compiler options
  70. OPT= -DNDEBUG -g -fwrapv -O3 -Wall
  71. BASECFLAGS=
  72. BASECPPFLAGS= -IObjects -IInclude -IPython
  73. CONFIGURE_CFLAGS= -fPIC -I/root/android-libs/include -D__ANDROID__
  74. # CFLAGS_NODIST is used for building the interpreter and stdlib C extensions.
  75. # Use it when a compiler flag should _not_ be part of the distutils CFLAGS
  76. # once Python is installed (Issue #21121).
  77. CONFIGURE_CFLAGS_NODIST= -std=c11 -Werror=implicit-function-declaration -fvisibility=hidden
  78. # LDFLAGS_NODIST is used in the same manner as CFLAGS_NODIST.
  79. # Use it when a linker flag should _not_ be part of the distutils LDFLAGS
  80. # once Python is installed (bpo-35257)
  81. CONFIGURE_LDFLAGS_NODIST=
  82. # LDFLAGS_NOLTO is an extra flag to disable lto. It is used to speed up building
  83. # of _bootstrap_python and _freeze_module tools, which don't need LTO.
  84. CONFIGURE_LDFLAGS_NOLTO=
  85. CONFIGURE_CPPFLAGS=
  86. CONFIGURE_LDFLAGS= -L/root/android-libs/lib -lz -lssl -lcrypto
  87. # Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the
  88. # command line to append to these values without stomping the pre-set
  89. # values.
  90. PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
  91. PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include/internal
  92. # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
  93. # be able to build extension modules using the directories specified in the
  94. # environment variables
  95. PY_CPPFLAGS= $(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)
  96. PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS)
  97. PY_LDFLAGS_NODIST=$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST)
  98. PY_LDFLAGS_NOLTO=$(PY_LDFLAGS) $(CONFIGURE_LDFLAGS_NOLTO) $(LDFLAGS_NODIST)
  99. NO_AS_NEEDED=
  100. CCSHARED=
  101. # LINKFORSHARED are the flags passed to the $(CC) command that links
  102. # the python executable -- this is only needed for a few systems
  103. LINKFORSHARED= -pie -Xlinker -export-dynamic
  104. ARFLAGS= rcs
  105. # Extra C flags added for building the interpreter object files.
  106. CFLAGSFORSHARED=
  107. # C flags used for building the interpreter object files
  108. PY_STDMODULE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED)
  109. PY_BUILTIN_MODULE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN
  110. PY_CORE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE
  111. # Linker flags used for building the interpreter object files
  112. PY_CORE_LDFLAGS=$(PY_LDFLAGS) $(PY_LDFLAGS_NODIST)
  113. # Strict or non-strict aliasing flags used to compile dtoa.c, see above
  114. CFLAGS_ALIASING=-fno-strict-aliasing
  115. # Machine-dependent subdirectories
  116. MACHDEP= linux
  117. # Multiarch directory (may be empty)
  118. MULTIARCH= aarch64-linux-android
  119. MULTIARCH_CPPFLAGS = -DMULTIARCH=\"aarch64-linux-android\"
  120. # Install prefix for architecture-independent files
  121. prefix= /root/android-libs
  122. # Install prefix for architecture-dependent files
  123. exec_prefix= ${prefix}
  124. # Install prefix for data files
  125. datarootdir= ${prefix}/share
  126. # Expanded directories
  127. BINDIR= ${exec_prefix}/bin
  128. LIBDIR= ${exec_prefix}/lib
  129. MANDIR= ${datarootdir}/man
  130. INCLUDEDIR= ${prefix}/include
  131. CONFINCLUDEDIR= $(exec_prefix)/include
  132. PLATLIBDIR= lib
  133. SCRIPTDIR= $(prefix)/$(PLATLIBDIR)
  134. ABIFLAGS=
  135. # Variable used by ensurepip
  136. WHEEL_PKG_DIR=
  137. # Detailed destination directories
  138. BINLIBDEST= $(LIBDIR)/python$(VERSION)
  139. LIBDEST= $(SCRIPTDIR)/python$(VERSION)
  140. INCLUDEPY= $(INCLUDEDIR)/python$(LDVERSION)
  141. CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(LDVERSION)
  142. # Symbols used for using shared libraries
  143. SHLIB_SUFFIX= .so
  144. EXT_SUFFIX= .cpython-311.so
  145. LDSHARED= $(CC) -shared $(PY_LDFLAGS)
  146. BLDSHARED= $(CC) -shared $(PY_CORE_LDFLAGS)
  147. LDCXXSHARED= $(CXX) -shared
  148. DESTSHARED= $(BINLIBDEST)/lib-dynload
  149. # List of exported symbols for AIX
  150. EXPORTSYMS=
  151. EXPORTSFROM=
  152. # Executable suffix (.exe on Windows and Mac OS X)
  153. EXE=
  154. BUILDEXE=
  155. # Short name and location for Mac OS X Python framework
  156. UNIVERSALSDK=
  157. PYTHONFRAMEWORK=
  158. PYTHONFRAMEWORKDIR= no-framework
  159. PYTHONFRAMEWORKPREFIX=
  160. PYTHONFRAMEWORKINSTALLDIR=
  161. # Deployment target selected during configure, to be checked
  162. # by distutils. The export statement is needed to ensure that the
  163. # deployment target is active during build.
  164. MACOSX_DEPLOYMENT_TARGET=
  165. #export MACOSX_DEPLOYMENT_TARGET
  166. # Option to install to strip binaries
  167. STRIPFLAG=-s
  168. # Flags to lipo to produce a 32-bit-only universal executable
  169. LIPO_32BIT_FLAGS=
  170. # Flags to lipo to produce an intel-64-only universal executable
  171. LIPO_INTEL64_FLAGS=
  172. # Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
  173. OTHER_LIBTOOL_OPT=
  174. # Environment to run shared python without installed libraries
  175. RUNSHARED=
  176. # ensurepip options
  177. ENSUREPIP= upgrade
  178. # Internal static libraries
  179. LIBMPDEC_A= Modules/_decimal/libmpdec/libmpdec.a
  180. LIBEXPAT_A= Modules/expat/libexpat.a
  181. # OpenSSL options for setup.py so sysconfig can pick up AC_SUBST() vars.
  182. OPENSSL_INCLUDES=
  183. OPENSSL_LIBS=-lssl -lcrypto
  184. OPENSSL_LDFLAGS=
  185. OPENSSL_RPATH=
  186. # Module state, compiler flags and linker flags
  187. # Empty CFLAGS and LDFLAGS are omitted.
  188. # states:
  189. # * yes: module is available
  190. # * missing: build dependency is missing
  191. # * disabled: module is disabled
  192. # * n/a: module is not available on the current platform
  193. # MODULE_EGG_STATE=yes # yes, missing, disabled, n/a
  194. # MODULE_EGG_CFLAGS=
  195. # MODULE_EGG_LDFLAGS=
  196. MODULE__IO_STATE=yes
  197. MODULE__IO_CFLAGS=-I$(srcdir)/Modules/_io
  198. MODULE_TIME_STATE=yes
  199. MODULE_TIME_LDFLAGS=
  200. MODULE_ARRAY_STATE=yes
  201. MODULE__ASYNCIO_STATE=yes
  202. MODULE__BISECT_STATE=yes
  203. MODULE__CONTEXTVARS_STATE=yes
  204. MODULE__CSV_STATE=yes
  205. MODULE__HEAPQ_STATE=yes
  206. MODULE__JSON_STATE=yes
  207. MODULE__LSPROF_STATE=yes
  208. MODULE__OPCODE_STATE=yes
  209. MODULE__PICKLE_STATE=yes
  210. MODULE__POSIXSUBPROCESS_STATE=yes
  211. MODULE__QUEUE_STATE=yes
  212. MODULE__RANDOM_STATE=yes
  213. MODULE_SELECT_STATE=yes
  214. MODULE__STRUCT_STATE=yes
  215. MODULE__TYPING_STATE=yes
  216. MODULE__XXSUBINTERPRETERS_STATE=yes
  217. MODULE__ZONEINFO_STATE=yes
  218. MODULE__MULTIPROCESSING_STATE=yes
  219. MODULE__MULTIPROCESSING_CFLAGS=-I$(srcdir)/Modules/_multiprocessing
  220. MODULE__POSIXSHMEM_STATE=missing
  221. MODULE_AUDIOOP_STATE=yes
  222. MODULE_AUDIOOP_LDFLAGS=-lm
  223. MODULE__STATISTICS_STATE=yes
  224. MODULE__STATISTICS_LDFLAGS=-lm
  225. MODULE_CMATH_STATE=yes
  226. MODULE_CMATH_LDFLAGS=-lm
  227. MODULE_MATH_STATE=yes
  228. MODULE_MATH_LDFLAGS=-lm
  229. MODULE__DATETIME_STATE=yes
  230. MODULE__DATETIME_LDFLAGS= -lm
  231. MODULE_FCNTL_STATE=yes
  232. MODULE_FCNTL_LDFLAGS=
  233. MODULE_MMAP_STATE=yes
  234. MODULE__SOCKET_STATE=yes
  235. MODULE_GRP_STATE=yes
  236. MODULE_OSSAUDIODEV_STATE=yes
  237. MODULE_OSSAUDIODEV_LDFLAGS=
  238. MODULE_PWD_STATE=yes
  239. MODULE_RESOURCE_STATE=yes
  240. MODULE__SCPROXY_STATE=n/a
  241. MODULE_SPWD_STATE=missing
  242. MODULE_SYSLOG_STATE=yes
  243. MODULE_TERMIOS_STATE=yes
  244. MODULE_PYEXPAT_STATE=yes
  245. MODULE_PYEXPAT_CFLAGS=-I$(srcdir)/Modules/expat
  246. MODULE_PYEXPAT_LDFLAGS=-lm $(LIBEXPAT_A)
  247. MODULE__ELEMENTTREE_STATE=yes
  248. MODULE__ELEMENTTREE_CFLAGS=-I$(srcdir)/Modules/expat
  249. MODULE__CODECS_CN_STATE=yes
  250. MODULE__CODECS_HK_STATE=yes
  251. MODULE__CODECS_ISO2022_STATE=yes
  252. MODULE__CODECS_JP_STATE=yes
  253. MODULE__CODECS_KR_STATE=yes
  254. MODULE__CODECS_TW_STATE=yes
  255. MODULE__MULTIBYTECODEC_STATE=yes
  256. MODULE_UNICODEDATA_STATE=yes
  257. MODULE__MD5_STATE=yes
  258. MODULE__SHA1_STATE=yes
  259. MODULE__SHA256_STATE=yes
  260. MODULE__SHA512_STATE=yes
  261. MODULE__SHA3_STATE=yes
  262. MODULE__BLAKE2_STATE=yes
  263. MODULE__BLAKE2_CFLAGS=
  264. MODULE__BLAKE2_LDFLAGS=
  265. MODULE__CRYPT_STATE=missing
  266. MODULE__DECIMAL_STATE=yes
  267. MODULE__DECIMAL_CFLAGS=-I$(srcdir)/Modules/_decimal/libmpdec -DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1
  268. MODULE__DECIMAL_LDFLAGS=-lm $(LIBMPDEC_A)
  269. MODULE__GDBM_STATE=missing
  270. MODULE_NIS_STATE=missing
  271. MODULE__SQLITE3_STATE=disabled
  272. MODULE__TKINTER_STATE=missing
  273. MODULE__UUID_STATE=missing
  274. MODULE_ZLIB_STATE=yes
  275. MODULE_ZLIB_CFLAGS=
  276. MODULE_ZLIB_LDFLAGS=-lz
  277. MODULE_BINASCII_STATE=yes
  278. MODULE_BINASCII_CFLAGS=-DUSE_ZLIB_CRC32
  279. MODULE_BINASCII_LDFLAGS=-lz
  280. MODULE__BZ2_STATE=missing
  281. MODULE__LZMA_STATE=missing
  282. MODULE__SSL_STATE=yes
  283. MODULE__SSL_CFLAGS=
  284. MODULE__SSL_LDFLAGS= -lssl -lcrypto
  285. MODULE__HASHLIB_STATE=yes
  286. MODULE__HASHLIB_CFLAGS=
  287. MODULE__HASHLIB_LDFLAGS= -lcrypto
  288. MODULE__TESTCAPI_STATE=yes
  289. MODULE__TESTCLINIC_STATE=yes
  290. MODULE__TESTINTERNALCAPI_STATE=yes
  291. MODULE__TESTBUFFER_STATE=yes
  292. MODULE__TESTIMPORTMULTIPLE_STATE=yes
  293. MODULE__TESTMULTIPHASE_STATE=yes
  294. MODULE__XXTESTFUZZ_STATE=yes
  295. MODULE__CTYPES_TEST_STATE=yes
  296. MODULE__CTYPES_TEST_LDFLAGS=-lm
  297. MODULE_XXLIMITED_STATE=yes
  298. MODULE_XXLIMITED_35_STATE=yes
  299. # Default zoneinfo.TZPATH. Added here to expose it in sysconfig.get_config_var
  300. TZPATH=/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo
  301. # Modes for directories, executables and data files created by the
  302. # install process. Default to user-only-writable for all file types.
  303. DIRMODE= 755
  304. EXEMODE= 755
  305. FILEMODE= 644
  306. # configure script arguments
  307. CONFIG_ARGS= '--host=aarch64-linux-android' '--build=x86_64-linux-gnu' '--disable-shared' '--prefix=/root/android-libs' '--with-build-python=/root/python-3.11.2-host/bin/python3' '--disable-ipv6' 'CFLAGS=-fPIC -I/root/android-libs/include -D__ANDROID__' 'LDFLAGS=-L/root/android-libs/lib -lz -lssl -lcrypto' 'build_alias=x86_64-linux-gnu' 'host_alias=aarch64-linux-android' 'CC=/root/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang'
  308. # Subdirectories with code
  309. SRCDIRS= Modules Modules/_blake2 Modules/_ctypes Modules/_decimal Modules/_decimal/libmpdec Modules/_io Modules/_multiprocessing Modules/_sha3 Modules/_sqlite Modules/_sre Modules/_xxtestfuzz Modules/cjkcodecs Modules/expat Objects Parser Programs Python Python/frozen_modules Python/deepfreeze
  310. # Other subdirectories
  311. SUBDIRSTOO= Include Lib Misc
  312. # assets for Emscripten browser builds
  313. WASM_ASSETS_DIR=.$(prefix)
  314. WASM_STDLIB=$(WASM_ASSETS_DIR)/lib/python$(VERSION)/os.py
  315. # Files and directories to be distributed
  316. CONFIGFILES= configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in
  317. DISTFILES= README.rst ChangeLog $(CONFIGFILES)
  318. DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
  319. DIST= $(DISTFILES) $(DISTDIRS)
  320. LIBRARY= libpython$(VERSION)$(ABIFLAGS).a
  321. LDLIBRARY= libpython$(VERSION)$(ABIFLAGS).a
  322. BLDLIBRARY= $(LDLIBRARY)
  323. PY3LIBRARY=
  324. DLLLIBRARY=
  325. LDLIBRARYDIR=
  326. INSTSONAME= $(LDLIBRARY)
  327. LIBRARY_DEPS= $(LIBRARY) $(PY3LIBRARY) $(EXPORTSYMS)
  328. LINK_PYTHON_DEPS=$(LIBRARY_DEPS)
  329. PY_ENABLE_SHARED= 0
  330. STATIC_LIBPYTHON= 1
  331. LIBS= -ldl
  332. LIBM= -lm
  333. LIBC=
  334. SYSLIBS= $(LIBM) $(LIBC)
  335. SHLIBS= $(LIBS)
  336. DLINCLDIR= .
  337. DYNLOADFILE= dynload_shlib.o
  338. MACHDEP_OBJS=
  339. LIBOBJDIR= Python/
  340. LIBOBJS=
  341. PYTHON= python$(EXE)
  342. BUILDPYTHON= python$(BUILDEXE)
  343. HOSTRUNNER=
  344. PYTHON_FOR_REGEN?=/root/python-3.11.2-host/bin/python3
  345. UPDATE_FILE=$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/update_file.py
  346. PYTHON_FOR_BUILD=_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) /root/python-3.11.2-host/bin/python3
  347. # Single-platform builds depend on $(BUILDPYTHON). Cross builds use an
  348. # external "build Python" and have an empty PYTHON_FOR_BUILD_DEPS.
  349. PYTHON_FOR_BUILD_DEPS=
  350. # Single-platform builds use Programs/_freeze_module.c for bootstrapping and
  351. # ./_bootstrap_python Programs/_freeze_module.py for remaining modules
  352. # Cross builds use an external "build Python" for all modules.
  353. PYTHON_FOR_FREEZE=/root/python-3.11.2-host/bin/python3
  354. FREEZE_MODULE_BOOTSTRAP=$(PYTHON_FOR_FREEZE) $(srcdir)/Programs/_freeze_module.py
  355. FREEZE_MODULE_BOOTSTRAP_DEPS=$(srcdir)/Programs/_freeze_module.py
  356. FREEZE_MODULE=$(FREEZE_MODULE_BOOTSTRAP)
  357. FREEZE_MODULE_DEPS=$(FREEZE_MODULE_BOOTSTRAP_DEPS)
  358. _PYTHON_HOST_PLATFORM=linux-aarch64
  359. BUILD_GNU_TYPE= x86_64-pc-linux-gnu
  360. HOST_GNU_TYPE= aarch64-unknown-linux-android
  361. # The task to run while instrumented when building the profile-opt target.
  362. # To speed up profile generation, we don't run the full unit test suite
  363. # by default. The default is "-m test --pgo". To run more tests, use
  364. # PROFILE_TASK="-m test --pgo-extended"
  365. PROFILE_TASK= -m test --pgo --timeout=$(TESTTIMEOUT)
  366. # report files for gcov / lcov coverage report
  367. COVERAGE_INFO= $(abs_builddir)/coverage.info
  368. COVERAGE_REPORT=$(abs_builddir)/lcov-report
  369. COVERAGE_LCOV_OPTIONS=--rc lcov_branch_coverage=1
  370. COVERAGE_REPORT_OPTIONS=--rc lcov_branch_coverage=1 --branch-coverage --title "CPython $(VERSION) LCOV report [commit $(shell $(GITVERSION))]"
  371. # === Definitions added by makesetup ===
  372. LOCALMODLIBS= $(MODULE_ATEXIT_LDFLAGS) $(MODULE_FAULTHANDLER_LDFLAGS) $(MODULE_POSIX_LDFLAGS) $(MODULE__SIGNAL_LDFLAGS) $(MODULE__TRACEMALLOC_LDFLAGS) $(MODULE__CODECS_LDFLAGS) $(MODULE__COLLECTIONS_LDFLAGS) $(MODULE_ERRNO_LDFLAGS) $(MODULE__IO_LDFLAGS) $(MODULE_ITERTOOLS_LDFLAGS) $(MODULE__SRE_LDFLAGS) $(MODULE__THREAD_LDFLAGS) $(MODULE_TIME_LDFLAGS) $(MODULE__WEAKREF_LDFLAGS) $(MODULE__ABC_LDFLAGS) $(MODULE__FUNCTOOLS_LDFLAGS) $(MODULE__LOCALE_LDFLAGS) $(MODULE__OPERATOR_LDFLAGS) $(MODULE__STAT_LDFLAGS) $(MODULE__SYMTABLE_LDFLAGS) $(MODULE_PWD_LDFLAGS) $(MODULE_XXSUBTYPE_LDFLAGS)
  373. BASEMODLIBS=
  374. PYTHONPATH=$(COREPYTHONPATH)
  375. COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)
  376. TESTPATH=
  377. SITEPATH=
  378. DESTPATH=
  379. MACHDESTLIB=$(BINLIBDEST)
  380. DESTLIB=$(LIBDEST)
  381. ##########################################################################
  382. # Modules
  383. MODULE_OBJS= \
  384. Modules/config.o \
  385. Modules/main.o \
  386. Modules/gcmodule.o
  387. IO_H= Modules/_io/_iomodule.h
  388. IO_OBJS= \
  389. Modules/_io/_iomodule.o \
  390. Modules/_io/iobase.o \
  391. Modules/_io/fileio.o \
  392. Modules/_io/bufferedio.o \
  393. Modules/_io/textio.o \
  394. Modules/_io/bytesio.o \
  395. Modules/_io/stringio.o
  396. ##########################################################################
  397. LIBFFI_INCLUDEDIR=
  398. ##########################################################################
  399. # Parser
  400. PEGEN_OBJS= \
  401. Parser/pegen.o \
  402. Parser/pegen_errors.o \
  403. Parser/action_helpers.o \
  404. Parser/parser.o \
  405. Parser/string_parser.o \
  406. Parser/peg_api.o
  407. PEGEN_HEADERS= \
  408. $(srcdir)/Include/internal/pycore_parser.h \
  409. $(srcdir)/Parser/pegen.h \
  410. $(srcdir)/Parser/string_parser.h
  411. POBJS= \
  412. Parser/token.o \
  413. PARSER_OBJS= $(POBJS) $(PEGEN_OBJS) Parser/myreadline.o Parser/tokenizer.o
  414. PARSER_HEADERS= \
  415. $(PEGEN_HEADERS) \
  416. $(srcdir)/Parser/tokenizer.h
  417. ##########################################################################
  418. # Python
  419. PYTHON_OBJS= \
  420. Python/_warnings.o \
  421. Python/Python-ast.o \
  422. Python/Python-tokenize.o \
  423. Python/asdl.o \
  424. Python/ast.o \
  425. Python/ast_opt.o \
  426. Python/ast_unparse.o \
  427. Python/bltinmodule.o \
  428. Python/ceval.o \
  429. Python/codecs.o \
  430. Python/compile.o \
  431. Python/context.o \
  432. Python/dynamic_annotations.o \
  433. Python/errors.o \
  434. Python/frame.o \
  435. Python/frozenmain.o \
  436. Python/future.o \
  437. Python/getargs.o \
  438. Python/getcompiler.o \
  439. Python/getcopyright.o \
  440. Python/getplatform.o \
  441. Python/getversion.o \
  442. Python/hamt.o \
  443. Python/hashtable.o \
  444. Python/import.o \
  445. Python/importdl.o \
  446. Python/initconfig.o \
  447. Python/marshal.o \
  448. Python/modsupport.o \
  449. Python/mysnprintf.o \
  450. Python/mystrtoul.o \
  451. Python/pathconfig.o \
  452. Python/preconfig.o \
  453. Python/pyarena.o \
  454. Python/pyctype.o \
  455. Python/pyfpe.o \
  456. Python/pyhash.o \
  457. Python/pylifecycle.o \
  458. Python/pymath.o \
  459. Python/pystate.o \
  460. Python/pythonrun.o \
  461. Python/pytime.o \
  462. Python/bootstrap_hash.o \
  463. Python/specialize.o \
  464. Python/structmember.o \
  465. Python/symtable.o \
  466. Python/sysmodule.o \
  467. Python/thread.o \
  468. Python/traceback.o \
  469. Python/getopt.o \
  470. Python/pystrcmp.o \
  471. Python/pystrtod.o \
  472. Python/pystrhex.o \
  473. Python/dtoa.o \
  474. Python/formatter_unicode.o \
  475. Python/fileutils.o \
  476. Python/suggestions.o \
  477. Python/$(DYNLOADFILE) \
  478. $(LIBOBJS) \
  479. $(MACHDEP_OBJS) \
  480. $(DTRACE_OBJS) \
  481. ##########################################################################
  482. # Objects
  483. OBJECT_OBJS= \
  484. Objects/abstract.o \
  485. Objects/accu.o \
  486. Objects/boolobject.o \
  487. Objects/bytes_methods.o \
  488. Objects/bytearrayobject.o \
  489. Objects/bytesobject.o \
  490. Objects/call.o \
  491. Objects/capsule.o \
  492. Objects/cellobject.o \
  493. Objects/classobject.o \
  494. Objects/codeobject.o \
  495. Objects/complexobject.o \
  496. Objects/descrobject.o \
  497. Objects/enumobject.o \
  498. Objects/exceptions.o \
  499. Objects/genericaliasobject.o \
  500. Objects/genobject.o \
  501. Objects/fileobject.o \
  502. Objects/floatobject.o \
  503. Objects/frameobject.o \
  504. Objects/funcobject.o \
  505. Objects/interpreteridobject.o \
  506. Objects/iterobject.o \
  507. Objects/listobject.o \
  508. Objects/longobject.o \
  509. Objects/dictobject.o \
  510. Objects/odictobject.o \
  511. Objects/memoryobject.o \
  512. Objects/methodobject.o \
  513. Objects/moduleobject.o \
  514. Objects/namespaceobject.o \
  515. Objects/object.o \
  516. Objects/obmalloc.o \
  517. Objects/picklebufobject.o \
  518. Objects/rangeobject.o \
  519. Objects/setobject.o \
  520. Objects/sliceobject.o \
  521. Objects/structseq.o \
  522. Objects/tupleobject.o \
  523. Objects/typeobject.o \
  524. Objects/unicodeobject.o \
  525. Objects/unicodectype.o \
  526. Objects/unionobject.o \
  527. Objects/weakrefobject.o
  528. DEEPFREEZE_OBJS = Python/deepfreeze/deepfreeze.o
  529. ##########################################################################
  530. # objects that get linked into the Python library
  531. LIBRARY_OBJS_OMIT_FROZEN= \
  532. Modules/getbuildinfo.o \
  533. $(PARSER_OBJS) \
  534. $(OBJECT_OBJS) \
  535. $(PYTHON_OBJS) \
  536. $(MODULE_OBJS) \
  537. $(MODOBJS)
  538. LIBRARY_OBJS= \
  539. $(LIBRARY_OBJS_OMIT_FROZEN) \
  540. $(DEEPFREEZE_OBJS) \
  541. Modules/getpath.o \
  542. Python/frozen.o
  543. LINK_PYTHON_OBJS=$(LIBRARY_OBJS)
  544. ##########################################################################
  545. # DTrace
  546. # On some systems, object files that reference DTrace probes need to be modified
  547. # in-place by dtrace(1).
  548. DTRACE_DEPS = \
  549. Python/ceval.o Python/import.o Python/sysmodule.o Modules/gcmodule.o
  550. ##########################################################################
  551. # decimal's libmpdec
  552. LIBMPDEC_OBJS= \
  553. Modules/_decimal/libmpdec/basearith.o \
  554. Modules/_decimal/libmpdec/constants.o \
  555. Modules/_decimal/libmpdec/context.o \
  556. Modules/_decimal/libmpdec/convolute.o \
  557. Modules/_decimal/libmpdec/crt.o \
  558. Modules/_decimal/libmpdec/difradix2.o \
  559. Modules/_decimal/libmpdec/fnt.o \
  560. Modules/_decimal/libmpdec/fourstep.o \
  561. Modules/_decimal/libmpdec/io.o \
  562. Modules/_decimal/libmpdec/mpalloc.o \
  563. Modules/_decimal/libmpdec/mpdecimal.o \
  564. Modules/_decimal/libmpdec/numbertheory.o \
  565. Modules/_decimal/libmpdec/sixstep.o \
  566. Modules/_decimal/libmpdec/transpose.o
  567. # _decimal does not use signaling API
  568. # Modules/_decimal/libmpdec/mpsignal.o
  569. LIBMPDEC_HEADERS= \
  570. $(srcdir)/Modules/_decimal/libmpdec/basearith.h \
  571. $(srcdir)/Modules/_decimal/libmpdec/bits.h \
  572. $(srcdir)/Modules/_decimal/libmpdec/constants.h \
  573. $(srcdir)/Modules/_decimal/libmpdec/convolute.h \
  574. $(srcdir)/Modules/_decimal/libmpdec/crt.h \
  575. $(srcdir)/Modules/_decimal/libmpdec/difradix2.h \
  576. $(srcdir)/Modules/_decimal/libmpdec/fnt.h \
  577. $(srcdir)/Modules/_decimal/libmpdec/fourstep.h \
  578. $(srcdir)/Modules/_decimal/libmpdec/io.h \
  579. $(srcdir)/Modules/_decimal/libmpdec/mpalloc.h \
  580. $(srcdir)/Modules/_decimal/libmpdec/mpdecimal.h \
  581. $(srcdir)/Modules/_decimal/libmpdec/numbertheory.h \
  582. $(srcdir)/Modules/_decimal/libmpdec/sixstep.h \
  583. $(srcdir)/Modules/_decimal/libmpdec/transpose.h \
  584. $(srcdir)/Modules/_decimal/libmpdec/typearith.h \
  585. $(srcdir)/Modules/_decimal/libmpdec/umodarith.h
  586. ##########################################################################
  587. # pyexpat's expat library
  588. LIBEXPAT_OBJS= \
  589. Modules/expat/xmlparse.o \
  590. Modules/expat/xmlrole.o \
  591. Modules/expat/xmltok.o
  592. LIBEXPAT_HEADERS= \
  593. Modules/expat/ascii.h \
  594. Modules/expat/asciitab.h \
  595. Modules/expat/expat.h \
  596. Modules/expat/expat_config.h \
  597. Modules/expat/expat_external.h \
  598. Modules/expat/iasciitab.h \
  599. Modules/expat/internal.h \
  600. Modules/expat/latin1tab.h \
  601. Modules/expat/nametab.h \
  602. Modules/expat/pyexpatns.h \
  603. Modules/expat/siphash.h \
  604. Modules/expat/utf8tab.h \
  605. Modules/expat/xmlrole.h \
  606. Modules/expat/xmltok.h \
  607. Modules/expat/xmltok_impl.h
  608. #########################################################################
  609. # Rules
  610. # Default target
  611. all: build_all
  612. build_all: check-clean-src $(BUILDPYTHON) platform oldsharedmods sharedmods \
  613. gdbhooks Programs/_testembed python-config
  614. build_wasm: check-clean-src $(BUILDPYTHON) platform oldsharedmods python-config
  615. # Check that the source is clean when building out of source.
  616. check-clean-src:
  617. @if test -n "$(VPATH)" -a \( \
  618. -f "$(srcdir)/Programs/python.o" \
  619. -o -f "$(srcdir)\Python/frozen_modules/importlib._bootstrap.h" \
  620. \); then \
  621. echo "Error: The source directory ($(srcdir)) is not clean" ; \
  622. echo "Building Python out of the source tree (in $(abs_builddir)) requires a clean source tree ($(abs_srcdir))" ; \
  623. echo "Try to run: make -C \"$(srcdir)\" clean" ; \
  624. exit 1; \
  625. fi
  626. # Profile generation build must start from a clean tree.
  627. profile-clean-stamp:
  628. $(MAKE) clean
  629. touch $@
  630. # Compile with profile generation enabled.
  631. profile-gen-stamp: profile-clean-stamp
  632. @if [ $(LLVM_PROF_ERR) = yes ]; then \
  633. echo "Error: Cannot perform PGO build because llvm-profdata was not found in PATH" ;\
  634. echo "Please add it to PATH and run ./configure again" ;\
  635. exit 1;\
  636. fi
  637. @echo "Building with support for profile generation:"
  638. $(MAKE) build_all_generate_profile
  639. touch $@
  640. # Run task with profile generation build to create profile information.
  641. profile-run-stamp:
  642. @echo "Running code to generate profile data (this can take a while):"
  643. # First, we need to create a clean build with profile generation
  644. # enabled.
  645. $(MAKE) profile-gen-stamp
  646. # Next, run the profile task to generate the profile information.
  647. $(MAKE) run_profile_task
  648. $(MAKE) build_all_merge_profile
  649. # Remove profile generation binary since we are done with it.
  650. $(MAKE) clean-retain-profile
  651. # This is an expensive target to build and it does not have proper
  652. # makefile dependency information. So, we create a "stamp" file
  653. # to record its completion and avoid re-running it.
  654. touch $@
  655. build_all_generate_profile:
  656. $(MAKE) all CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"
  657. run_profile_task:
  658. @ # FIXME: can't run for a cross build
  659. $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
  660. build_all_merge_profile:
  661. $(LLVM_PROF_MERGER)
  662. # Compile Python binary with profile guided optimization.
  663. # To force re-running of the profile task, remove the profile-run-stamp file.
  664. profile-opt: profile-run-stamp
  665. @echo "Rebuilding with profile guided optimizations:"
  666. -rm -f profile-clean-stamp
  667. $(MAKE) all CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_USE_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST)"
  668. # Compile and run with gcov
  669. .PHONY=coverage coverage-lcov coverage-report
  670. coverage:
  671. @echo "Building with support for coverage checking:"
  672. $(MAKE) clean
  673. $(MAKE) all CFLAGS="$(CFLAGS) -O0 -pg --coverage" LDFLAGS="$(LDFLAGS) --coverage"
  674. coverage-lcov:
  675. @echo "Creating Coverage HTML report with LCOV:"
  676. @rm -f $(COVERAGE_INFO)
  677. @rm -rf $(COVERAGE_REPORT)
  678. @lcov $(COVERAGE_LCOV_OPTIONS) --capture \
  679. --directory $(abs_builddir) \
  680. --base-directory $(realpath $(abs_builddir)) \
  681. --path $(realpath $(abs_srcdir)) \
  682. --output-file $(COVERAGE_INFO)
  683. @ # remove 3rd party modules, system headers and internal files with
  684. @ # debug, test or dummy functions.
  685. @lcov $(COVERAGE_LCOV_OPTIONS) --remove $(COVERAGE_INFO) \
  686. '*/Modules/_blake2/impl/*' \
  687. '*/Modules/_ctypes/libffi*/*' \
  688. '*/Modules/_decimal/libmpdec/*' \
  689. '*/Modules/expat/*' \
  690. '*/Modules/xx*.c' \
  691. '*/Python/pyfpe.c' \
  692. '*/Python/pystrcmp.c' \
  693. '/usr/include/*' \
  694. '/usr/local/include/*' \
  695. '/usr/lib/gcc/*' \
  696. --output-file $(COVERAGE_INFO)
  697. @genhtml $(COVERAGE_INFO) \
  698. --output-directory $(COVERAGE_REPORT) \
  699. $(COVERAGE_REPORT_OPTIONS)
  700. @echo
  701. @echo "lcov report at $(COVERAGE_REPORT)/index.html"
  702. @echo
  703. # Force regeneration of parser and frozen modules
  704. coverage-report: regen-token regen-frozen
  705. @ # build with coverage info
  706. $(MAKE) coverage
  707. @ # run tests, ignore failures
  708. $(TESTRUNNER) $(TESTOPTS) || true
  709. @ # build lcov report
  710. $(MAKE) coverage-lcov
  711. # Run "Argument Clinic" over all source files
  712. .PHONY=clinic
  713. clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
  714. $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir)
  715. # Build the interpreter
  716. $(BUILDPYTHON): Programs/python.o $(LINK_PYTHON_DEPS)
  717. $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
  718. platform: $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt
  719. $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
  720. # Create build directory and generate the sysconfig build-time data there.
  721. # pybuilddir.txt contains the name of the build dir and is used for
  722. # sys.path fixup -- see Modules/getpath.c.
  723. # Since this step runs before shared modules are built, try to avoid bootstrap
  724. # problems by creating a dummy pybuilddir.txt just to allow interpreter
  725. # initialization to succeed. It will be overwritten by generate-posix-vars
  726. # or removed in case of failure.
  727. pybuilddir.txt: $(PYTHON_FOR_BUILD_DEPS)
  728. @echo "none" > ./pybuilddir.txt
  729. $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars ;\
  730. if test $$? -ne 0 ; then \
  731. echo "generate-posix-vars failed" ; \
  732. rm -f ./pybuilddir.txt ; \
  733. exit 1 ; \
  734. fi
  735. # blake2s is auto-generated from blake2b
  736. $(srcdir)/Modules/_blake2/blake2s_impl.c: $(srcdir)/Modules/_blake2/blake2b_impl.c $(srcdir)/Modules/_blake2/blake2b2s.py
  737. $(PYTHON_FOR_REGEN) $(srcdir)/Modules/_blake2/blake2b2s.py
  738. $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py -f $@
  739. # Build the shared modules
  740. # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
  741. # -s, --silent or --quiet is always the first char.
  742. # Under BSD make, MAKEFLAGS might be " -s -v x=y".
  743. # Ignore macros passed by GNU make, passed after --
  744. sharedmods: $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt $(LIBMPDEC_HEADERS) $(LIBMPDEC_A) $(LIBEXPAT_HEADERS) $(LIBEXPAT_A)
  745. @case "`echo X $$MAKEFLAGS | sed 's/^X //;s/ -- .*//'`" in \
  746. *\ -s*|s*) quiet="-q";; \
  747. *) quiet="";; \
  748. esac; \
  749. echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
  750. $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \
  751. $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
  752. $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
  753. # Build static library
  754. $(LIBRARY): $(LIBRARY_OBJS)
  755. -rm -f $@
  756. $(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS)
  757. libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACE_OBJS)
  758. if test $(INSTSONAME) != $(LDLIBRARY); then \
  759. $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \
  760. $(LN) -f $(INSTSONAME) $@; \
  761. else \
  762. $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \
  763. fi
  764. libpython3.so: libpython$(LDVERSION).so
  765. $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^
  766. libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
  767. $(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) $(DTRACE_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
  768. libpython$(VERSION).sl: $(LIBRARY_OBJS)
  769. $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM)
  770. # List of exported symbols for AIX
  771. Modules/python.exp: $(LIBRARY)
  772. $(srcdir)/Modules/makexp_aix $@ "$(EXPORTSFROM)" $?
  773. # Copy up the gdb python hooks into a position where they can be automatically
  774. # loaded by gdb during Lib/test/test_gdb.py
  775. #
  776. # Distributors are likely to want to install this somewhere else e.g. relative
  777. # to the stripped DWARF data for the shared library.
  778. gdbhooks: $(BUILDPYTHON)-gdb.py
  779. SRC_GDB_HOOKS=$(srcdir)/Tools/gdb/libpython.py
  780. $(BUILDPYTHON)-gdb.py: $(SRC_GDB_HOOKS)
  781. $(INSTALL_DATA) $(SRC_GDB_HOOKS) $(BUILDPYTHON)-gdb.py
  782. # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
  783. # minimal framework (not including the Lib directory and such) in the current
  784. # directory.
  785. RESSRCDIR=Mac/Resources/framework
  786. $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
  787. $(LIBRARY) \
  788. $(RESSRCDIR)/Info.plist
  789. $(INSTALL) -d -m $(DIRMODE) $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)
  790. $(CC) -o $(LDLIBRARY) $(PY_CORE_LDFLAGS) -dynamiclib \
  791. -all_load $(LIBRARY) -Wl,-single_module \
  792. -install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) \
  793. -compatibility_version $(VERSION) \
  794. -current_version $(VERSION) \
  795. -framework CoreFoundation $(LIBS);
  796. $(INSTALL) -d -m $(DIRMODE) \
  797. $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj
  798. $(INSTALL_DATA) $(RESSRCDIR)/Info.plist \
  799. $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/Info.plist
  800. $(LN) -fsn $(VERSION) $(PYTHONFRAMEWORKDIR)/Versions/Current
  801. $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)
  802. $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources
  803. # This rule builds the Cygwin Python DLL and import library if configured
  804. # for a shared core library; otherwise, this rule is a noop.
  805. $(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS)
  806. if test -n "$(DLLLIBRARY)"; then \
  807. $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
  808. $(LIBS) $(MODLIBS) $(SYSLIBS); \
  809. else true; \
  810. fi
  811. # wasm32-emscripten browser build
  812. # wasm assets directory is relative to current build dir, e.g. "./usr/local".
  813. # --preload-file turns a relative asset path into an absolute path.
  814. .PHONY: wasm_stdlib
  815. wasm_stdlib: $(WASM_STDLIB)
  816. $(WASM_STDLIB): $(srcdir)/Lib/*.py $(srcdir)/Lib/*/*.py \
  817. $(srcdir)/Tools/wasm/wasm_assets.py \
  818. Makefile pybuilddir.txt Modules/Setup.local
  819. $(PYTHON_FOR_BUILD) $(srcdir)/Tools/wasm/wasm_assets.py \
  820. --buildroot . --prefix $(prefix)
  821. python.html: $(srcdir)/Tools/wasm/python.html python.worker.js
  822. @cp $(srcdir)/Tools/wasm/python.html $@
  823. python.worker.js: $(srcdir)/Tools/wasm/python.worker.js
  824. @cp $(srcdir)/Tools/wasm/python.worker.js $@
  825. ##########################################################################
  826. # Build static libmpdec.a
  827. LIBMPDEC_CFLAGS=-I$(srcdir)/Modules/_decimal/libmpdec -DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1 $(PY_STDMODULE_CFLAGS) $(CCSHARED)
  828. # for setup.py
  829. DECIMAL_CFLAGS=-I$(srcdir)/Modules/_decimal/libmpdec -DCONFIG_64=1 -DANSI=1 -DHAVE_UINT128_T=1
  830. DECIMAL_LDFLAGS=-lm $(LIBMPDEC_A)
  831. # "%.o: %c" is not portable
  832. Modules/_decimal/libmpdec/basearith.o: $(srcdir)/Modules/_decimal/libmpdec/basearith.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  833. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/basearith.c
  834. Modules/_decimal/libmpdec/constants.o: $(srcdir)/Modules/_decimal/libmpdec/constants.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  835. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/constants.c
  836. Modules/_decimal/libmpdec/context.o: $(srcdir)/Modules/_decimal/libmpdec/context.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  837. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/context.c
  838. Modules/_decimal/libmpdec/convolute.o: $(srcdir)/Modules/_decimal/libmpdec/convolute.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  839. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/convolute.c
  840. Modules/_decimal/libmpdec/crt.o: $(srcdir)/Modules/_decimal/libmpdec/crt.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  841. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/crt.c
  842. Modules/_decimal/libmpdec/difradix2.o: $(srcdir)/Modules/_decimal/libmpdec/difradix2.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  843. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/difradix2.c
  844. Modules/_decimal/libmpdec/fnt.o: $(srcdir)/Modules/_decimal/libmpdec/fnt.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  845. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/fnt.c
  846. Modules/_decimal/libmpdec/fourstep.o: $(srcdir)/Modules/_decimal/libmpdec/fourstep.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  847. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/fourstep.c
  848. Modules/_decimal/libmpdec/io.o: $(srcdir)/Modules/_decimal/libmpdec/io.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  849. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/io.c
  850. Modules/_decimal/libmpdec/mpalloc.o: $(srcdir)/Modules/_decimal/libmpdec/mpalloc.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  851. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/mpalloc.c
  852. Modules/_decimal/libmpdec/mpdecimal.o: $(srcdir)/Modules/_decimal/libmpdec/mpdecimal.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  853. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/mpdecimal.c
  854. Modules/_decimal/libmpdec/mpsignal.o: $(srcdir)/Modules/_decimal/libmpdec/mpsignal.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  855. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/mpsignal.c
  856. Modules/_decimal/libmpdec/numbertheory.o: $(srcdir)/Modules/_decimal/libmpdec/numbertheory.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  857. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/numbertheory.c
  858. Modules/_decimal/libmpdec/sixstep.o: $(srcdir)/Modules/_decimal/libmpdec/sixstep.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  859. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/sixstep.c
  860. Modules/_decimal/libmpdec/transpose.o: $(srcdir)/Modules/_decimal/libmpdec/transpose.c $(LIBMPDEC_HEADERS) $(PYTHON_HEADERS)
  861. $(CC) -c $(LIBMPDEC_CFLAGS) -o $@ $(srcdir)/Modules/_decimal/libmpdec/transpose.c
  862. $(LIBMPDEC_A): $(LIBMPDEC_OBJS)
  863. -rm -f $@
  864. $(AR) $(ARFLAGS) $@ $(LIBMPDEC_OBJS)
  865. ##########################################################################
  866. # Build static libexpat.a
  867. LIBEXPAT_CFLAGS=-I$(srcdir)/Modules/expat $(PY_STDMODULE_CFLAGS) $(CCSHARED)
  868. # for setup.py
  869. EXPAT_CFLAGS=-I$(srcdir)/Modules/expat
  870. EXPAT_LDFLAGS=-lm $(LIBEXPAT_A)
  871. Modules/expat/xmlparse.o: $(srcdir)/Modules/expat/xmlparse.c $(LIBEXPAT_HEADERS) $(PYTHON_HEADERS)
  872. $(CC) -c $(LIBEXPAT_CFLAGS) -o $@ $(srcdir)/Modules/expat/xmlparse.c
  873. Modules/expat/xmlrole.o: $(srcdir)/Modules/expat/xmlrole.c $(LIBEXPAT_HEADERS) $(PYTHON_HEADERS)
  874. $(CC) -c $(LIBEXPAT_CFLAGS) -o $@ $(srcdir)/Modules/expat/xmlrole.c
  875. Modules/expat/xmltok.o: $(srcdir)/Modules/expat/xmltok.c $(LIBEXPAT_HEADERS) $(PYTHON_HEADERS)
  876. $(CC) -c $(LIBEXPAT_CFLAGS) -o $@ $(srcdir)/Modules/expat/xmltok.c
  877. $(LIBEXPAT_A): $(LIBEXPAT_OBJS)
  878. -rm -f $@
  879. $(AR) $(ARFLAGS) $@ $(LIBEXPAT_OBJS)
  880. # create relative links from build/lib.platform/egg.so to Modules/egg.so
  881. # pybuilddir.txt is created too late. We cannot use it in Makefile
  882. # targets. ln --relative is not portable.
  883. oldsharedmods: $(SHAREDMODS) pybuilddir.txt
  884. @target=`cat pybuilddir.txt`; \
  885. $(MKDIR_P) $$target; \
  886. for mod in X $(SHAREDMODS); do \
  887. if test $$mod != X; then \
  888. $(LN) -sf ../../$$mod $$target/`basename $$mod`; \
  889. fi; \
  890. done
  891. Modules/Setup.local:
  892. @# Create empty Setup.local when file was deleted by user
  893. echo "# Edit this file for local setup changes" > $@
  894. Modules/Setup.bootstrap: $(srcdir)/Modules/Setup.bootstrap.in config.status
  895. ./config.status $@
  896. Modules/Setup.stdlib: $(srcdir)/Modules/Setup.stdlib.in config.status
  897. ./config.status $@
  898. Makefile Modules/config.c: Makefile.pre \
  899. $(srcdir)/Modules/config.c.in \
  900. $(MAKESETUP) \
  901. $(srcdir)/Modules/Setup \
  902. Modules/Setup.local \
  903. Modules/Setup.bootstrap \
  904. Modules/Setup.stdlib
  905. $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \
  906. -s Modules \
  907. Modules/Setup.local \
  908. \
  909. Modules/Setup.bootstrap \
  910. $(srcdir)/Modules/Setup
  911. @mv config.c Modules
  912. @echo "The Makefile was updated, you may need to re-run make."
  913. .PHONY: regen-test-frozenmain
  914. regen-test-frozenmain: $(BUILDPYTHON)
  915. # Regenerate Programs/test_frozenmain.h
  916. # from Programs/test_frozenmain.py
  917. # using Programs/freeze_test_frozenmain.py
  918. $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Programs/freeze_test_frozenmain.py Programs/test_frozenmain.h
  919. .PHONY: regen-re
  920. regen-re: $(BUILDPYTHON)
  921. # Regenerate Lib/re/_casefix.py
  922. # using Tools/scripts/generate_re_casefix.py
  923. $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/generate_re_casefix.py $(srcdir)/Lib/re/_casefix.py
  924. Programs/_testembed: Programs/_testembed.o $(LINK_PYTHON_DEPS)
  925. $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
  926. ############################################################################
  927. # "Bootstrap Python" used to run deepfreeze.py
  928. BOOTSTRAP_HEADERS = \
  929. Python/frozen_modules/importlib._bootstrap.h \
  930. Python/frozen_modules/importlib._bootstrap_external.h
  931. Programs/_bootstrap_python.o: Programs/_bootstrap_python.c $(BOOTSTRAP_HEADERS) $(PYTHON_HEADERS)
  932. _bootstrap_python: $(LIBRARY_OBJS_OMIT_FROZEN) Programs/_bootstrap_python.o Modules/getpath.o Modules/Setup.local
  933. $(LINKCC) $(PY_LDFLAGS_NOLTO) -o $@ $(LIBRARY_OBJS_OMIT_FROZEN) \
  934. Programs/_bootstrap_python.o Modules/getpath.o $(LIBS) $(MODLIBS) $(SYSLIBS)
  935. ############################################################################
  936. # frozen modules (including importlib)
  937. #
  938. # Freezing is a multi step process. It works differently for standard builds
  939. # and cross builds. Standard builds use Programs/_freeze_module and
  940. # _bootstrap_python for freezing and deepfreezing, so users can build Python
  941. # without an existing Python installation. Cross builds cannot execute
  942. # compiled binaries and therefore rely on an external build Python
  943. # interpreter. The build interpreter must have same version and same bytecode
  944. # as the host (target) binary.
  945. #
  946. # Standard build process:
  947. # 1) compile minimal core objects for Py_Compile*() and PyMarshal_Write*().
  948. # 2) build Programs/_freeze_module binary.
  949. # 3) create frozen module headers for importlib and getpath.
  950. # 4) build _bootstrap_python binary.
  951. # 5) create remaining frozen module headers with
  952. # ``./_bootstrap_python Programs/_freeze_module.py``. The pure Python
  953. # script is used to test the cross compile code path.
  954. # 6) deepfreeze modules with _bootstrap_python
  955. #
  956. # Cross compile process:
  957. # 1) create all frozen module headers with external build Python and
  958. # Programs/_freeze_module.py script.
  959. # 2) deepfreeze modules with external build Python.
  960. #
  961. # FROZEN_FILES_* are auto-generated by Tools/scripts/freeze_modules.py.
  962. FROZEN_FILES_IN = \
  963. Lib/importlib/_bootstrap.py \
  964. Lib/importlib/_bootstrap_external.py \
  965. Lib/zipimport.py \
  966. Lib/abc.py \
  967. Lib/codecs.py \
  968. Lib/io.py \
  969. Lib/_collections_abc.py \
  970. Lib/_sitebuiltins.py \
  971. Lib/genericpath.py \
  972. Lib/ntpath.py \
  973. Lib/posixpath.py \
  974. Lib/os.py \
  975. Lib/site.py \
  976. Lib/stat.py \
  977. Lib/importlib/util.py \
  978. Lib/importlib/machinery.py \
  979. Lib/runpy.py \
  980. Lib/__hello__.py \
  981. Lib/__phello__/__init__.py \
  982. Lib/__phello__/ham/__init__.py \
  983. Lib/__phello__/ham/eggs.py \
  984. Lib/__phello__/spam.py \
  985. Tools/freeze/flag.py
  986. # End FROZEN_FILES_IN
  987. FROZEN_FILES_OUT = \
  988. Python/frozen_modules/importlib._bootstrap.h \
  989. Python/frozen_modules/importlib._bootstrap_external.h \
  990. Python/frozen_modules/zipimport.h \
  991. Python/frozen_modules/abc.h \
  992. Python/frozen_modules/codecs.h \
  993. Python/frozen_modules/io.h \
  994. Python/frozen_modules/_collections_abc.h \
  995. Python/frozen_modules/_sitebuiltins.h \
  996. Python/frozen_modules/genericpath.h \
  997. Python/frozen_modules/ntpath.h \
  998. Python/frozen_modules/posixpath.h \
  999. Python/frozen_modules/os.h \
  1000. Python/frozen_modules/site.h \
  1001. Python/frozen_modules/stat.h \
  1002. Python/frozen_modules/importlib.util.h \
  1003. Python/frozen_modules/importlib.machinery.h \
  1004. Python/frozen_modules/runpy.h \
  1005. Python/frozen_modules/__hello__.h \
  1006. Python/frozen_modules/__phello__.h \
  1007. Python/frozen_modules/__phello__.ham.h \
  1008. Python/frozen_modules/__phello__.ham.eggs.h \
  1009. Python/frozen_modules/__phello__.spam.h \
  1010. Python/frozen_modules/frozen_only.h
  1011. # End FROZEN_FILES_OUT
  1012. Programs/_freeze_module.o: Programs/_freeze_module.c Makefile
  1013. Modules/getpath_noop.o: $(srcdir)/Modules/getpath_noop.c Makefile
  1014. Programs/_freeze_module: Programs/_freeze_module.o Modules/getpath_noop.o $(LIBRARY_OBJS_OMIT_FROZEN)
  1015. $(LINKCC) $(PY_CORE_LDFLAGS) -o $@ Programs/_freeze_module.o Modules/getpath_noop.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS)
  1016. # We manually freeze getpath.py rather than through freeze_modules
  1017. Python/frozen_modules/getpath.h: Modules/getpath.py $(FREEZE_MODULE_BOOTSTRAP_DEPS)
  1018. $(FREEZE_MODULE_BOOTSTRAP) getpath $(srcdir)/Modules/getpath.py Python/frozen_modules/getpath.h
  1019. # BEGIN: freezing modules
  1020. Python/frozen_modules/importlib._bootstrap.h: Lib/importlib/_bootstrap.py $(FREEZE_MODULE_BOOTSTRAP_DEPS)
  1021. $(FREEZE_MODULE_BOOTSTRAP) importlib._bootstrap $(srcdir)/Lib/importlib/_bootstrap.py Python/frozen_modules/importlib._bootstrap.h
  1022. Python/frozen_modules/importlib._bootstrap_external.h: Lib/importlib/_bootstrap_external.py $(FREEZE_MODULE_BOOTSTRAP_DEPS)
  1023. $(FREEZE_MODULE_BOOTSTRAP) importlib._bootstrap_external $(srcdir)/Lib/importlib/_bootstrap_external.py Python/frozen_modules/importlib._bootstrap_external.h
  1024. Python/frozen_modules/zipimport.h: Lib/zipimport.py $(FREEZE_MODULE_BOOTSTRAP_DEPS)
  1025. $(FREEZE_MODULE_BOOTSTRAP) zipimport $(srcdir)/Lib/zipimport.py Python/frozen_modules/zipimport.h
  1026. Python/frozen_modules/abc.h: Lib/abc.py $(FREEZE_MODULE_DEPS)
  1027. $(FREEZE_MODULE) abc $(srcdir)/Lib/abc.py Python/frozen_modules/abc.h
  1028. Python/frozen_modules/codecs.h: Lib/codecs.py $(FREEZE_MODULE_DEPS)
  1029. $(FREEZE_MODULE) codecs $(srcdir)/Lib/codecs.py Python/frozen_modules/codecs.h
  1030. Python/frozen_modules/io.h: Lib/io.py $(FREEZE_MODULE_DEPS)
  1031. $(FREEZE_MODULE) io $(srcdir)/Lib/io.py Python/frozen_modules/io.h
  1032. Python/frozen_modules/_collections_abc.h: Lib/_collections_abc.py $(FREEZE_MODULE_DEPS)
  1033. $(FREEZE_MODULE) _collections_abc $(srcdir)/Lib/_collections_abc.py Python/frozen_modules/_collections_abc.h
  1034. Python/frozen_modules/_sitebuiltins.h: Lib/_sitebuiltins.py $(FREEZE_MODULE_DEPS)
  1035. $(FREEZE_MODULE) _sitebuiltins $(srcdir)/Lib/_sitebuiltins.py Python/frozen_modules/_sitebuiltins.h
  1036. Python/frozen_modules/genericpath.h: Lib/genericpath.py $(FREEZE_MODULE_DEPS)
  1037. $(FREEZE_MODULE) genericpath $(srcdir)/Lib/genericpath.py Python/frozen_modules/genericpath.h
  1038. Python/frozen_modules/ntpath.h: Lib/ntpath.py $(FREEZE_MODULE_DEPS)
  1039. $(FREEZE_MODULE) ntpath $(srcdir)/Lib/ntpath.py Python/frozen_modules/ntpath.h
  1040. Python/frozen_modules/posixpath.h: Lib/posixpath.py $(FREEZE_MODULE_DEPS)
  1041. $(FREEZE_MODULE) posixpath $(srcdir)/Lib/posixpath.py Python/frozen_modules/posixpath.h
  1042. Python/frozen_modules/os.h: Lib/os.py $(FREEZE_MODULE_DEPS)
  1043. $(FREEZE_MODULE) os $(srcdir)/Lib/os.py Python/frozen_modules/os.h
  1044. Python/frozen_modules/site.h: Lib/site.py $(FREEZE_MODULE_DEPS)
  1045. $(FREEZE_MODULE) site $(srcdir)/Lib/site.py Python/frozen_modules/site.h
  1046. Python/frozen_modules/stat.h: Lib/stat.py $(FREEZE_MODULE_DEPS)
  1047. $(FREEZE_MODULE) stat $(srcdir)/Lib/stat.py Python/frozen_modules/stat.h
  1048. Python/frozen_modules/importlib.util.h: Lib/importlib/util.py $(FREEZE_MODULE_DEPS)
  1049. $(FREEZE_MODULE) importlib.util $(srcdir)/Lib/importlib/util.py Python/frozen_modules/importlib.util.h
  1050. Python/frozen_modules/importlib.machinery.h: Lib/importlib/machinery.py $(FREEZE_MODULE_DEPS)
  1051. $(FREEZE_MODULE) importlib.machinery $(srcdir)/Lib/importlib/machinery.py Python/frozen_modules/importlib.machinery.h
  1052. Python/frozen_modules/runpy.h: Lib/runpy.py $(FREEZE_MODULE_DEPS)
  1053. $(FREEZE_MODULE) runpy $(srcdir)/Lib/runpy.py Python/frozen_modules/runpy.h
  1054. Python/frozen_modules/__hello__.h: Lib/__hello__.py $(FREEZE_MODULE_DEPS)
  1055. $(FREEZE_MODULE) __hello__ $(srcdir)/Lib/__hello__.py Python/frozen_modules/__hello__.h
  1056. Python/frozen_modules/__phello__.h: Lib/__phello__/__init__.py $(FREEZE_MODULE_DEPS)
  1057. $(FREEZE_MODULE) __phello__ $(srcdir)/Lib/__phello__/__init__.py Python/frozen_modules/__phello__.h
  1058. Python/frozen_modules/__phello__.ham.h: Lib/__phello__/ham/__init__.py $(FREEZE_MODULE_DEPS)
  1059. $(FREEZE_MODULE) __phello__.ham $(srcdir)/Lib/__phello__/ham/__init__.py Python/frozen_modules/__phello__.ham.h
  1060. Python/frozen_modules/__phello__.ham.eggs.h: Lib/__phello__/ham/eggs.py $(FREEZE_MODULE_DEPS)
  1061. $(FREEZE_MODULE) __phello__.ham.eggs $(srcdir)/Lib/__phello__/ham/eggs.py Python/frozen_modules/__phello__.ham.eggs.h
  1062. Python/frozen_modules/__phello__.spam.h: Lib/__phello__/spam.py $(FREEZE_MODULE_DEPS)
  1063. $(FREEZE_MODULE) __phello__.spam $(srcdir)/Lib/__phello__/spam.py Python/frozen_modules/__phello__.spam.h
  1064. Python/frozen_modules/frozen_only.h: Tools/freeze/flag.py $(FREEZE_MODULE_DEPS)
  1065. $(FREEZE_MODULE) frozen_only $(srcdir)/Tools/freeze/flag.py Python/frozen_modules/frozen_only.h
  1066. # END: freezing modules
  1067. Tools/scripts/freeze_modules.py: $(FREEZE_MODULE)
  1068. .PHONY: regen-frozen
  1069. regen-frozen: Tools/scripts/freeze_modules.py $(FROZEN_FILES_IN)
  1070. $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/freeze_modules.py
  1071. @echo "The Makefile was updated, you may need to re-run make."
  1072. ############################################################################
  1073. # Deepfreeze targets
  1074. .PHONY: regen-deepfreeze
  1075. regen-deepfreeze: $(DEEPFREEZE_OBJS)
  1076. DEEPFREEZE_DEPS=$(srcdir)/Tools/scripts/deepfreeze.py $(FREEZE_MODULE_DEPS) $(FROZEN_FILES_OUT)
  1077. # BEGIN: deepfreeze modules
  1078. Python/deepfreeze/deepfreeze.c: $(DEEPFREEZE_DEPS)
  1079. $(PYTHON_FOR_FREEZE) $(srcdir)/Tools/scripts/deepfreeze.py \
  1080. Python/frozen_modules/importlib._bootstrap.h:importlib._bootstrap \
  1081. Python/frozen_modules/importlib._bootstrap_external.h:importlib._bootstrap_external \
  1082. Python/frozen_modules/zipimport.h:zipimport \
  1083. Python/frozen_modules/abc.h:abc \
  1084. Python/frozen_modules/codecs.h:codecs \
  1085. Python/frozen_modules/io.h:io \
  1086. Python/frozen_modules/_collections_abc.h:_collections_abc \
  1087. Python/frozen_modules/_sitebuiltins.h:_sitebuiltins \
  1088. Python/frozen_modules/genericpath.h:genericpath \
  1089. Python/frozen_modules/ntpath.h:ntpath \
  1090. Python/frozen_modules/posixpath.h:posixpath \
  1091. Python/frozen_modules/os.h:os \
  1092. Python/frozen_modules/site.h:site \
  1093. Python/frozen_modules/stat.h:stat \
  1094. Python/frozen_modules/importlib.util.h:importlib.util \
  1095. Python/frozen_modules/importlib.machinery.h:importlib.machinery \
  1096. Python/frozen_modules/runpy.h:runpy \
  1097. Python/frozen_modules/__hello__.h:__hello__ \
  1098. Python/frozen_modules/__phello__.h:__phello__ \
  1099. Python/frozen_modules/__phello__.ham.h:__phello__.ham \
  1100. Python/frozen_modules/__phello__.ham.eggs.h:__phello__.ham.eggs \
  1101. Python/frozen_modules/__phello__.spam.h:__phello__.spam \
  1102. Python/frozen_modules/frozen_only.h:frozen_only \
  1103. -o Python/deepfreeze/deepfreeze.c
  1104. # END: deepfreeze modules
  1105. @echo "Note: Deepfreeze may have added some global objects,"
  1106. @echo " so run 'make regen-global-objects' if necessary."
  1107. # We keep this renamed target around for folks with muscle memory.
  1108. .PHONY: regen-importlib
  1109. regen-importlib: regen-frozen
  1110. ############################################################################
  1111. # Global objects
  1112. .PHONY: regen-global-objects
  1113. regen-global-objects: $(srcdir)/Tools/scripts/generate_global_objects.py
  1114. $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_global_objects.py
  1115. @echo "Note: Global objects can be added or removed by other tools (e.g. deepfreeze), "
  1116. @echo " so be sure to re-run regen-global-objects after those tools."
  1117. ############################################################################
  1118. # ABI
  1119. regen-abidump: all
  1120. @$(MKDIR_P) $(srcdir)/Doc/data/
  1121. abidw "libpython$(LDVERSION).so" --no-architecture --out-file $(srcdir)/Doc/data/python$(LDVERSION).abi.new
  1122. @$(UPDATE_FILE) $(srcdir)/Doc/data/python$(LDVERSION).abi $(srcdir)/Doc/data/python$(LDVERSION).abi.new
  1123. check-abidump: all
  1124. abidiff $(srcdir)/Doc/data/python$(LDVERSION).abi "libpython$(LDVERSION).so" --drop-private-types --no-architecture --no-added-syms
  1125. regen-limited-abi: all
  1126. $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/stable_abi.py --generate-all $(srcdir)/Misc/stable_abi.toml
  1127. ############################################################################
  1128. # Regenerate all generated files
  1129. regen-all: regen-opcode regen-opcode-targets regen-typeslots \
  1130. regen-token regen-ast regen-keyword regen-sre regen-frozen clinic \
  1131. regen-pegen-metaparser regen-pegen regen-test-frozenmain \
  1132. regen-global-objects
  1133. @echo
  1134. @echo "Note: make regen-stdlib-module-names and make regen-configure should be run manually"
  1135. ############################################################################
  1136. # Special rules for object files
  1137. Modules/getbuildinfo.o: $(PARSER_OBJS) \
  1138. $(OBJECT_OBJS) \
  1139. $(PYTHON_OBJS) \
  1140. $(MODULE_OBJS) \
  1141. $(MODOBJS) \
  1142. $(DTRACE_OBJS) \
  1143. $(srcdir)/Modules/getbuildinfo.c
  1144. $(CC) -c $(PY_CORE_CFLAGS) \
  1145. -DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \
  1146. -DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \
  1147. -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \
  1148. -o $@ $(srcdir)/Modules/getbuildinfo.c
  1149. Modules/getpath.o: $(srcdir)/Modules/getpath.c Python/frozen_modules/getpath.h Makefile $(PYTHON_HEADERS)
  1150. $(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
  1151. -DPREFIX='"$(prefix)"' \
  1152. -DEXEC_PREFIX='"$(exec_prefix)"' \
  1153. -DVERSION='"$(VERSION)"' \
  1154. -DVPATH='"$(VPATH)"' \
  1155. -DPLATLIBDIR='"$(PLATLIBDIR)"' \
  1156. -DPYTHONFRAMEWORK='"$(PYTHONFRAMEWORK)"' \
  1157. -o $@ $(srcdir)/Modules/getpath.c
  1158. Programs/python.o: $(srcdir)/Programs/python.c
  1159. $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c
  1160. Programs/_testembed.o: $(srcdir)/Programs/_testembed.c Programs/test_frozenmain.h
  1161. $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c
  1162. Modules/_sre/sre.o: $(srcdir)/Modules/_sre/sre.c $(srcdir)/Modules/_sre/sre.h $(srcdir)/Modules/_sre/sre_constants.h $(srcdir)/Modules/_sre/sre_lib.h
  1163. Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c $(srcdir)/Modules/posixmodule.h
  1164. Modules/grpmodule.o: $(srcdir)/Modules/grpmodule.c $(srcdir)/Modules/posixmodule.h
  1165. Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule.h
  1166. Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c $(srcdir)/Modules/posixmodule.h
  1167. Python/dynload_shlib.o: $(srcdir)/Python/dynload_shlib.c Makefile
  1168. $(CC) -c $(PY_CORE_CFLAGS) \
  1169. -DSOABI='"$(SOABI)"' \
  1170. -o $@ $(srcdir)/Python/dynload_shlib.c
  1171. Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile
  1172. $(CC) -c $(PY_CORE_CFLAGS) \
  1173. -DSHLIB_EXT='"$(EXT_SUFFIX)"' \
  1174. -o $@ $(srcdir)/Python/dynload_hpux.c
  1175. Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(srcdir)/Include/pydtrace.h
  1176. $(CC) -c $(PY_CORE_CFLAGS) \
  1177. -DABIFLAGS='"$(ABIFLAGS)"' \
  1178. $(MULTIARCH_CPPFLAGS) \
  1179. -o $@ $(srcdir)/Python/sysmodule.c
  1180. $(IO_OBJS): $(IO_H)
  1181. .PHONY: regen-pegen-metaparser
  1182. regen-pegen-metaparser:
  1183. @$(MKDIR_P) $(srcdir)/Tools/peg_generator/pegen
  1184. PYTHONPATH=$(srcdir)/Tools/peg_generator $(PYTHON_FOR_REGEN) -m pegen -q python \
  1185. $(srcdir)/Tools/peg_generator/pegen/metagrammar.gram \
  1186. -o $(srcdir)/Tools/peg_generator/pegen/grammar_parser.py.new
  1187. $(UPDATE_FILE) $(srcdir)/Tools/peg_generator/pegen/grammar_parser.py \
  1188. $(srcdir)/Tools/peg_generator/pegen/grammar_parser.py.new
  1189. .PHONY: regen-pegen
  1190. regen-pegen:
  1191. @$(MKDIR_P) $(srcdir)/Parser
  1192. PYTHONPATH=$(srcdir)/Tools/peg_generator $(PYTHON_FOR_REGEN) -m pegen -q c \
  1193. $(srcdir)/Grammar/python.gram \
  1194. $(srcdir)/Grammar/Tokens \
  1195. -o $(srcdir)/Parser/parser.new.c
  1196. $(UPDATE_FILE) $(srcdir)/Parser/parser.c $(srcdir)/Parser/parser.new.c
  1197. .PHONY=regen-ast
  1198. regen-ast:
  1199. # Regenerate 3 files using using Parser/asdl_c.py:
  1200. # - Include/internal/pycore_ast.h
  1201. # - Include/internal/pycore_ast_state.h
  1202. # - Python/Python-ast.c
  1203. $(MKDIR_P) $(srcdir)/Include
  1204. $(MKDIR_P) $(srcdir)/Python
  1205. $(PYTHON_FOR_REGEN) $(srcdir)/Parser/asdl_c.py \
  1206. $(srcdir)/Parser/Python.asdl \
  1207. -H $(srcdir)/Include/internal/pycore_ast.h.new \
  1208. -I $(srcdir)/Include/internal/pycore_ast_state.h.new \
  1209. -C $(srcdir)/Python/Python-ast.c.new
  1210. $(UPDATE_FILE) $(srcdir)/Include/internal/pycore_ast.h $(srcdir)/Include/internal/pycore_ast.h.new
  1211. $(UPDATE_FILE) $(srcdir)/Include/internal/pycore_ast_state.h $(srcdir)/Include/internal/pycore_ast_state.h.new
  1212. $(UPDATE_FILE) $(srcdir)/Python/Python-ast.c $(srcdir)/Python/Python-ast.c.new
  1213. .PHONY: regen-opcode
  1214. regen-opcode:
  1215. # Regenerate Include/opcode.h from Lib/opcode.py
  1216. # using Tools/scripts/generate_opcode_h.py
  1217. $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_opcode_h.py \
  1218. $(srcdir)/Lib/opcode.py \
  1219. $(srcdir)/Include/opcode.h.new \
  1220. $(srcdir)/Include/internal/pycore_opcode.h.new
  1221. $(UPDATE_FILE) $(srcdir)/Include/opcode.h $(srcdir)/Include/opcode.h.new
  1222. $(UPDATE_FILE) $(srcdir)/Include/internal/pycore_opcode.h $(srcdir)/Include/internal/pycore_opcode.h.new
  1223. .PHONY: regen-token
  1224. regen-token:
  1225. # Regenerate Doc/library/token-list.inc from Grammar/Tokens
  1226. # using Tools/scripts/generate_token.py
  1227. $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py rst \
  1228. $(srcdir)/Grammar/Tokens \
  1229. $(srcdir)/Doc/library/token-list.inc
  1230. # Regenerate Include/token.h from Grammar/Tokens
  1231. # using Tools/scripts/generate_token.py
  1232. $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py h \
  1233. $(srcdir)/Grammar/Tokens \
  1234. $(srcdir)/Include/token.h
  1235. # Regenerate Parser/token.c from Grammar/Tokens
  1236. # using Tools/scripts/generate_token.py
  1237. $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py c \
  1238. $(srcdir)/Grammar/Tokens \
  1239. $(srcdir)/Parser/token.c
  1240. # Regenerate Lib/token.py from Grammar/Tokens
  1241. # using Tools/scripts/generate_token.py
  1242. $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py py \
  1243. $(srcdir)/Grammar/Tokens \
  1244. $(srcdir)/Lib/token.py
  1245. .PHONY: regen-keyword
  1246. regen-keyword:
  1247. # Regenerate Lib/keyword.py from Grammar/python.gram and Grammar/Tokens
  1248. # using Tools/peg_generator/pegen
  1249. PYTHONPATH=$(srcdir)/Tools/peg_generator $(PYTHON_FOR_REGEN) -m pegen.keywordgen \
  1250. $(srcdir)/Grammar/python.gram \
  1251. $(srcdir)/Grammar/Tokens \
  1252. $(srcdir)/Lib/keyword.py.new
  1253. $(UPDATE_FILE) $(srcdir)/Lib/keyword.py $(srcdir)/Lib/keyword.py.new
  1254. .PHONY: regen-stdlib-module-names
  1255. regen-stdlib-module-names: all Programs/_testembed
  1256. # Regenerate Python/stdlib_module_names.h
  1257. # using Tools/scripts/generate_stdlib_module_names.py
  1258. $(RUNSHARED) ./$(BUILDPYTHON) \
  1259. $(srcdir)/Tools/scripts/generate_stdlib_module_names.py \
  1260. > $(srcdir)/Python/stdlib_module_names.h.new
  1261. $(UPDATE_FILE) $(srcdir)/Python/stdlib_module_names.h $(srcdir)/Python/stdlib_module_names.h.new
  1262. regen-sre:
  1263. # Regenerate Modules/_sre/sre_constants.h and Modules/_sre/sre_targets.h
  1264. # from Lib/re/_constants.py using Tools/scripts/generate_sre_constants.py
  1265. $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_sre_constants.py \
  1266. $(srcdir)/Lib/re/_constants.py \
  1267. $(srcdir)/Modules/_sre/sre_constants.h \
  1268. $(srcdir)/Modules/_sre/sre_targets.h
  1269. Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o Python/future.o: $(srcdir)/Include/internal/pycore_ast.h
  1270. Python/getplatform.o: $(srcdir)/Python/getplatform.c
  1271. $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
  1272. Python/importdl.o: $(srcdir)/Python/importdl.c
  1273. $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
  1274. Objects/unicodectype.o: $(srcdir)/Objects/unicodectype.c \
  1275. $(srcdir)/Objects/unicodetype_db.h
  1276. BYTESTR_DEPS = \
  1277. $(srcdir)/Objects/stringlib/count.h \
  1278. $(srcdir)/Objects/stringlib/ctype.h \
  1279. $(srcdir)/Objects/stringlib/fastsearch.h \
  1280. $(srcdir)/Objects/stringlib/find.h \
  1281. $(srcdir)/Objects/stringlib/join.h \
  1282. $(srcdir)/Objects/stringlib/partition.h \
  1283. $(srcdir)/Objects/stringlib/split.h \
  1284. $(srcdir)/Objects/stringlib/stringdefs.h \
  1285. $(srcdir)/Objects/stringlib/transmogrify.h
  1286. UNICODE_DEPS = \
  1287. $(srcdir)/Objects/stringlib/asciilib.h \
  1288. $(srcdir)/Objects/stringlib/codecs.h \
  1289. $(srcdir)/Objects/stringlib/count.h \
  1290. $(srcdir)/Objects/stringlib/fastsearch.h \
  1291. $(srcdir)/Objects/stringlib/find.h \
  1292. $(srcdir)/Objects/stringlib/find_max_char.h \
  1293. $(srcdir)/Objects/stringlib/localeutil.h \
  1294. $(srcdir)/Objects/stringlib/partition.h \
  1295. $(srcdir)/Objects/stringlib/replace.h \
  1296. $(srcdir)/Objects/stringlib/split.h \
  1297. $(srcdir)/Objects/stringlib/ucs1lib.h \
  1298. $(srcdir)/Objects/stringlib/ucs2lib.h \
  1299. $(srcdir)/Objects/stringlib/ucs4lib.h \
  1300. $(srcdir)/Objects/stringlib/undef.h \
  1301. $(srcdir)/Objects/stringlib/unicode_format.h \
  1302. $(srcdir)/Objects/stringlib/unicodedefs.h
  1303. Objects/bytes_methods.o: $(srcdir)/Objects/bytes_methods.c $(BYTESTR_DEPS)
  1304. Objects/bytesobject.o: $(srcdir)/Objects/bytesobject.c $(BYTESTR_DEPS)
  1305. Objects/bytearrayobject.o: $(srcdir)/Objects/bytearrayobject.c $(BYTESTR_DEPS)
  1306. Objects/unicodeobject.o: $(srcdir)/Objects/unicodeobject.c $(UNICODE_DEPS)
  1307. Objects/dictobject.o: $(srcdir)/Objects/stringlib/eq.h
  1308. Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h
  1309. .PHONY: regen-opcode-targets
  1310. regen-opcode-targets:
  1311. # Regenerate Python/opcode_targets.h from Lib/opcode.py
  1312. # using Python/makeopcodetargets.py
  1313. $(PYTHON_FOR_REGEN) $(srcdir)/Python/makeopcodetargets.py \
  1314. $(srcdir)/Python/opcode_targets.h.new
  1315. $(UPDATE_FILE) $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/opcode_targets.h.new
  1316. Python/ceval.o: $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/ceval_gil.h \
  1317. $(srcdir)/Python/condvar.h
  1318. Python/frozen.o: $(FROZEN_FILES_OUT)
  1319. # Generate DTrace probe macros, then rename them (PYTHON_ -> PyDTrace_) to
  1320. # follow our naming conventions. dtrace(1) uses the output filename to generate
  1321. # an include guard, so we can't use a pipeline to transform its output.
  1322. Include/pydtrace_probes.h: $(srcdir)/Include/pydtrace.d
  1323. $(MKDIR_P) Include
  1324. $(DTRACE) $(DFLAGS) -o $@ -h -s $<
  1325. : sed in-place edit with POSIX-only tools
  1326. sed 's/PYTHON_/PyDTrace_/' $@ > $@.tmp
  1327. mv $@.tmp $@
  1328. Python/ceval.o: $(srcdir)/Include/pydtrace.h
  1329. Python/import.o: $(srcdir)/Include/pydtrace.h
  1330. Modules/gcmodule.o: $(srcdir)/Include/pydtrace.h
  1331. Python/pydtrace.o: $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS)
  1332. $(DTRACE) $(DFLAGS) -o $@ -G -s $< $(DTRACE_DEPS)
  1333. Objects/typeobject.o: Objects/typeslots.inc
  1334. .PHONY: regen-typeslots
  1335. regen-typeslots:
  1336. # Regenerate Objects/typeslots.inc from Include/typeslotsh
  1337. # using Objects/typeslots.py
  1338. $(PYTHON_FOR_REGEN) $(srcdir)/Objects/typeslots.py \
  1339. < $(srcdir)/Include/typeslots.h \
  1340. $(srcdir)/Objects/typeslots.inc.new
  1341. $(UPDATE_FILE) $(srcdir)/Objects/typeslots.inc $(srcdir)/Objects/typeslots.inc.new
  1342. ############################################################################
  1343. # Header files
  1344. PYTHON_HEADERS= \
  1345. $(srcdir)/Include/Python.h \
  1346. $(srcdir)/Include/abstract.h \
  1347. $(srcdir)/Include/bltinmodule.h \
  1348. $(srcdir)/Include/boolobject.h \
  1349. $(srcdir)/Include/bytearrayobject.h \
  1350. $(srcdir)/Include/bytesobject.h \
  1351. $(srcdir)/Include/ceval.h \
  1352. $(srcdir)/Include/codecs.h \
  1353. $(srcdir)/Include/compile.h \
  1354. $(srcdir)/Include/complexobject.h \
  1355. $(srcdir)/Include/descrobject.h \
  1356. $(srcdir)/Include/dictobject.h \
  1357. $(srcdir)/Include/dynamic_annotations.h \
  1358. $(srcdir)/Include/enumobject.h \
  1359. $(srcdir)/Include/errcode.h \
  1360. $(srcdir)/Include/fileobject.h \
  1361. $(srcdir)/Include/fileutils.h \
  1362. $(srcdir)/Include/floatobject.h \
  1363. $(srcdir)/Include/frameobject.h \
  1364. $(srcdir)/Include/import.h \
  1365. $(srcdir)/Include/intrcheck.h \
  1366. $(srcdir)/Include/iterobject.h \
  1367. $(srcdir)/Include/listobject.h \
  1368. $(srcdir)/Include/longobject.h \
  1369. $(srcdir)/Include/marshal.h \
  1370. $(srcdir)/Include/memoryobject.h \
  1371. $(srcdir)/Include/methodobject.h \
  1372. $(srcdir)/Include/modsupport.h \
  1373. $(srcdir)/Include/moduleobject.h \
  1374. $(srcdir)/Include/object.h \
  1375. $(srcdir)/Include/objimpl.h \
  1376. $(srcdir)/Include/opcode.h \
  1377. $(srcdir)/Include/osdefs.h \
  1378. $(srcdir)/Include/osmodule.h \
  1379. $(srcdir)/Include/patchlevel.h \
  1380. $(srcdir)/Include/pybuffer.h \
  1381. $(srcdir)/Include/pycapsule.h \
  1382. $(srcdir)/Include/pydtrace.h \
  1383. $(srcdir)/Include/pyerrors.h \
  1384. $(srcdir)/Include/pyframe.h \
  1385. $(srcdir)/Include/pyhash.h \
  1386. $(srcdir)/Include/pylifecycle.h \
  1387. $(srcdir)/Include/pymacconfig.h \
  1388. $(srcdir)/Include/pymacro.h \
  1389. $(srcdir)/Include/pymath.h \
  1390. $(srcdir)/Include/pymem.h \
  1391. $(srcdir)/Include/pyport.h \
  1392. $(srcdir)/Include/pystate.h \
  1393. $(srcdir)/Include/pystrcmp.h \
  1394. $(srcdir)/Include/pystrtod.h \
  1395. $(srcdir)/Include/pythonrun.h \
  1396. $(srcdir)/Include/pythread.h \
  1397. $(srcdir)/Include/pytypedefs.h \
  1398. $(srcdir)/Include/rangeobject.h \
  1399. $(srcdir)/Include/setobject.h \
  1400. $(srcdir)/Include/sliceobject.h \
  1401. $(srcdir)/Include/structmember.h \
  1402. $(srcdir)/Include/structseq.h \
  1403. $(srcdir)/Include/sysmodule.h \
  1404. $(srcdir)/Include/token.h \
  1405. $(srcdir)/Include/traceback.h \
  1406. $(srcdir)/Include/tracemalloc.h \
  1407. $(srcdir)/Include/tupleobject.h \
  1408. $(srcdir)/Include/unicodeobject.h \
  1409. $(srcdir)/Include/warnings.h \
  1410. $(srcdir)/Include/weakrefobject.h \
  1411. \
  1412. pyconfig.h \
  1413. $(PARSER_HEADERS) \
  1414. \
  1415. $(srcdir)/Include/cpython/abstract.h \
  1416. $(srcdir)/Include/cpython/bytearrayobject.h \
  1417. $(srcdir)/Include/cpython/bytesobject.h \
  1418. $(srcdir)/Include/cpython/cellobject.h \
  1419. $(srcdir)/Include/cpython/ceval.h \
  1420. $(srcdir)/Include/cpython/classobject.h \
  1421. $(srcdir)/Include/cpython/code.h \
  1422. $(srcdir)/Include/cpython/compile.h \
  1423. $(srcdir)/Include/cpython/complexobject.h \
  1424. $(srcdir)/Include/cpython/context.h \
  1425. $(srcdir)/Include/cpython/descrobject.h \
  1426. $(srcdir)/Include/cpython/dictobject.h \
  1427. $(srcdir)/Include/cpython/fileobject.h \
  1428. $(srcdir)/Include/cpython/fileutils.h \
  1429. $(srcdir)/Include/cpython/floatobject.h \
  1430. $(srcdir)/Include/cpython/frameobject.h \
  1431. $(srcdir)/Include/cpython/funcobject.h \
  1432. $(srcdir)/Include/cpython/genobject.h \
  1433. $(srcdir)/Include/cpython/import.h \
  1434. $(srcdir)/Include/cpython/initconfig.h \
  1435. $(srcdir)/Include/cpython/listobject.h \
  1436. $(srcdir)/Include/cpython/longintrepr.h \
  1437. $(srcdir)/Include/cpython/longobject.h \
  1438. $(srcdir)/Include/cpython/methodobject.h \
  1439. $(srcdir)/Include/cpython/modsupport.h \
  1440. $(srcdir)/Include/cpython/object.h \
  1441. $(srcdir)/Include/cpython/objimpl.h \
  1442. $(srcdir)/Include/cpython/odictobject.h \
  1443. $(srcdir)/Include/cpython/picklebufobject.h \
  1444. $(srcdir)/Include/cpython/pthread_stubs.h \
  1445. $(srcdir)/Include/cpython/pyctype.h \
  1446. $(srcdir)/Include/cpython/pydebug.h \
  1447. $(srcdir)/Include/cpython/pyerrors.h \
  1448. $(srcdir)/Include/cpython/pyfpe.h \
  1449. $(srcdir)/Include/cpython/pyframe.h \
  1450. $(srcdir)/Include/cpython/pylifecycle.h \
  1451. $(srcdir)/Include/cpython/pymem.h \
  1452. $(srcdir)/Include/cpython/pystate.h \
  1453. $(srcdir)/Include/cpython/pythonrun.h \
  1454. $(srcdir)/Include/cpython/pythread.h \
  1455. $(srcdir)/Include/cpython/pytime.h \
  1456. $(srcdir)/Include/cpython/setobject.h \
  1457. $(srcdir)/Include/cpython/sysmodule.h \
  1458. $(srcdir)/Include/cpython/traceback.h \
  1459. $(srcdir)/Include/cpython/tupleobject.h \
  1460. $(srcdir)/Include/cpython/unicodeobject.h \
  1461. $(srcdir)/Include/cpython/warnings.h \
  1462. $(srcdir)/Include/cpython/weakrefobject.h \
  1463. \
  1464. $(srcdir)/Include/internal/pycore_abstract.h \
  1465. $(srcdir)/Include/internal/pycore_accu.h \
  1466. $(srcdir)/Include/internal/pycore_asdl.h \
  1467. $(srcdir)/Include/internal/pycore_ast.h \
  1468. $(srcdir)/Include/internal/pycore_ast_state.h \
  1469. $(srcdir)/Include/internal/pycore_atomic.h \
  1470. $(srcdir)/Include/internal/pycore_atomic_funcs.h \
  1471. $(srcdir)/Include/internal/pycore_bitutils.h \
  1472. $(srcdir)/Include/internal/pycore_bytes_methods.h \
  1473. $(srcdir)/Include/internal/pycore_bytesobject.h \
  1474. $(srcdir)/Include/internal/pycore_call.h \
  1475. $(srcdir)/Include/internal/pycore_ceval.h \
  1476. $(srcdir)/Include/internal/pycore_code.h \
  1477. $(srcdir)/Include/internal/pycore_compile.h \
  1478. $(srcdir)/Include/internal/pycore_condvar.h \
  1479. $(srcdir)/Include/internal/pycore_context.h \
  1480. $(srcdir)/Include/internal/pycore_dict.h \
  1481. $(srcdir)/Include/internal/pycore_dtoa.h \
  1482. $(srcdir)/Include/internal/pycore_exceptions.h \
  1483. $(srcdir)/Include/internal/pycore_fileutils.h \
  1484. $(srcdir)/Include/internal/pycore_floatobject.h \
  1485. $(srcdir)/Include/internal/pycore_format.h \
  1486. $(srcdir)/Include/internal/pycore_function.h \
  1487. $(srcdir)/Include/internal/pycore_genobject.h \
  1488. $(srcdir)/Include/internal/pycore_getopt.h \
  1489. $(srcdir)/Include/internal/pycore_gil.h \
  1490. $(srcdir)/Include/internal/pycore_global_objects.h \
  1491. $(srcdir)/Include/internal/pycore_hamt.h \
  1492. $(srcdir)/Include/internal/pycore_hashtable.h \
  1493. $(srcdir)/Include/internal/pycore_import.h \
  1494. $(srcdir)/Include/internal/pycore_initconfig.h \
  1495. $(srcdir)/Include/internal/pycore_interp.h \
  1496. $(srcdir)/Include/internal/pycore_interpreteridobject.h \
  1497. $(srcdir)/Include/internal/pycore_list.h \
  1498. $(srcdir)/Include/internal/pycore_long.h \
  1499. $(srcdir)/Include/internal/pycore_moduleobject.h \
  1500. $(srcdir)/Include/internal/pycore_namespace.h \
  1501. $(srcdir)/Include/internal/pycore_object.h \
  1502. $(srcdir)/Include/internal/pycore_pathconfig.h \
  1503. $(srcdir)/Include/internal/pycore_pyarena.h \
  1504. $(srcdir)/Include/internal/pycore_pyerrors.h \
  1505. $(srcdir)/Include/internal/pycore_pyhash.h \
  1506. $(srcdir)/Include/internal/pycore_pylifecycle.h \
  1507. $(srcdir)/Include/internal/pycore_pymem.h \
  1508. $(srcdir)/Include/internal/pycore_pystate.h \
  1509. $(srcdir)/Include/internal/pycore_runtime.h \
  1510. $(srcdir)/Include/internal/pycore_runtime_init.h \
  1511. $(srcdir)/Include/internal/pycore_signal.h \
  1512. $(srcdir)/Include/internal/pycore_sliceobject.h \
  1513. $(srcdir)/Include/internal/pycore_strhex.h \
  1514. $(srcdir)/Include/internal/pycore_structseq.h \
  1515. $(srcdir)/Include/internal/pycore_symtable.h \
  1516. $(srcdir)/Include/internal/pycore_sysmodule.h \
  1517. $(srcdir)/Include/internal/pycore_traceback.h \
  1518. $(srcdir)/Include/internal/pycore_tuple.h \
  1519. $(srcdir)/Include/internal/pycore_typeobject.h \
  1520. $(srcdir)/Include/internal/pycore_ucnhash.h \
  1521. $(srcdir)/Include/internal/pycore_unionobject.h \
  1522. $(srcdir)/Include/internal/pycore_unicodeobject.h \
  1523. $(srcdir)/Include/internal/pycore_warnings.h \
  1524. $(DTRACE_HEADERS) \
  1525. \
  1526. \
  1527. $(srcdir)/Python/stdlib_module_names.h
  1528. $(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)
  1529. ######################################################################
  1530. TESTOPTS= $(EXTRATESTOPTS)
  1531. TESTPYTHON= $(RUNSHARED) $(PYTHON_FOR_BUILD) $(TESTPYTHONOPTS)
  1532. TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
  1533. TESTTIMEOUT= 1200
  1534. .PHONY: test testall testuniversal buildbottest pythoninfo
  1535. # Remove "test_python_*" directories of previous failed test jobs.
  1536. # Pass TESTOPTS options because it can contain --tempdir option.
  1537. cleantest: all
  1538. $(TESTRUNNER) $(TESTOPTS) --cleanup
  1539. # Run a basic set of regression tests.
  1540. # This excludes some tests that are particularly resource-intensive.
  1541. test: all
  1542. $(TESTRUNNER) $(TESTOPTS)
  1543. # Run the full test suite twice - once without .pyc files, and once with.
  1544. # In the past, we've had problems where bugs in the marshalling or
  1545. # elsewhere caused bytecode read from .pyc files to behave differently
  1546. # than bytecode generated directly from a .py source file. Sometimes
  1547. # the bytecode read from a .pyc file had the bug, sometimes the directly
  1548. # generated bytecode. This is sometimes a very shy bug needing a lot of
  1549. # sample data.
  1550. testall: all
  1551. -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  1552. $(TESTPYTHON) -E $(srcdir)/Lib/compileall.py
  1553. -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  1554. -$(TESTRUNNER) -u all $(TESTOPTS)
  1555. $(TESTRUNNER) -u all $(TESTOPTS)
  1556. # Run the test suite for both architectures in a Universal build on OSX.
  1557. # Must be run on an Intel box.
  1558. testuniversal: all
  1559. @if [ `arch` != 'i386' ]; then \
  1560. echo "This can only be used on OSX/i386" ;\
  1561. exit 1 ;\
  1562. fi
  1563. $(TESTRUNNER) -u all $(TESTOPTS)
  1564. $(RUNSHARED) /usr/libexec/oah/translate \
  1565. ./$(BUILDPYTHON) -E -m test -j 0 -u all $(TESTOPTS)
  1566. # Like testall, but with only one pass and without multiple processes.
  1567. # Run an optional script to include information about the build environment.
  1568. buildbottest: all
  1569. -@if which pybuildbot.identify >/dev/null 2>&1; then \
  1570. pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
  1571. fi
  1572. $(TESTRUNNER) -j 1 -u all -W --slowest --fail-env-changed --timeout=$(TESTTIMEOUT) $(TESTOPTS)
  1573. # Like testall, but run Python tests with HOSTRUNNER directly.
  1574. hostrunnertest: all
  1575. $(RUNSHARED) $(HOSTRUNNER) ./$(BUILDPYTHON) -m test -u all $(TESTOPTS)
  1576. pythoninfo: all
  1577. $(RUNSHARED) $(HOSTRUNNER) ./$(BUILDPYTHON) -m test.pythoninfo
  1578. QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
  1579. test_multibytecodec test_urllib2_localnet test_itertools \
  1580. test_multiprocessing_fork test_multiprocessing_spawn \
  1581. test_multiprocessing_forkserver \
  1582. test_mailbox test_nntplib test_socket test_poll \
  1583. test_select test_zipfile test_concurrent_futures
  1584. quicktest: all
  1585. $(TESTRUNNER) $(QUICKTESTOPTS)
  1586. # SSL tests
  1587. .PHONY: multisslcompile multissltest
  1588. multisslcompile: all
  1589. $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/ssl/multissltests.py --steps=modules
  1590. multissltest: all
  1591. $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/ssl/multissltests.py
  1592. # All install targets use the "all" target as synchronization point to
  1593. # prevent race conditions with PGO builds. PGO builds use recursive make,
  1594. # which can lead to two parallel `./python setup.py build` processes that
  1595. # step on each others toes.
  1596. install: commoninstall bininstall maninstall
  1597. if test "x$(ENSUREPIP)" != "xno" ; then \
  1598. case $(ENSUREPIP) in \
  1599. upgrade) ensurepip="--upgrade" ;; \
  1600. install|*) ensurepip="" ;; \
  1601. esac; \
  1602. $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
  1603. $$ensurepip --root=$(DESTDIR)/ ; \
  1604. fi
  1605. altinstall: commoninstall
  1606. if test "x$(ENSUREPIP)" != "xno" ; then \
  1607. case $(ENSUREPIP) in \
  1608. upgrade) ensurepip="--altinstall --upgrade" ;; \
  1609. install|*) ensurepip="--altinstall" ;; \
  1610. esac; \
  1611. $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
  1612. $$ensurepip --root=$(DESTDIR)/ ; \
  1613. fi
  1614. commoninstall: check-clean-src \
  1615. altbininstall libinstall inclinstall libainstall \
  1616. sharedinstall oldsharedinstall altmaninstall \
  1617. # Install shared libraries enabled by Setup
  1618. DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
  1619. oldsharedinstall: $(DESTSHARED) all
  1620. @for i in X $(SHAREDMODS); do \
  1621. if test $$i != X; then \
  1622. echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
  1623. $(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/`basename $$i`; \
  1624. fi; \
  1625. done
  1626. $(DESTSHARED):
  1627. @for i in $(DESTDIRS); \
  1628. do \
  1629. if test ! -d $(DESTDIR)$$i; then \
  1630. echo "Creating directory $$i"; \
  1631. $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  1632. else true; \
  1633. fi; \
  1634. done
  1635. # Install the interpreter with $(VERSION) affixed
  1636. # This goes into $(exec_prefix)
  1637. altbininstall: $(BUILDPYTHON)
  1638. @for i in $(BINDIR) $(LIBDIR); \
  1639. do \
  1640. if test ! -d $(DESTDIR)$$i; then \
  1641. echo "Creating directory $$i"; \
  1642. $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  1643. else true; \
  1644. fi; \
  1645. done
  1646. if test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \
  1647. $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \
  1648. else \
  1649. $(INSTALL_PROGRAM) $(STRIPFLAG) Mac/pythonw $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \
  1650. fi
  1651. -if test "$(VERSION)" != "$(LDVERSION)"; then \
  1652. if test -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE) -o -h $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
  1653. then rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
  1654. fi; \
  1655. (cd $(DESTDIR)$(BINDIR); $(LN) python$(LDVERSION)$(EXE) python$(VERSION)$(EXE)); \
  1656. fi
  1657. @if test "$(PY_ENABLE_SHARED)" = 1 -o "$(STATIC_LIBPYTHON)" = 1; then \
  1658. if test -f $(LDLIBRARY) && test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \
  1659. if test -n "$(DLLLIBRARY)" ; then \
  1660. $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \
  1661. else \
  1662. $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
  1663. if test $(LDLIBRARY) != $(INSTSONAME); then \
  1664. (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) $(LDLIBRARY)) \
  1665. fi \
  1666. fi; \
  1667. if test -n "$(PY3LIBRARY)"; then \
  1668. $(INSTALL_SHARED) $(PY3LIBRARY) $(DESTDIR)$(LIBDIR)/$(PY3LIBRARY); \
  1669. fi; \
  1670. else true; \
  1671. fi; \
  1672. fi
  1673. if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
  1674. rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-32$(EXE); \
  1675. lipo $(LIPO_32BIT_FLAGS) \
  1676. -output $(DESTDIR)$(BINDIR)/python$(VERSION)-32$(EXE) \
  1677. $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
  1678. fi
  1679. if test "x$(LIPO_INTEL64_FLAGS)" != "x" ; then \
  1680. rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-intel64$(EXE); \
  1681. lipo $(LIPO_INTEL64_FLAGS) \
  1682. -output $(DESTDIR)$(BINDIR)/python$(VERSION)-intel64$(EXE) \
  1683. $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
  1684. fi
  1685. bininstall: altbininstall
  1686. if test ! -d $(DESTDIR)$(LIBPC); then \
  1687. echo "Creating directory $(LIBPC)"; \
  1688. $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC); \
  1689. fi
  1690. -if test -f $(DESTDIR)$(BINDIR)/python3$(EXE) -o -h $(DESTDIR)$(BINDIR)/python3$(EXE); \
  1691. then rm -f $(DESTDIR)$(BINDIR)/python3$(EXE); \
  1692. else true; \
  1693. fi
  1694. (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) python3$(EXE))
  1695. -if test "$(VERSION)" != "$(LDVERSION)"; then \
  1696. rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config; \
  1697. (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(LDVERSION)-config python$(VERSION)-config); \
  1698. rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc; \
  1699. (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python-$(LDVERSION).pc); \
  1700. rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION)-embed.pc; \
  1701. (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python-$(LDVERSION)-embed.pc); \
  1702. fi
  1703. -rm -f $(DESTDIR)$(BINDIR)/python3-config
  1704. (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config)
  1705. -rm -f $(DESTDIR)$(LIBPC)/python3.pc
  1706. (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc)
  1707. -rm -f $(DESTDIR)$(LIBPC)/python3-embed.pc
  1708. (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python3-embed.pc)
  1709. -rm -f $(DESTDIR)$(BINDIR)/idle3
  1710. (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
  1711. -rm -f $(DESTDIR)$(BINDIR)/pydoc3
  1712. (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
  1713. -rm -f $(DESTDIR)$(BINDIR)/2to3
  1714. (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
  1715. if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
  1716. rm -f $(DESTDIR)$(BINDIR)/python3-32$(EXE); \
  1717. (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-32$(EXE) python3-32$(EXE)) \
  1718. fi
  1719. if test "x$(LIPO_INTEL64_FLAGS)" != "x" ; then \
  1720. rm -f $(DESTDIR)$(BINDIR)/python3-intel64$(EXE); \
  1721. (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-intel64$(EXE) python3-intel64$(EXE)) \
  1722. fi
  1723. # Install the versioned manual page
  1724. altmaninstall:
  1725. @for i in $(MANDIR) $(MANDIR)/man1; \
  1726. do \
  1727. if test ! -d $(DESTDIR)$$i; then \
  1728. echo "Creating directory $$i"; \
  1729. $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  1730. else true; \
  1731. fi; \
  1732. done
  1733. $(INSTALL_DATA) $(srcdir)/Misc/python.man \
  1734. $(DESTDIR)$(MANDIR)/man1/python$(VERSION).1
  1735. # Install the unversioned manual page
  1736. maninstall: altmaninstall
  1737. -rm -f $(DESTDIR)$(MANDIR)/man1/python3.1
  1738. (cd $(DESTDIR)$(MANDIR)/man1; $(LN) -s python$(VERSION).1 python3.1)
  1739. # Install the library
  1740. XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
  1741. LIBSUBDIRS= asyncio \
  1742. collections \
  1743. concurrent concurrent/futures \
  1744. csv \
  1745. ctypes ctypes/macholib \
  1746. curses \
  1747. dbm \
  1748. distutils distutils/command \
  1749. email email/mime \
  1750. encodings \
  1751. ensurepip ensurepip/_bundled \
  1752. html \
  1753. http \
  1754. idlelib idlelib/Icons \
  1755. importlib importlib/resources importlib/metadata \
  1756. json \
  1757. lib2to3 lib2to3/fixes lib2to3/pgen2 \
  1758. logging \
  1759. multiprocessing multiprocessing/dummy \
  1760. pydoc_data \
  1761. re \
  1762. site-packages \
  1763. sqlite3 \
  1764. tkinter \
  1765. tomllib \
  1766. turtledemo \
  1767. unittest \
  1768. urllib \
  1769. venv venv/scripts venv/scripts/common venv/scripts/posix \
  1770. wsgiref \
  1771. $(XMLLIBSUBDIRS) \
  1772. xmlrpc \
  1773. zoneinfo \
  1774. __phello__
  1775. TESTSUBDIRS= ctypes/test \
  1776. distutils/tests \
  1777. idlelib/idle_test \
  1778. lib2to3/tests \
  1779. lib2to3/tests/data \
  1780. lib2to3/tests/data/fixers \
  1781. lib2to3/tests/data/fixers/myfixes \
  1782. test test/audiodata \
  1783. test/capath test/cjkencodings \
  1784. test/data test/decimaltestdata \
  1785. test/dtracedata test/eintrdata \
  1786. test/encoded_modules test/imghdrdata \
  1787. test/libregrtest test/sndhdrdata \
  1788. test/subprocessdata test/support \
  1789. test/test_asyncio \
  1790. test/test_email test/test_email/data \
  1791. test/test_import \
  1792. test/test_import/data \
  1793. test/test_import/data/circular_imports \
  1794. test/test_import/data/circular_imports/subpkg \
  1795. test/test_import/data/circular_imports/subpkg2 \
  1796. test/test_import/data/circular_imports/subpkg2/parent \
  1797. test/test_import/data/package \
  1798. test/test_import/data/package2 \
  1799. test/test_import/data/unwritable \
  1800. test/test_importlib \
  1801. test/test_importlib/builtin \
  1802. test/test_importlib/data \
  1803. test/test_importlib/data01 \
  1804. test/test_importlib/data01/subdirectory \
  1805. test/test_importlib/data02 \
  1806. test/test_importlib/data02/one \
  1807. test/test_importlib/data02/two \
  1808. test/test_importlib/data03 \
  1809. test/test_importlib/data03/namespace \
  1810. test/test_importlib/data03/namespace/portion1 \
  1811. test/test_importlib/data03/namespace/portion2 \
  1812. test/test_importlib/extension \
  1813. test/test_importlib/frozen \
  1814. test/test_importlib/import_ \
  1815. test/test_importlib/namespace_pkgs \
  1816. test/test_importlib/namespace_pkgs/both_portions \
  1817. test/test_importlib/namespace_pkgs/both_portions/foo \
  1818. test/test_importlib/namespace_pkgs/module_and_namespace_package \
  1819. test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
  1820. test/test_importlib/namespace_pkgs/not_a_namespace_pkg \
  1821. test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo \
  1822. test/test_importlib/namespace_pkgs/portion1 \
  1823. test/test_importlib/namespace_pkgs/portion1/foo \
  1824. test/test_importlib/namespace_pkgs/portion2 \
  1825. test/test_importlib/namespace_pkgs/portion2/foo \
  1826. test/test_importlib/namespace_pkgs/project1 \
  1827. test/test_importlib/namespace_pkgs/project1/parent \
  1828. test/test_importlib/namespace_pkgs/project1/parent/child \
  1829. test/test_importlib/namespace_pkgs/project2 \
  1830. test/test_importlib/namespace_pkgs/project2/parent \
  1831. test/test_importlib/namespace_pkgs/project2/parent/child \
  1832. test/test_importlib/namespace_pkgs/project3 \
  1833. test/test_importlib/namespace_pkgs/project3/parent \
  1834. test/test_importlib/namespace_pkgs/project3/parent/child \
  1835. test/test_importlib/namespacedata01 \
  1836. test/test_importlib/partial \
  1837. test/test_importlib/resources \
  1838. test/test_importlib/source \
  1839. test/test_importlib/zipdata01 \
  1840. test/test_importlib/zipdata02 \
  1841. test/test_json \
  1842. test/test_peg_generator \
  1843. test/test_tools \
  1844. test/test_warnings test/test_warnings/data \
  1845. test/test_zoneinfo test/test_zoneinfo/data \
  1846. test/tracedmodules \
  1847. test/typinganndata \
  1848. test/xmltestdata test/xmltestdata/c14n-20 \
  1849. test/ziptestdata \
  1850. tkinter/test tkinter/test/test_tkinter \
  1851. tkinter/test/test_ttk \
  1852. unittest/test unittest/test/testmock
  1853. TEST_MODULES=yes
  1854. libinstall: all $(srcdir)/Modules/xxmodule.c
  1855. @for i in $(SCRIPTDIR) $(LIBDEST); \
  1856. do \
  1857. if test ! -d $(DESTDIR)$$i; then \
  1858. echo "Creating directory $$i"; \
  1859. $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  1860. else true; \
  1861. fi; \
  1862. done
  1863. @if test "$(TEST_MODULES)" = yes; then \
  1864. subdirs="$(LIBSUBDIRS) $(TESTSUBDIRS)"; \
  1865. else \
  1866. subdirs="$(LIBSUBDIRS)"; \
  1867. fi; \
  1868. for d in $$subdirs; \
  1869. do \
  1870. a=$(srcdir)/Lib/$$d; \
  1871. if test ! -d $$a; then continue; else true; fi; \
  1872. b=$(LIBDEST)/$$d; \
  1873. if test ! -d $(DESTDIR)$$b; then \
  1874. echo "Creating directory $$b"; \
  1875. $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \
  1876. else true; \
  1877. fi; \
  1878. done
  1879. @for i in $(srcdir)/Lib/*.py; \
  1880. do \
  1881. if test -x $$i; then \
  1882. $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
  1883. echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \
  1884. else \
  1885. $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
  1886. echo $(INSTALL_DATA) $$i $(LIBDEST); \
  1887. fi; \
  1888. done
  1889. @if test "$(TEST_MODULES)" = yes; then \
  1890. subdirs="$(LIBSUBDIRS) $(TESTSUBDIRS)"; \
  1891. else \
  1892. subdirs="$(LIBSUBDIRS)"; \
  1893. fi; \
  1894. for d in $$subdirs; \
  1895. do \
  1896. a=$(srcdir)/Lib/$$d; \
  1897. if test ! -d $$a; then continue; else true; fi; \
  1898. if test `ls $$a | wc -l` -lt 1; then continue; fi; \
  1899. b=$(LIBDEST)/$$d; \
  1900. for i in $$a/*; \
  1901. do \
  1902. case $$i in \
  1903. *CVS) ;; \
  1904. *.py[co]) ;; \
  1905. *.orig) ;; \
  1906. *~) ;; \
  1907. *) \
  1908. if test -d $$i; then continue; fi; \
  1909. if test -x $$i; then \
  1910. echo $(INSTALL_SCRIPT) $$i $$b; \
  1911. $(INSTALL_SCRIPT) $$i $(DESTDIR)$$b; \
  1912. else \
  1913. echo $(INSTALL_DATA) $$i $$b; \
  1914. $(INSTALL_DATA) $$i $(DESTDIR)$$b; \
  1915. fi;; \
  1916. esac; \
  1917. done; \
  1918. done
  1919. $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \
  1920. $(DESTDIR)$(LIBDEST); \
  1921. $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
  1922. if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
  1923. $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
  1924. $(DESTDIR)$(LIBDEST)/distutils/tests ; \
  1925. fi
  1926. -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1927. $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
  1928. -j0 -d $(LIBDEST) -f \
  1929. -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
  1930. $(DESTDIR)$(LIBDEST)
  1931. -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1932. $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
  1933. -j0 -d $(LIBDEST) -f \
  1934. -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
  1935. $(DESTDIR)$(LIBDEST)
  1936. -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1937. $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
  1938. -j0 -d $(LIBDEST) -f \
  1939. -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
  1940. $(DESTDIR)$(LIBDEST)
  1941. -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1942. $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
  1943. -j0 -d $(LIBDEST)/site-packages -f \
  1944. -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  1945. -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1946. $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
  1947. -j0 -d $(LIBDEST)/site-packages -f \
  1948. -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  1949. -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1950. $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
  1951. -j0 -d $(LIBDEST)/site-packages -f \
  1952. -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  1953. -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1954. $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
  1955. -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  1956. $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
  1957. # bpo-21536: Misc/python-config.sh is generated in the build directory
  1958. # from $(srcdir)Misc/python-config.sh.in.
  1959. python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
  1960. @ # Substitution happens here, as the completely-expanded BINDIR
  1961. @ # is not available in configure
  1962. sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py
  1963. @ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}
  1964. LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config
  1965. @ # On Darwin, always use the python version of the script, the shell
  1966. @ # version doesn't use the compiler customizations that are provided
  1967. @ # in python (_osx_support.py).
  1968. @if test `uname -s` = Darwin; then \
  1969. cp python-config.py python-config; \
  1970. fi
  1971. # Install the include files
  1972. INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
  1973. inclinstall:
  1974. @for i in $(INCLDIRSTOMAKE); \
  1975. do \
  1976. if test ! -d $(DESTDIR)$$i; then \
  1977. echo "Creating directory $$i"; \
  1978. $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  1979. else true; \
  1980. fi; \
  1981. done
  1982. @if test ! -d $(DESTDIR)$(INCLUDEPY)/cpython; then \
  1983. echo "Creating directory $(DESTDIR)$(INCLUDEPY)/cpython"; \
  1984. $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(INCLUDEPY)/cpython; \
  1985. else true; \
  1986. fi
  1987. @if test ! -d $(DESTDIR)$(INCLUDEPY)/internal; then \
  1988. echo "Creating directory $(DESTDIR)$(INCLUDEPY)/internal"; \
  1989. $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(INCLUDEPY)/internal; \
  1990. else true; \
  1991. fi
  1992. @for i in $(srcdir)/Include/*.h; \
  1993. do \
  1994. echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
  1995. $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
  1996. done
  1997. @for i in $(srcdir)/Include/cpython/*.h; \
  1998. do \
  1999. echo $(INSTALL_DATA) $$i $(INCLUDEPY)/cpython; \
  2000. $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY)/cpython; \
  2001. done
  2002. @for i in $(srcdir)/Include/internal/*.h; \
  2003. do \
  2004. echo $(INSTALL_DATA) $$i $(INCLUDEPY)/internal; \
  2005. $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY)/internal; \
  2006. done
  2007. $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
  2008. # Install the library and miscellaneous stuff needed for extending/embedding
  2009. # This goes into $(exec_prefix)
  2010. LIBPL= $(prefix)/lib/python3.11/config-$(VERSION)$(ABIFLAGS)
  2011. # pkgconfig directory
  2012. LIBPC= $(LIBDIR)/pkgconfig
  2013. libainstall: all python-config
  2014. @for i in $(LIBDIR) $(LIBPL) $(LIBPC) $(BINDIR); \
  2015. do \
  2016. if test ! -d $(DESTDIR)$$i; then \
  2017. echo "Creating directory $$i"; \
  2018. $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  2019. else true; \
  2020. fi; \
  2021. done
  2022. @if test "$(STATIC_LIBPYTHON)" = 1; then \
  2023. if test -d $(LIBRARY); then :; else \
  2024. if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
  2025. if test "$(SHLIB_SUFFIX)" = .dll; then \
  2026. $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
  2027. else \
  2028. $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
  2029. fi; \
  2030. else \
  2031. echo Skip install of $(LIBRARY) - use make frameworkinstall; \
  2032. fi; \
  2033. fi; \
  2034. $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o; \
  2035. fi
  2036. $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
  2037. $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
  2038. $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
  2039. $(INSTALL_DATA) $(srcdir)/Modules/Setup $(DESTDIR)$(LIBPL)/Setup
  2040. $(INSTALL_DATA) Modules/Setup.bootstrap $(DESTDIR)$(LIBPL)/Setup.bootstrap
  2041. $(INSTALL_DATA) Modules/Setup.stdlib $(DESTDIR)$(LIBPL)/Setup.stdlib
  2042. $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
  2043. $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
  2044. $(INSTALL_DATA) Misc/python-embed.pc $(DESTDIR)$(LIBPC)/python-$(VERSION)-embed.pc
  2045. $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
  2046. $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
  2047. $(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
  2048. $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config
  2049. @if [ -s Modules/python.exp -a \
  2050. "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
  2051. echo; echo "Installing support files for building shared extension modules on AIX:"; \
  2052. $(INSTALL_DATA) Modules/python.exp \
  2053. $(DESTDIR)$(LIBPL)/python.exp; \
  2054. echo; echo "$(LIBPL)/python.exp"; \
  2055. $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \
  2056. $(DESTDIR)$(LIBPL)/makexp_aix; \
  2057. echo "$(LIBPL)/makexp_aix"; \
  2058. $(INSTALL_SCRIPT) Modules/ld_so_aix \
  2059. $(DESTDIR)$(LIBPL)/ld_so_aix; \
  2060. echo "$(LIBPL)/ld_so_aix"; \
  2061. echo; echo "See Misc/README.AIX for details."; \
  2062. else true; \
  2063. fi
  2064. # Install the dynamically loadable modules
  2065. # This goes into $(exec_prefix)
  2066. sharedinstall: all
  2067. $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
  2068. --prefix=$(prefix) \
  2069. --install-scripts=$(BINDIR) \
  2070. --install-platlib=$(DESTSHARED) \
  2071. --root=$(DESTDIR)/
  2072. -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py
  2073. -rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
  2074. # Here are a couple of targets for MacOSX again, to install a full
  2075. # framework-based Python. frameworkinstall installs everything, the
  2076. # subtargets install specific parts. Much of the actual work is offloaded to
  2077. # the Makefile in Mac
  2078. #
  2079. #
  2080. # This target is here for backward compatibility, previous versions of Python
  2081. # hadn't integrated framework installation in the normal install process.
  2082. frameworkinstall: install
  2083. # On install, we re-make the framework
  2084. # structure in the install location, /Library/Frameworks/ or the argument to
  2085. # --enable-framework. If --enable-framework has been specified then we have
  2086. # automatically set prefix to the location deep down in the framework, so we
  2087. # only have to cater for the structural bits of the framework.
  2088. frameworkinstallframework: frameworkinstallstructure install frameworkinstallmaclib
  2089. frameworkinstallstructure: $(LDLIBRARY)
  2090. @if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
  2091. echo Not configured with --enable-framework; \
  2092. exit 1; \
  2093. else true; \
  2094. fi
  2095. @for i in $(prefix)/Resources/English.lproj $(prefix)/lib; do\
  2096. if test ! -d $(DESTDIR)$$i; then \
  2097. echo "Creating directory $(DESTDIR)$$i"; \
  2098. $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  2099. else true; \
  2100. fi; \
  2101. done
  2102. $(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers
  2103. sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
  2104. $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
  2105. $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
  2106. $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
  2107. $(LN) -fsn Versions/Current/Resources $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Resources
  2108. $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(PYTHONFRAMEWORKPREFIX)/$(LDLIBRARY)
  2109. # This installs Mac/Lib into the framework
  2110. # Install a number of symlinks to keep software that expects a normal unix
  2111. # install (which includes python-config) happy.
  2112. frameworkinstallmaclib:
  2113. $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).a"
  2114. $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).dylib"
  2115. $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).a"
  2116. $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).dylib"
  2117. $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(LDVERSION).dylib"
  2118. $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(VERSION).dylib"
  2119. # This installs the IDE, the Launcher and other apps into /Applications
  2120. frameworkinstallapps:
  2121. cd Mac && $(MAKE) installapps DESTDIR="$(DESTDIR)"
  2122. # Build the bootstrap executable that will spawn the interpreter inside
  2123. # an app bundle within the framework. This allows the interpreter to
  2124. # run OS X GUI APIs.
  2125. frameworkpythonw:
  2126. cd Mac && $(MAKE) pythonw
  2127. # This installs the python* and other bin symlinks in $prefix/bin or in
  2128. # a bin directory relative to the framework root
  2129. frameworkinstallunixtools:
  2130. cd Mac && $(MAKE) installunixtools DESTDIR="$(DESTDIR)"
  2131. frameworkaltinstallunixtools:
  2132. cd Mac && $(MAKE) altinstallunixtools DESTDIR="$(DESTDIR)"
  2133. # This installs the Tools into the applications directory.
  2134. # It is not part of a normal frameworkinstall
  2135. frameworkinstallextras:
  2136. cd Mac && $(MAKE) installextras DESTDIR="$(DESTDIR)"
  2137. # Build the toplevel Makefile
  2138. Makefile.pre: $(srcdir)/Makefile.pre.in config.status
  2139. CONFIG_FILES=Makefile.pre CONFIG_HEADERS= $(SHELL) config.status
  2140. $(MAKE) -f Makefile.pre Makefile
  2141. # Run the configure script.
  2142. config.status: $(srcdir)/configure
  2143. $(SHELL) $(srcdir)/configure $(CONFIG_ARGS)
  2144. .PRECIOUS: config.status $(BUILDPYTHON) Makefile Makefile.pre
  2145. # Some make's put the object file in the current directory
  2146. .c.o:
  2147. $(CC) -c $(PY_CORE_CFLAGS) -o $@ $<
  2148. # bpo-30104: dtoa.c uses union to cast double to unsigned long[2]. clang 4.0
  2149. # with -O2 or higher and strict aliasing miscompiles the ratio() function
  2150. # causing rounding issues. Compile dtoa.c using -fno-strict-aliasing on clang.
  2151. # https://bugs.llvm.org//show_bug.cgi?id=31928
  2152. Python/dtoa.o: Python/dtoa.c
  2153. $(CC) -c $(PY_CORE_CFLAGS) $(CFLAGS_ALIASING) -o $@ $<
  2154. # Run reindent on the library
  2155. reindent:
  2156. ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
  2157. # Rerun configure with the same options as it was run last time,
  2158. # provided the config.status script exists
  2159. recheck:
  2160. $(SHELL) config.status --recheck
  2161. $(SHELL) config.status
  2162. # Regenerate configure and pyconfig.h.in
  2163. .PHONY: autoconf
  2164. autoconf:
  2165. (cd $(srcdir); autoreconf -ivf -Werror)
  2166. .PHONY: regen-configure
  2167. regen-configure:
  2168. @if command -v podman >/dev/null; then RUNTIME="podman"; else RUNTIME="docker"; fi; \
  2169. if ! command -v $$RUNTIME; then echo "$@ needs either Podman or Docker container runtime." >&2; exit 1; fi; \
  2170. if command -v selinuxenabled >/dev/null && selinuxenabled; then OPT=":Z"; fi; \
  2171. CMD="$$RUNTIME run --rm --pull=always -v $(abs_srcdir):/src$$OPT quay.io/tiran/cpython_autoconf:269"; \
  2172. echo $$CMD; \
  2173. $$CMD || exit $?
  2174. # Create a tags file for vi
  2175. tags::
  2176. ctags -w $(srcdir)/Include/*.h $(srcdir)/Include/cpython/*.h $(srcdir)/Include/internal/*.h
  2177. for i in $(SRCDIRS); do ctags -f tags -w -a $(srcdir)/$$i/*.[ch]; done
  2178. ctags -f tags -w -a $(srcdir)/Modules/_ctypes/*.[ch]
  2179. find $(srcdir)/Lib -type f -name "*.py" -not -name "test_*.py" -not -path "*/test/*" -not -path "*/tests/*" -not -path "*/*_test/*" | ctags -f tags -w -a -L -
  2180. LC_ALL=C sort -o tags tags
  2181. # Create a tags file for GNU Emacs
  2182. TAGS::
  2183. cd $(srcdir); \
  2184. etags Include/*.h Include/cpython/*.h Include/internal/*.h; \
  2185. for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done
  2186. etags -a $(srcdir)/Modules/_ctypes/*.[ch]
  2187. find $(srcdir)/Lib -type f -name "*.py" -not -name "test_*.py" -not -path "*/test/*" -not -path "*/tests/*" -not -path "*/*_test/*" | etags - -a
  2188. # Sanitation targets -- clean leaves libraries, executables and tags
  2189. # files, which clobber removes as well
  2190. pycremoval:
  2191. -find $(srcdir) -depth -name '__pycache__' -exec rm -rf {} ';'
  2192. -find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
  2193. rmtestturds:
  2194. -rm -f *BAD *GOOD *SKIPPED
  2195. -rm -rf OUT
  2196. -rm -f *.TXT
  2197. -rm -f *.txt
  2198. -rm -f gb-18030-2000.xml
  2199. docclean:
  2200. $(MAKE) -C $(srcdir)/Doc clean
  2201. # like the 'clean' target but retain the profile guided optimization (PGO)
  2202. # data. The PGO data is only valid if source code remains unchanged.
  2203. clean-retain-profile: pycremoval
  2204. find . -name '*.[oa]' -exec rm -f {} ';'
  2205. find . -name '*.s[ol]' -exec rm -f {} ';'
  2206. find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
  2207. find . -name '*.wasm' -exec rm -f {} ';'
  2208. find . -name '*.lst' -exec rm -f {} ';'
  2209. find build -name 'fficonfig.h' -exec rm -f {} ';' || true
  2210. find build -name '*.py' -exec rm -f {} ';' || true
  2211. find build -name '*.py[co]' -exec rm -f {} ';' || true
  2212. -rm -f pybuilddir.txt
  2213. -rm -f Lib/lib2to3/*Grammar*.pickle
  2214. -rm -f _bootstrap_python
  2215. -rm -f python.html python*.js python.data python*.symbols python*.map
  2216. -rm -f $(WASM_STDLIB)
  2217. -rm -f Programs/_testembed Programs/_freeze_module
  2218. -rm -f Python/deepfreeze/*.[co]
  2219. -rm -f Python/frozen_modules/*.h
  2220. -rm -f Python/frozen_modules/MANIFEST
  2221. -find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
  2222. -rm -f Include/pydtrace_probes.h
  2223. -rm -f profile-gen-stamp
  2224. profile-removal:
  2225. find . -name '*.gc??' -exec rm -f {} ';'
  2226. find . -name '*.profclang?' -exec rm -f {} ';'
  2227. find . -name '*.dyn' -exec rm -f {} ';'
  2228. rm -f $(COVERAGE_INFO)
  2229. rm -rf $(COVERAGE_REPORT)
  2230. rm -f profile-run-stamp
  2231. clean: clean-retain-profile
  2232. @if test build_all = profile-opt; then \
  2233. rm -f profile-gen-stamp profile-clean-stamp; \
  2234. $(MAKE) profile-removal; \
  2235. fi
  2236. clobber: clean
  2237. -rm -f $(BUILDPYTHON) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
  2238. tags TAGS \
  2239. config.cache config.log pyconfig.h Modules/config.c
  2240. -rm -rf build platform
  2241. -rm -rf $(PYTHONFRAMEWORKDIR)
  2242. -rm -f python-config.py python-config
  2243. # Make things extra clean, before making a distribution:
  2244. # remove all generated files, even Makefile[.pre]
  2245. # Keep configure and Python-ast.[ch], it's possible they can't be generated
  2246. distclean: clobber docclean
  2247. for file in $(srcdir)/Lib/test/data/* ; do \
  2248. if test "$$file" != "$(srcdir)/Lib/test/data/README"; then rm "$$file"; fi; \
  2249. done
  2250. -rm -f core Makefile Makefile.pre config.status Modules/Setup.local \
  2251. Modules/Setup.bootstrap Modules/Setup.stdlib \
  2252. Modules/ld_so_aix Modules/python.exp Misc/python.pc \
  2253. Misc/python-embed.pc Misc/python-config.sh
  2254. -rm -f python*-gdb.py
  2255. # Issue #28258: set LC_ALL to avoid issues with Estonian locale.
  2256. # Expansion is performed here by shell (spawned by make) itself before
  2257. # arguments are passed to find. So LC_ALL=C must be set as a separate
  2258. # command.
  2259. LC_ALL=C; find $(srcdir)/[a-zA-Z]* '(' -name '*.fdc' -o -name '*~' \
  2260. -o -name '[@,#]*' -o -name '*.old' \
  2261. -o -name '*.orig' -o -name '*.rej' \
  2262. -o -name '*.bak' ')' \
  2263. -exec rm -f {} ';'
  2264. # Check that all symbols exported by libpython start with "Py" or "_Py"
  2265. smelly: all
  2266. $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/smelly.py
  2267. # Find files with funny names
  2268. funny:
  2269. find $(SUBDIRS) $(SUBDIRSTOO) \
  2270. -type d \
  2271. -o -name '*.[chs]' \
  2272. -o -name '*.py' \
  2273. -o -name '*.pyw' \
  2274. -o -name '*.dat' \
  2275. -o -name '*.el' \
  2276. -o -name '*.fd' \
  2277. -o -name '*.in' \
  2278. -o -name '*.gif' \
  2279. -o -name '*.txt' \
  2280. -o -name '*.xml' \
  2281. -o -name '*.xbm' \
  2282. -o -name '*.xpm' \
  2283. -o -name '*.uue' \
  2284. -o -name '*.decTest' \
  2285. -o -name '*.tmCommand' \
  2286. -o -name '*.tmSnippet' \
  2287. -o -name 'Setup' \
  2288. -o -name 'Setup.*' \
  2289. -o -name README \
  2290. -o -name NEWS \
  2291. -o -name HISTORY \
  2292. -o -name Makefile \
  2293. -o -name ChangeLog \
  2294. -o -name .hgignore \
  2295. -o -name MANIFEST \
  2296. -o -print
  2297. # Perform some verification checks on any modified files.
  2298. patchcheck: all
  2299. $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
  2300. check-limited-abi: all
  2301. $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/stable_abi.py --all $(srcdir)/Misc/stable_abi.toml
  2302. .PHONY: update-config
  2303. update-config:
  2304. curl -sL -o config.guess 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
  2305. curl -sL -o config.sub 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'
  2306. chmod +x config.guess config.sub
  2307. # Dependencies
  2308. Python/thread.o: $(srcdir)/Python/thread_nt.h $(srcdir)/Python/thread_pthread.h $(srcdir)/Python/thread_pthread_stubs.h $(srcdir)/Python/condvar.h
  2309. # Declare targets that aren't real files
  2310. .PHONY: all build_all build_wasm sharedmods check-clean-src oldsharedmods test quicktest
  2311. .PHONY: install altinstall oldsharedinstall bininstall altbininstall
  2312. .PHONY: maninstall libinstall inclinstall libainstall sharedinstall
  2313. .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
  2314. .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
  2315. .PHONY: frameworkaltinstallunixtools recheck clean clobber distclean
  2316. .PHONY: smelly funny patchcheck touch altmaninstall commoninstall
  2317. .PHONY: clean-retain-profile profile-removal run_profile_task
  2318. .PHONY: build_all_generate_profile build_all_merge_profile
  2319. .PHONY: gdbhooks
  2320. ##########################################################################
  2321. # Module dependencies
  2322. MODULE_CMATH_DEPS=$(srcdir)/Modules/_math.h
  2323. MODULE_MATH_DEPS=$(srcdir)/Modules/_math.h
  2324. MODULE_PYEXPAT_DEPS=$(LIBEXPAT_HEADERS) $(LIBEXPAT_A)
  2325. MODULE_UNICODEDATA_DEPS=$(srcdir)/Modules/unicodedata_db.h $(srcdir)/Modules/unicodename_db.h
  2326. MODULE__BLAKE2_DEPS=$(srcdir)/Modules/_blake2/impl/blake2-config.h $(srcdir)/Modules/_blake2/impl/blake2-impl.h $(srcdir)/Modules/_blake2/impl/blake2.h $(srcdir)/Modules/_blake2/impl/blake2b-load-sse2.h $(srcdir)/Modules/_blake2/impl/blake2b-load-sse41.h $(srcdir)/Modules/_blake2/impl/blake2b-ref.c $(srcdir)/Modules/_blake2/impl/blake2b-round.h $(srcdir)/Modules/_blake2/impl/blake2b.c $(srcdir)/Modules/_blake2/impl/blake2s-load-sse2.h $(srcdir)/Modules/_blake2/impl/blake2s-load-sse41.h $(srcdir)/Modules/_blake2/impl/blake2s-load-xop.h $(srcdir)/Modules/_blake2/impl/blake2s-ref.c $(srcdir)/Modules/_blake2/impl/blake2s-round.h $(srcdir)/Modules/_blake2/impl/blake2s.c $(srcdir)/Modules/_blake2/blake2module.h $(srcdir)/Modules/hashlib.h
  2327. MODULE__CTYPES_DEPS=$(srcdir)/Modules/_ctypes/ctypes.h
  2328. MODULE__DECIMAL_DEPS=$(srcdir)/Modules/_decimal/docstrings.h $(LIBMPDEC_HEADERS) $(LIBMPDEC_A)
  2329. MODULE__ELEMENTTREE_DEPS=$(srcdir)/Modules/pyexpat.c $(LIBEXPAT_HEADERS) $(LIBEXPAT_A)
  2330. MODULE__HASHLIB_DEPS=$(srcdir)/Modules/hashlib.h
  2331. MODULE__IO_DEPS=$(srcdir)/Modules/_io/_iomodule.h
  2332. MODULE__MD5_DEPS=$(srcdir)/Modules/hashlib.h
  2333. MODULE__SHA1_DEPS=$(srcdir)/Modules/hashlib.h
  2334. MODULE__SHA256_DEPS=$(srcdir)/Modules/hashlib.h
  2335. MODULE__SHA3_DEPS=$(srcdir)/Modules/_sha3/sha3.c $(srcdir)/Modules/_sha3/sha3.h $(srcdir)/Modules/hashlib.h
  2336. MODULE__SHA512_DEPS=$(srcdir)/Modules/hashlib.h
  2337. MODULE__SOCKET_DEPS=$(srcdir)/Modules/socketmodule.h $(srcdir)/Modules/addrinfo.h $(srcdir)/Modules/getaddrinfo.c $(srcdir)/Modules/getnameinfo.c
  2338. MODULE__SSL_DEPS=$(srcdir)/Modules/_ssl.h $(srcdir)/Modules/_ssl/cert.c $(srcdir)/Modules/_ssl/debughelpers.c $(srcdir)/Modules/_ssl/misc.c $(srcdir)/Modules/_ssl_data.h $(srcdir)/Modules/_ssl_data_111.h $(srcdir)/Modules/_ssl_data_300.h $(srcdir)/Modules/socketmodule.h
  2339. MODULE__TESTCAPI_DEPS=$(srcdir)/Modules/testcapi_long.h
  2340. MODULE__SQLITE3_DEPS=$(srcdir)/Modules/_sqlite/connection.h $(srcdir)/Modules/_sqlite/cursor.h $(srcdir)/Modules/_sqlite/microprotocols.h $(srcdir)/Modules/_sqlite/module.h $(srcdir)/Modules/_sqlite/prepare_protocol.h $(srcdir)/Modules/_sqlite/row.h $(srcdir)/Modules/_sqlite/util.h
  2341. # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
  2342. # Local Variables:
  2343. # mode: makefile
  2344. # End:
  2345. # Rules appended by makesetup
  2346. Modules/atexitmodule.o: $(srcdir)/Modules/atexitmodule.c $(MODULE_ATEXIT_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE_ATEXIT_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/atexitmodule.c -o Modules/atexitmodule.o
  2347. Modules/atexit$(EXT_SUFFIX): Modules/atexitmodule.o; $(BLDSHARED) Modules/atexitmodule.o $(MODULE_ATEXIT_LDFLAGS) -o Modules/atexit$(EXT_SUFFIX)
  2348. Modules/faulthandler.o: $(srcdir)/Modules/faulthandler.c $(MODULE_FAULTHANDLER_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE_FAULTHANDLER_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/faulthandler.c -o Modules/faulthandler.o
  2349. Modules/faulthandler$(EXT_SUFFIX): Modules/faulthandler.o; $(BLDSHARED) Modules/faulthandler.o $(MODULE_FAULTHANDLER_LDFLAGS) -o Modules/faulthandler$(EXT_SUFFIX)
  2350. Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c $(MODULE_POSIX_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE_POSIX_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/posixmodule.c -o Modules/posixmodule.o
  2351. Modules/posix$(EXT_SUFFIX): Modules/posixmodule.o; $(BLDSHARED) Modules/posixmodule.o $(MODULE_POSIX_LDFLAGS) -o Modules/posix$(EXT_SUFFIX)
  2352. Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c $(MODULE__SIGNAL_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__SIGNAL_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/signalmodule.c -o Modules/signalmodule.o
  2353. Modules/_signal$(EXT_SUFFIX): Modules/signalmodule.o; $(BLDSHARED) Modules/signalmodule.o $(MODULE__SIGNAL_LDFLAGS) -o Modules/_signal$(EXT_SUFFIX)
  2354. Modules/_tracemalloc.o: $(srcdir)/Modules/_tracemalloc.c $(MODULE__TRACEMALLOC_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__TRACEMALLOC_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_tracemalloc.c -o Modules/_tracemalloc.o
  2355. Modules/_tracemalloc$(EXT_SUFFIX): Modules/_tracemalloc.o; $(BLDSHARED) Modules/_tracemalloc.o $(MODULE__TRACEMALLOC_LDFLAGS) -o Modules/_tracemalloc$(EXT_SUFFIX)
  2356. Modules/_codecsmodule.o: $(srcdir)/Modules/_codecsmodule.c $(MODULE__CODECS_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__CODECS_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_codecsmodule.c -o Modules/_codecsmodule.o
  2357. Modules/_codecs$(EXT_SUFFIX): Modules/_codecsmodule.o; $(BLDSHARED) Modules/_codecsmodule.o $(MODULE__CODECS_LDFLAGS) -o Modules/_codecs$(EXT_SUFFIX)
  2358. Modules/_collectionsmodule.o: $(srcdir)/Modules/_collectionsmodule.c $(MODULE__COLLECTIONS_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__COLLECTIONS_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_collectionsmodule.c -o Modules/_collectionsmodule.o
  2359. Modules/_collections$(EXT_SUFFIX): Modules/_collectionsmodule.o; $(BLDSHARED) Modules/_collectionsmodule.o $(MODULE__COLLECTIONS_LDFLAGS) -o Modules/_collections$(EXT_SUFFIX)
  2360. Modules/errnomodule.o: $(srcdir)/Modules/errnomodule.c $(MODULE_ERRNO_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE_ERRNO_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/errnomodule.c -o Modules/errnomodule.o
  2361. Modules/errno$(EXT_SUFFIX): Modules/errnomodule.o; $(BLDSHARED) Modules/errnomodule.o $(MODULE_ERRNO_LDFLAGS) -o Modules/errno$(EXT_SUFFIX)
  2362. Modules/_io/_iomodule.o: $(srcdir)/Modules/_io/_iomodule.c $(MODULE__IO_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__IO_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_io/_iomodule.c -o Modules/_io/_iomodule.o
  2363. Modules/_io/iobase.o: $(srcdir)/Modules/_io/iobase.c $(MODULE__IO_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__IO_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_io/iobase.c -o Modules/_io/iobase.o
  2364. Modules/_io/fileio.o: $(srcdir)/Modules/_io/fileio.c $(MODULE__IO_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__IO_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_io/fileio.c -o Modules/_io/fileio.o
  2365. Modules/_io/bytesio.o: $(srcdir)/Modules/_io/bytesio.c $(MODULE__IO_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__IO_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_io/bytesio.c -o Modules/_io/bytesio.o
  2366. Modules/_io/bufferedio.o: $(srcdir)/Modules/_io/bufferedio.c $(MODULE__IO_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__IO_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_io/bufferedio.c -o Modules/_io/bufferedio.o
  2367. Modules/_io/textio.o: $(srcdir)/Modules/_io/textio.c $(MODULE__IO_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__IO_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_io/textio.c -o Modules/_io/textio.o
  2368. Modules/_io/stringio.o: $(srcdir)/Modules/_io/stringio.c $(MODULE__IO_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__IO_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_io/stringio.c -o Modules/_io/stringio.o
  2369. Modules/_io$(EXT_SUFFIX): Modules/_io/_iomodule.o Modules/_io/iobase.o Modules/_io/fileio.o Modules/_io/bytesio.o Modules/_io/bufferedio.o Modules/_io/textio.o Modules/_io/stringio.o; $(BLDSHARED) Modules/_io/_iomodule.o Modules/_io/iobase.o Modules/_io/fileio.o Modules/_io/bytesio.o Modules/_io/bufferedio.o Modules/_io/textio.o Modules/_io/stringio.o $(MODULE__IO_LDFLAGS) -o Modules/_io$(EXT_SUFFIX)
  2370. Modules/itertoolsmodule.o: $(srcdir)/Modules/itertoolsmodule.c $(MODULE_ITERTOOLS_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE_ITERTOOLS_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/itertoolsmodule.c -o Modules/itertoolsmodule.o
  2371. Modules/itertools$(EXT_SUFFIX): Modules/itertoolsmodule.o; $(BLDSHARED) Modules/itertoolsmodule.o $(MODULE_ITERTOOLS_LDFLAGS) -o Modules/itertools$(EXT_SUFFIX)
  2372. Modules/_sre/sre.o: $(srcdir)/Modules/_sre/sre.c $(MODULE__SRE_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__SRE_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_sre/sre.c -o Modules/_sre/sre.o
  2373. Modules/_sre$(EXT_SUFFIX): Modules/_sre/sre.o; $(BLDSHARED) Modules/_sre/sre.o $(MODULE__SRE_LDFLAGS) -o Modules/_sre$(EXT_SUFFIX)
  2374. Modules/_threadmodule.o: $(srcdir)/Modules/_threadmodule.c $(MODULE__THREAD_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__THREAD_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_threadmodule.c -o Modules/_threadmodule.o
  2375. Modules/_thread$(EXT_SUFFIX): Modules/_threadmodule.o; $(BLDSHARED) Modules/_threadmodule.o $(MODULE__THREAD_LDFLAGS) -o Modules/_thread$(EXT_SUFFIX)
  2376. Modules/timemodule.o: $(srcdir)/Modules/timemodule.c $(MODULE_TIME_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE_TIME_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/timemodule.c -o Modules/timemodule.o
  2377. Modules/time$(EXT_SUFFIX): Modules/timemodule.o; $(BLDSHARED) Modules/timemodule.o $(MODULE_TIME_LDFLAGS) -o Modules/time$(EXT_SUFFIX)
  2378. Modules/_weakref.o: $(srcdir)/Modules/_weakref.c $(MODULE__WEAKREF_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__WEAKREF_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_weakref.c -o Modules/_weakref.o
  2379. Modules/_weakref$(EXT_SUFFIX): Modules/_weakref.o; $(BLDSHARED) Modules/_weakref.o $(MODULE__WEAKREF_LDFLAGS) -o Modules/_weakref$(EXT_SUFFIX)
  2380. Modules/_abc.o: $(srcdir)/Modules/_abc.c $(MODULE__ABC_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__ABC_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_abc.c -o Modules/_abc.o
  2381. Modules/_abc$(EXT_SUFFIX): Modules/_abc.o; $(BLDSHARED) Modules/_abc.o $(MODULE__ABC_LDFLAGS) -o Modules/_abc$(EXT_SUFFIX)
  2382. Modules/_functoolsmodule.o: $(srcdir)/Modules/_functoolsmodule.c $(MODULE__FUNCTOOLS_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__FUNCTOOLS_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_functoolsmodule.c -o Modules/_functoolsmodule.o
  2383. Modules/_functools$(EXT_SUFFIX): Modules/_functoolsmodule.o; $(BLDSHARED) Modules/_functoolsmodule.o $(MODULE__FUNCTOOLS_LDFLAGS) -o Modules/_functools$(EXT_SUFFIX)
  2384. Modules/_localemodule.o: $(srcdir)/Modules/_localemodule.c $(MODULE__LOCALE_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__LOCALE_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_localemodule.c -o Modules/_localemodule.o
  2385. Modules/_locale$(EXT_SUFFIX): Modules/_localemodule.o; $(BLDSHARED) Modules/_localemodule.o $(MODULE__LOCALE_LDFLAGS) -o Modules/_locale$(EXT_SUFFIX)
  2386. Modules/_operator.o: $(srcdir)/Modules/_operator.c $(MODULE__OPERATOR_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__OPERATOR_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_operator.c -o Modules/_operator.o
  2387. Modules/_operator$(EXT_SUFFIX): Modules/_operator.o; $(BLDSHARED) Modules/_operator.o $(MODULE__OPERATOR_LDFLAGS) -o Modules/_operator$(EXT_SUFFIX)
  2388. Modules/_stat.o: $(srcdir)/Modules/_stat.c $(MODULE__STAT_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__STAT_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/_stat.c -o Modules/_stat.o
  2389. Modules/_stat$(EXT_SUFFIX): Modules/_stat.o; $(BLDSHARED) Modules/_stat.o $(MODULE__STAT_LDFLAGS) -o Modules/_stat$(EXT_SUFFIX)
  2390. Modules/symtablemodule.o: $(srcdir)/Modules/symtablemodule.c $(MODULE__SYMTABLE_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE__SYMTABLE_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/symtablemodule.c -o Modules/symtablemodule.o
  2391. Modules/_symtable$(EXT_SUFFIX): Modules/symtablemodule.o; $(BLDSHARED) Modules/symtablemodule.o $(MODULE__SYMTABLE_LDFLAGS) -o Modules/_symtable$(EXT_SUFFIX)
  2392. Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(MODULE_PWD_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE_PWD_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/pwdmodule.c -o Modules/pwdmodule.o
  2393. Modules/pwd$(EXT_SUFFIX): Modules/pwdmodule.o; $(BLDSHARED) Modules/pwdmodule.o $(MODULE_PWD_LDFLAGS) -o Modules/pwd$(EXT_SUFFIX)
  2394. Modules/xxsubtype.o: $(srcdir)/Modules/xxsubtype.c $(MODULE_XXSUBTYPE_DEPS) $(PYTHON_HEADERS) Modules/config.c; $(CC) $(MODULE_XXSUBTYPE_CFLAGS) $(PY_BUILTIN_MODULE_CFLAGS) -c $(srcdir)/Modules/xxsubtype.c -o Modules/xxsubtype.o
  2395. Modules/xxsubtype$(EXT_SUFFIX): Modules/xxsubtype.o; $(BLDSHARED) Modules/xxsubtype.o $(MODULE_XXSUBTYPE_LDFLAGS) -o Modules/xxsubtype$(EXT_SUFFIX)