Makefile 68 KB

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