Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(142527)

Delta Between Two Patch Sets: Makefile.pre.in

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

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+