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

Delta Between Two Patch Sets: Makefile.pre.in

Issue 16235: Add python-config.sh for use during cross compilation.
Left Patch Set: Created 7 years ago
Right Patch Set: Created 6 years, 9 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 | « configure.ac ('k') | Misc/python-config.sh.in » ('j') | 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
11 # make test 11 # make test
12 # make install 12 # make install
13 # 13 #
14 # If you have a previous version of Python installed that you don't 14 # If you have a previous version of Python installed that you don't
15 # want to overwrite, you can use "make altinstall" instead of "make 15 # want to overwrite, you can use "make altinstall" instead of "make
16 # install". Refer to the "Installing" section in the README file for 16 # install". Refer to the "Installing" section in the README file for
17 # additional details. 17 # additional details.
18 # 18 #
19 # See also the section "Build instructions" in the README file. 19 # See also the section "Build instructions" in the README file.
20 20
21 # === Variables set by makesetup === 21 # === Variables set by makesetup ===
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@
31 abs_builddir= @abs_builddir@
32
30 33
31 CC= @CC@ 34 CC= @CC@
32 CXX= @CXX@ 35 CXX= @CXX@
33 MAINCC= @MAINCC@ 36 MAINCC= @MAINCC@
34 LINKCC= @LINKCC@ 37 LINKCC= @LINKCC@
35 AR= @AR@ 38 AR= @AR@
36 RANLIB= @RANLIB@ 39 RANLIB= @RANLIB@
37 READELF= @READELF@ 40 READELF= @READELF@
38 SOABI= @SOABI@ 41 SOABI= @SOABI@
39 LDVERSION= @LDVERSION@ 42 LDVERSION= @LDVERSION@
(...skipping 19 matching lines...) Expand all
59 # Also, making them read-only seems to be a good idea... 62 # Also, making them read-only seems to be a good idea...
60 INSTALL_SHARED= ${INSTALL} -m 555 63 INSTALL_SHARED= ${INSTALL} -m 555
61 64
62 MKDIR_P= @MKDIR_P@ 65 MKDIR_P= @MKDIR_P@
63 66
64 MAKESETUP= $(srcdir)/Modules/makesetup 67 MAKESETUP= $(srcdir)/Modules/makesetup
65 68
66 # Compiler options 69 # Compiler options
67 OPT= @OPT@ 70 OPT= @OPT@
68 BASECFLAGS= @BASECFLAGS@ 71 BASECFLAGS= @BASECFLAGS@
72 BASECPPFLAGS= @BASECPPFLAGS@
69 CONFIGURE_CFLAGS= @CFLAGS@ 73 CONFIGURE_CFLAGS= @CFLAGS@
70 CONFIGURE_CPPFLAGS= @CPPFLAGS@ 74 CONFIGURE_CPPFLAGS= @CPPFLAGS@
71 CONFIGURE_LDFLAGS= @LDFLAGS@ 75 CONFIGURE_LDFLAGS= @LDFLAGS@
72 # Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the 76 # Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the
73 # command line to append to these values without stomping the pre-set 77 # command line to append to these values without stomping the pre-set
74 # values. 78 # values.
75 PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAG S) 79 PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAG S)
76 # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to 80 # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
77 # be able to build extension modules using the directories specified in the 81 # be able to build extension modules using the directories specified in the
78 # environment variables 82 # environment variables
79 PY_CPPFLAGS=» -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS) 83 PY_CPPFLAGS=» $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CONFIGURE_CP PFLAGS) $(CPPFLAGS)
80 PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS) 84 PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS)
81 NO_AS_NEEDED= @NO_AS_NEEDED@ 85 NO_AS_NEEDED= @NO_AS_NEEDED@
82 LDLAST= @LDLAST@ 86 LDLAST= @LDLAST@
83 SGI_ABI= @SGI_ABI@ 87 SGI_ABI= @SGI_ABI@
84 CCSHARED= @CCSHARED@ 88 CCSHARED= @CCSHARED@
85 LINKFORSHARED= @LINKFORSHARED@ 89 LINKFORSHARED= @LINKFORSHARED@
86 ARFLAGS= @ARFLAGS@ 90 ARFLAGS= @ARFLAGS@
87 # Extra C flags added for building the interpreter object files. 91 # Extra C flags added for building the interpreter object files.
88 CFLAGSFORSHARED=@CFLAGSFORSHARED@ 92 CFLAGSFORSHARED=@CFLAGSFORSHARED@
89 # C flags used for building the interpreter object files 93 # C flags used for building the interpreter object files
90 PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE 94 PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
91 95
92 96
93 # Machine-dependent subdirectories 97 # Machine-dependent subdirectories
94 MACHDEP= @MACHDEP@ 98 MACHDEP= @MACHDEP@
95 99
100 # Multiarch directory (may be empty)
101 MULTIARCH= @MULTIARCH@
102
96 # Install prefix for architecture-independent files 103 # Install prefix for architecture-independent files
97 prefix= @prefix@ 104 prefix= @prefix@
98 105
99 # Install prefix for architecture-dependent files 106 # Install prefix for architecture-dependent files
100 exec_prefix= @exec_prefix@ 107 exec_prefix= @exec_prefix@
101 108
102 # Install prefix for data files 109 # Install prefix for data files
103 datarootdir= @datarootdir@ 110 datarootdir= @datarootdir@
104 111
105 # Expanded directories 112 # Expanded directories
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 DYNLOADFILE= @DYNLOADFILE@ 196 DYNLOADFILE= @DYNLOADFILE@
190 MACHDEP_OBJS= @MACHDEP_OBJS@ 197 MACHDEP_OBJS= @MACHDEP_OBJS@
191 LIBOBJDIR= Python/ 198 LIBOBJDIR= Python/
192 LIBOBJS= @LIBOBJS@ 199 LIBOBJS= @LIBOBJS@
193 200
194 PYTHON= python$(EXE) 201 PYTHON= python$(EXE)
195 BUILDPYTHON= python$(BUILDEXE) 202 BUILDPYTHON= python$(BUILDEXE)
196 203
197 PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@ 204 PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
198 _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@ 205 _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
199 HOST_GNU_TYPE= @host@ 206 BUILD_GNU_TYPE=»@build@
207 HOST_GNU_TYPE=» @host@
200 208
201 # The task to run while instrument when building the profile-opt target 209 # The task to run while instrument when building the profile-opt target
202 PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syschec k 210 PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syschec k
203 #PROFILE_TASK= $(srcdir)/Lib/test/regrtest.py 211 #PROFILE_TASK= $(srcdir)/Lib/test/regrtest.py
204 212
205 # === Definitions added by makesetup === 213 # === Definitions added by makesetup ===
206 214
207 215
208 ########################################################################## 216 ##########################################################################
209 # Modules 217 # Modules
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 ########################################################################## 305 ##########################################################################
298 # AST 306 # AST
299 AST_H_DIR= Include 307 AST_H_DIR= Include
300 AST_H= $(AST_H_DIR)/Python-ast.h 308 AST_H= $(AST_H_DIR)/Python-ast.h
301 AST_C_DIR= Python 309 AST_C_DIR= Python
302 AST_C= $(AST_C_DIR)/Python-ast.c 310 AST_C= $(AST_C_DIR)/Python-ast.c
303 AST_ASDL= $(srcdir)/Parser/Python.asdl 311 AST_ASDL= $(srcdir)/Parser/Python.asdl
304 312
305 ASDLGEN_FILES= $(srcdir)/Parser/asdl.py $(srcdir)/Parser/asdl_c.py 313 ASDLGEN_FILES= $(srcdir)/Parser/asdl.py $(srcdir)/Parser/asdl_c.py
306 # XXX Note that a build now requires Python exist before the build starts 314 # XXX Note that a build now requires Python exist before the build starts
307 ASDLGEN=» @DISABLE_ASDLGEN@ $(srcdir)/Parser/asdl_c.py 315 ASDLGEN=» @ASDLGEN@ $(srcdir)/Parser/asdl_c.py
308 316
309 ########################################################################## 317 ##########################################################################
310 # Python 318 # Python
311 319
312 OPCODETARGETS_H= \ 320 OPCODETARGETS_H= \
313 » » $(srcdir)/Python/opcode_targets.h 321 » » Python/opcode_targets.h
314 322
315 OPCODETARGETGEN= \ 323 OPCODETARGETGEN= \
316 $(srcdir)/Python/makeopcodetargets.py 324 $(srcdir)/Python/makeopcodetargets.py
317 325
318 OPCODETARGETGEN_FILES= \ 326 OPCODETARGETGEN_FILES= \
319 $(OPCODETARGETGEN) $(srcdir)/Lib/opcode.py 327 $(OPCODETARGETGEN) $(srcdir)/Lib/opcode.py
320 328
321 PYTHON_OBJS= \ 329 PYTHON_OBJS= \
322 Python/_warnings.o \ 330 Python/_warnings.o \
323 Python/Python-ast.o \ 331 Python/Python-ast.o \
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 Objects/rangeobject.o \ 411 Objects/rangeobject.o \
404 Objects/setobject.o \ 412 Objects/setobject.o \
405 Objects/sliceobject.o \ 413 Objects/sliceobject.o \
406 Objects/structseq.o \ 414 Objects/structseq.o \
407 Objects/tupleobject.o \ 415 Objects/tupleobject.o \
408 Objects/typeobject.o \ 416 Objects/typeobject.o \
409 Objects/unicodeobject.o \ 417 Objects/unicodeobject.o \
410 Objects/unicodectype.o \ 418 Objects/unicodectype.o \
411 Objects/weakrefobject.o 419 Objects/weakrefobject.o
412 420
413 SYSCONFIGDATA=$(srcdir)/Lib/_sysconfigdata.py
414
415 ########################################################################## 421 ##########################################################################
416 # objects that get linked into the Python library 422 # objects that get linked into the Python library
417 LIBRARY_OBJS_OMIT_FROZEN= \ 423 LIBRARY_OBJS_OMIT_FROZEN= \
418 Modules/getbuildinfo.o \ 424 Modules/getbuildinfo.o \
419 $(PARSER_OBJS) \ 425 $(PARSER_OBJS) \
420 $(OBJECT_OBJS) \ 426 $(OBJECT_OBJS) \
421 $(PYTHON_OBJS) \ 427 $(PYTHON_OBJS) \
422 $(MODULE_OBJS) \ 428 $(MODULE_OBJS) \
423 $(SIGNAL_OBJS) \ 429 $(SIGNAL_OBJS) \
424 $(MODOBJS) 430 $(MODOBJS)
425 431
426 LIBRARY_OBJS= \ 432 LIBRARY_OBJS= \
427 $(LIBRARY_OBJS_OMIT_FROZEN) \ 433 $(LIBRARY_OBJS_OMIT_FROZEN) \
428 Python/frozen.o 434 Python/frozen.o
429 435
430 ######################################################################### 436 #########################################################################
431 # Rules 437 # Rules
432 438
433 # Default target 439 # Default target
434 all: build_all 440 all: build_all
435 build_all:» $(BUILDPYTHON) $(SYSCONFIGDATA) oldsharedmods sharedmods gdbhook s Modules/_testembed 441 build_all:» $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testem bed python-config
436 442
437 # Compile a binary with gcc profile guided optimization. 443 # Compile a binary with gcc profile guided optimization.
438 profile-opt: 444 profile-opt:
439 @echo "Building with support for profile generation:" 445 @echo "Building with support for profile generation:"
440 $(MAKE) clean 446 $(MAKE) clean
441 $(MAKE) build_all_generate_profile 447 $(MAKE) build_all_generate_profile
442 @echo "Running benchmark to generate profile data:" 448 @echo "Running benchmark to generate profile data:"
443 $(MAKE) profile-removal 449 $(MAKE) profile-removal
444 $(MAKE) run_profile_task 450 $(MAKE) run_profile_task
445 @echo "Rebuilding with profile guided optimizations:" 451 @echo "Rebuilding with profile guided optimizations:"
(...skipping 13 matching lines...) Expand all
459 coverage: 465 coverage:
460 @echo "Building with support for coverage checking:" 466 @echo "Building with support for coverage checking:"
461 $(MAKE) clean 467 $(MAKE) clean
462 $(MAKE) all CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LI BS="$(LIBS) -lgcov" 468 $(MAKE) all CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LI BS="$(LIBS) -lgcov"
463 469
464 470
465 # Build the interpreter 471 # Build the interpreter
466 $(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) 472 $(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
467 $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIB RARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) 473 $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIB RARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
468 474
469 platform: $(BUILDPYTHON) $(SYSCONFIGDATA) 475 platform: $(BUILDPYTHON) pybuilddir.txt
470 $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform 476 $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
471 477
472 # Generate the sysconfig build-time data 478 # Create build directory and generate the sysconfig build-time data there.
473 $(SYSCONFIGDATA): $(BUILDPYTHON) 479 # pybuilddir.txt contains the name of the build dir and is used for
480 # sys.path fixup -- see Modules/getpath.c.
481 pybuilddir.txt: $(BUILDPYTHON)
474 $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars 482 $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars
475 483
476 # Build the shared modules 484 # Build the shared modules
477 # MAKEFLAGS are sorted and normalized. Under GNU make the 's' for 485 # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
478 # -s, --silent or --quiet is always the first char. 486 # -s, --silent or --quiet is always the first char.
479 sharedmods: $(BUILDPYTHON) $(SYSCONFIGDATA) 487 # Under BSD make, MAKEFLAGS might be " -s -v x=y".
488 sharedmods: $(BUILDPYTHON) pybuilddir.txt
480 @case "$$MAKEFLAGS" in \ 489 @case "$$MAKEFLAGS" in \
481 » s*) quiet="-q";; \ 490 » *\ -s*|s*) quiet="-q";; \
482 *) quiet="";; \ 491 *) quiet="";; \
483 esac; \ 492 esac; \
484 $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ 493 $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
485 $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build 494 $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
486 495
487 # Build static library 496 # Build static library
488 # avoid long command lines, same as LIBRARY_OBJS 497 # avoid long command lines, same as LIBRARY_OBJS
489 $(LIBRARY): $(LIBRARY_OBJS) 498 $(LIBRARY): $(LIBRARY_OBJS)
490 -rm -f $@ 499 -rm -f $@
491 $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o 500 $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h 727 Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h
719 728
720 $(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES) 729 $(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
721 $(OPCODETARGETGEN) $(OPCODETARGETS_H) 730 $(OPCODETARGETGEN) $(OPCODETARGETS_H)
722 731
723 Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h 732 Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h
724 733
725 Python/formatter_unicode.o: $(srcdir)/Python/formatter_unicode.c \ 734 Python/formatter_unicode.o: $(srcdir)/Python/formatter_unicode.c \
726 $(BYTESTR_DEPS) 735 $(BYTESTR_DEPS)
727 736
728 Python/frozen.o: $(srcdir)/Python/importlib.h 737 Python/frozen.o: Python/importlib.h
729 738
730 Objects/typeobject.o: $(srcdir)/Objects/typeslots.inc 739 Objects/typeobject.o: Objects/typeslots.inc
731 $(srcdir)/Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects /typeslots.py 740 Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots .py
732 » $(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > $(srcdir)/Objects/typeslots.inc 741 » $(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > Objects/typeslots.inc
733 742
734 ############################################################################ 743 ############################################################################
735 # Header files 744 # Header files
736 745
737 PYTHON_HEADERS= \ 746 PYTHON_HEADERS= \
738 $(srcdir)/Include/Python.h \ 747 $(srcdir)/Include/Python.h \
739 $(srcdir)/Include/abstract.h \ 748 $(srcdir)/Include/abstract.h \
740 $(srcdir)/Include/accu.h \ 749 $(srcdir)/Include/accu.h \
741 $(srcdir)/Include/asdl.h \ 750 $(srcdir)/Include/asdl.h \
742 $(srcdir)/Include/ast.h \ 751 $(srcdir)/Include/ast.h \
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 do \ 1045 do \
1037 a=$(srcdir)/Lib/$$d; \ 1046 a=$(srcdir)/Lib/$$d; \
1038 if test ! -d $$a; then continue; else true; fi; \ 1047 if test ! -d $$a; then continue; else true; fi; \
1039 b=$(LIBDEST)/$$d; \ 1048 b=$(LIBDEST)/$$d; \
1040 if test ! -d $(DESTDIR)$$b; then \ 1049 if test ! -d $(DESTDIR)$$b; then \
1041 echo "Creating directory $$b"; \ 1050 echo "Creating directory $$b"; \
1042 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \ 1051 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \
1043 else true; \ 1052 else true; \
1044 fi; \ 1053 fi; \
1045 done 1054 done
1046 » @for i in $(srcdir)/Lib/*.py ; \ 1055 » @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py; \
1047 do \ 1056 do \
1048 if test -x $$i; then \ 1057 if test -x $$i; then \
1049 $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \ 1058 $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
1050 echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \ 1059 echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \
1051 else \ 1060 else \
1052 $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \ 1061 $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
1053 echo $(INSTALL_DATA) $$i $(LIBDEST); \ 1062 echo $(INSTALL_DATA) $$i $(LIBDEST); \
1054 fi; \ 1063 fi; \
1055 done 1064 done
1056 @for d in $(LIBSUBDIRS); \ 1065 @for d in $(LIBSUBDIRS); \
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST) /lib2to3/PatternGrammar.txt 1116 $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST) /lib2to3/PatternGrammar.txt
1108 1117
1109 # Create the PLATDIR source directory, if one wasn't distributed.. 1118 # Create the PLATDIR source directory, if one wasn't distributed..
1110 $(srcdir)/Lib/$(PLATDIR): 1119 $(srcdir)/Lib/$(PLATDIR):
1111 mkdir $(srcdir)/Lib/$(PLATDIR) 1120 mkdir $(srcdir)/Lib/$(PLATDIR)
1112 cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen 1121 cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
1113 export PATH; PATH="`pwd`:$$PATH"; \ 1122 export PATH; PATH="`pwd`:$$PATH"; \
1114 export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \ 1123 export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
1115 export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \ 1124 export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
1116 export EXE; EXE="$(BUILDEXE)"; \ 1125 export EXE; EXE="$(BUILDEXE)"; \
1126 if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
1127 export PYTHON_FOR_BUILD; \
1128 if [ "$(BUILD_GNU_TYPE)" = "$(HOST_GNU_TYPE)" ]; then \
1129 PYTHON_FOR_BUILD="$(BUILDPYTHON)"; \
1130 else \
1131 PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \
1132 fi; \
1117 cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen 1133 cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
1118 1134
1119 python-config: $(srcdir)/Misc/python-config.in 1135 python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
1120 # Substitution happens here, as the completely-expanded BINDIR 1136 # Substitution happens here, as the completely-expanded BINDIR
1121 # is not available in configure 1137 # is not available in configure
1122 » sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Mis c/python-config.in >python-config 1138 » sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," $(srcdir)/Misc/ python-config.in >python-config.py
1123 # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} 1139 # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}
1124 » sed -e "s,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g" < Misc/python-config.sh >p ython-config.sh 1140 » sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' Misc/python-config.sh >pyt hon-config
1125 1141
1126 # Install the include files 1142 # Install the include files
1127 INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY) 1143 INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
1128 inclinstall: 1144 inclinstall:
1129 @for i in $(INCLDIRSTOMAKE); \ 1145 @for i in $(INCLDIRSTOMAKE); \
1130 do \ 1146 do \
1131 if test ! -d $(DESTDIR)$$i; then \ 1147 if test ! -d $(DESTDIR)$$i; then \
1132 echo "Creating directory $$i"; \ 1148 echo "Creating directory $$i"; \
1133 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ 1149 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
1134 else true; \ 1150 else true; \
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c 1188 $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
1173 $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o 1189 $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
1174 $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config. c.in 1190 $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config. c.in
1175 $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile 1191 $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
1176 $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup 1192 $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
1177 $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local 1193 $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
1178 $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config 1194 $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
1179 $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc 1195 $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
1180 $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makeset up 1196 $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makeset up
1181 $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh 1197 $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
1198 $(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
1182 $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-c onfig 1199 $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-c onfig
1183 $(INSTALL_SCRIPT) python-config.sh $(DESTDIR)$(BINDIR)/python-config.sh
1184 rm python-config
1185 @if [ -s Modules/python.exp -a \ 1200 @if [ -s Modules/python.exp -a \
1186 "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \ 1201 "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
1187 echo; echo "Installing support files for building shared extensi on modules on AIX:"; \ 1202 echo; echo "Installing support files for building shared extensi on modules on AIX:"; \
1188 $(INSTALL_DATA) Modules/python.exp \ 1203 $(INSTALL_DATA) Modules/python.exp \
1189 $(DESTDIR)$(LIBPL)/python.exp; \ 1204 $(DESTDIR)$(LIBPL)/python.exp; \
1190 echo; echo "$(LIBPL)/python.exp"; \ 1205 echo; echo "$(LIBPL)/python.exp"; \
1191 $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \ 1206 $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \
1192 $(DESTDIR)$(LIBPL)/makexp_aix; \ 1207 $(DESTDIR)$(LIBPL)/makexp_aix; \
1193 echo "$(LIBPL)/makexp_aix"; \ 1208 echo "$(LIBPL)/makexp_aix"; \
1194 $(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix \ 1209 $(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix \
1195 $(DESTDIR)$(LIBPL)/ld_so_aix; \ 1210 $(DESTDIR)$(LIBPL)/ld_so_aix; \
1196 echo "$(LIBPL)/ld_so_aix"; \ 1211 echo "$(LIBPL)/ld_so_aix"; \
1197 echo; echo "See Misc/AIX-NOTES for details."; \ 1212 echo; echo "See Misc/AIX-NOTES for details."; \
1198 else true; \ 1213 else true; \
1199 fi 1214 fi
1200 1215
1201 # Install the dynamically loadable modules 1216 # Install the dynamically loadable modules
1202 # This goes into $(exec_prefix) 1217 # This goes into $(exec_prefix)
1203 sharedinstall: sharedmods 1218 sharedinstall: sharedmods
1204 $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ 1219 $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
1205 --prefix=$(prefix) \ 1220 --prefix=$(prefix) \
1206 --install-scripts=$(BINDIR) \ 1221 --install-scripts=$(BINDIR) \
1207 --install-platlib=$(DESTSHARED) \ 1222 --install-platlib=$(DESTSHARED) \
1208 --root=$(DESTDIR)/ 1223 --root=$(DESTDIR)/
1224 -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py
1225 -rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
1209 1226
1210 # Here are a couple of targets for MacOSX again, to install a full 1227 # Here are a couple of targets for MacOSX again, to install a full
1211 # framework-based Python. frameworkinstall installs everything, the 1228 # framework-based Python. frameworkinstall installs everything, the
1212 # subtargets install specific parts. Much of the actual work is offloaded to 1229 # subtargets install specific parts. Much of the actual work is offloaded to
1213 # the Makefile in Mac 1230 # the Makefile in Mac
1214 # 1231 #
1215 # 1232 #
1216 # This target is here for backward compatiblity, previous versions of Python 1233 # This target is here for backward compatiblity, previous versions of Python
1217 # hadn't integrated framework installation in the normal install process. 1234 # hadn't integrated framework installation in the normal install process.
1218 frameworkinstall: install 1235 frameworkinstall: install
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 1361
1345 docclean: 1362 docclean:
1346 -rm -rf Doc/build 1363 -rm -rf Doc/build
1347 -rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils 1364 -rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils
1348 1365
1349 clean: pycremoval 1366 clean: pycremoval
1350 find . -name '*.[oa]' -exec rm -f {} ';' 1367 find . -name '*.[oa]' -exec rm -f {} ';'
1351 find . -name '*.s[ol]' -exec rm -f {} ';' 1368 find . -name '*.s[ol]' -exec rm -f {} ';'
1352 find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';' 1369 find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
1353 find build -name 'fficonfig.h' -exec rm -f {} ';' || true 1370 find build -name 'fficonfig.h' -exec rm -f {} ';' || true
1354 » find build -name 'fficonfig.py' -exec rm -f {} ';' || true 1371 » find build -name '*.py' -exec rm -f {} ';' || true
1372 » find build -name '*.py[co]' -exec rm -f {} ';' || true
1373 » -rm -f pybuilddir.txt
1355 -rm -f Lib/lib2to3/*Grammar*.pickle 1374 -rm -f Lib/lib2to3/*Grammar*.pickle
1356 -rm -f $(SYSCONFIGDATA)
1357 -rm -f Modules/_testembed Modules/_freeze_importlib 1375 -rm -f Modules/_testembed Modules/_freeze_importlib
1358 1376
1359 profile-removal: 1377 profile-removal:
1360 find . -name '*.gc??' -exec rm -f {} ';' 1378 find . -name '*.gc??' -exec rm -f {} ';'
1361 1379
1362 clobber: clean profile-removal 1380 clobber: clean profile-removal
1363 -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \ 1381 -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
1364 tags TAGS \ 1382 tags TAGS \
1365 config.cache config.log pyconfig.h Modules/config.c 1383 config.cache config.log pyconfig.h Modules/config.c
1366 -rm -rf build platform 1384 -rm -rf build platform
1367 -rm -rf $(PYTHONFRAMEWORKDIR) 1385 -rm -rf $(PYTHONFRAMEWORKDIR)
1386 -rm -f python-config.py python-config
1368 1387
1369 # Make things extra clean, before making a distribution: 1388 # Make things extra clean, before making a distribution:
1370 # remove all generated files, even Makefile[.pre] 1389 # remove all generated files, even Makefile[.pre]
1371 # Keep configure and Python-ast.[ch], it's possible they can't be generated 1390 # Keep configure and Python-ast.[ch], it's possible they can't be generated
1372 distclean: clobber 1391 distclean: clobber
1373 for file in Lib/test/data/* ; do \ 1392 for file in Lib/test/data/* ; do \
1374 if test "$$file" != "Lib/test/data/README"; then rm "$$file"; fi; \ 1393 if test "$$file" != "Lib/test/data/README"; then rm "$$file"; fi; \
1375 done 1394 done
1376 -rm -f core Makefile Makefile.pre config.status \ 1395 -rm -f core Makefile Makefile.pre config.status \
1377 Modules/Setup Modules/Setup.local Modules/Setup.config \ 1396 Modules/Setup Modules/Setup.local Modules/Setup.config \
1378 Modules/ld_so_aix Modules/python.exp Misc/python.pc 1397 Modules/ld_so_aix Modules/python.exp Misc/python.pc
1379 -rm -f python*-gdb.py 1398 -rm -f python*-gdb.py
1380 -rm -f pybuilddir.txt
1381 find $(srcdir) '(' -name '*.fdc' -o -name '*~' \ 1399 find $(srcdir) '(' -name '*.fdc' -o -name '*~' \
1382 -o -name '[@,#]*' -o -name '*.old' \ 1400 -o -name '[@,#]*' -o -name '*.old' \
1383 -o -name '*.orig' -o -name '*.rej' \ 1401 -o -name '*.orig' -o -name '*.rej' \
1384 -o -name '*.bak' ')' \ 1402 -o -name '*.bak' ')' \
1385 -exec rm -f {} ';' 1403 -exec rm -f {} ';'
1386 1404
1387 # Check for smelly exported symbols (not starting with Py/_Py) 1405 # Check for smelly exported symbols (not starting with Py/_Py)
1388 smelly: all 1406 smelly: all
1389 nm -p $(LIBRARY) | \ 1407 nm -p $(LIBRARY) | \
1390 sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \ 1408 sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure 1455 .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
1438 .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools 1456 .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
1439 .PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean 1457 .PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
1440 .PHONY: smelly funny patchcheck touch 1458 .PHONY: smelly funny patchcheck touch
1441 .PHONY: gdbhooks 1459 .PHONY: gdbhooks
1442 1460
1443 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY 1461 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
1444 # Local Variables: 1462 # Local Variables:
1445 # mode: makefile 1463 # mode: makefile
1446 # End: 1464 # End:
LEFTRIGHT

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