Makefile 63 KB

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