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

Delta Between Two Patch Sets: Makefile.pre.in

Issue 16235: Add python-config.sh for use during cross compilation.
Left Patch Set: Created 6 years, 10 months ago
Right Patch Set: Created 6 years, 8 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
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 ARFLAGS= @ARFLAGS@ 90 ARFLAGS= @ARFLAGS@
91 # Extra C flags added for building the interpreter object files. 91 # Extra C flags added for building the interpreter object files.
92 CFLAGSFORSHARED=@CFLAGSFORSHARED@ 92 CFLAGSFORSHARED=@CFLAGSFORSHARED@
93 # C flags used for building the interpreter object files 93 # C flags used for building the interpreter object files
94 PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE 94 PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
95 95
96 96
97 # Machine-dependent subdirectories 97 # Machine-dependent subdirectories
98 MACHDEP= @MACHDEP@ 98 MACHDEP= @MACHDEP@
99 99
100 # Multiarch directory (may be empty)
101 MULTIARCH= @MULTIARCH@
102
100 # Install prefix for architecture-independent files 103 # Install prefix for architecture-independent files
101 prefix= @prefix@ 104 prefix= @prefix@
102 105
103 # Install prefix for architecture-dependent files 106 # Install prefix for architecture-dependent files
104 exec_prefix= @exec_prefix@ 107 exec_prefix= @exec_prefix@
105 108
106 # Install prefix for data files 109 # Install prefix for data files
107 datarootdir= @datarootdir@ 110 datarootdir= @datarootdir@
108 111
109 # Expanded directories 112 # Expanded directories
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 DYNLOADFILE= @DYNLOADFILE@ 196 DYNLOADFILE= @DYNLOADFILE@
194 MACHDEP_OBJS= @MACHDEP_OBJS@ 197 MACHDEP_OBJS= @MACHDEP_OBJS@
195 LIBOBJDIR= Python/ 198 LIBOBJDIR= Python/
196 LIBOBJS= @LIBOBJS@ 199 LIBOBJS= @LIBOBJS@
197 200
198 PYTHON= python$(EXE) 201 PYTHON= python$(EXE)
199 BUILDPYTHON= python$(BUILDEXE) 202 BUILDPYTHON= python$(BUILDEXE)
200 203
201 PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@ 204 PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
202 _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@ 205 _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
203 HOST_GNU_TYPE= @host@ 206 BUILD_GNU_TYPE=»@build@
207 HOST_GNU_TYPE=» @host@
204 208
205 # 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
206 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
207 #PROFILE_TASK= $(srcdir)/Lib/test/regrtest.py 211 #PROFILE_TASK= $(srcdir)/Lib/test/regrtest.py
208 212
209 # === Definitions added by makesetup === 213 # === Definitions added by makesetup ===
210 214
211 215
212 ########################################################################## 216 ##########################################################################
213 # Modules 217 # Modules
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 431
428 LIBRARY_OBJS= \ 432 LIBRARY_OBJS= \
429 $(LIBRARY_OBJS_OMIT_FROZEN) \ 433 $(LIBRARY_OBJS_OMIT_FROZEN) \
430 Python/frozen.o 434 Python/frozen.o
431 435
432 ######################################################################### 436 #########################################################################
433 # Rules 437 # Rules
434 438
435 # Default target 439 # Default target
436 all: build_all 440 all: build_all
437 build_all:» $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testem bed 441 build_all:» $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testem bed python-config
438 442
439 # Compile a binary with gcc profile guided optimization. 443 # Compile a binary with gcc profile guided optimization.
440 profile-opt: 444 profile-opt:
441 @echo "Building with support for profile generation:" 445 @echo "Building with support for profile generation:"
442 $(MAKE) clean 446 $(MAKE) clean
443 $(MAKE) build_all_generate_profile 447 $(MAKE) build_all_generate_profile
444 @echo "Running benchmark to generate profile data:" 448 @echo "Running benchmark to generate profile data:"
445 $(MAKE) profile-removal 449 $(MAKE) profile-removal
446 $(MAKE) run_profile_task 450 $(MAKE) run_profile_task
447 @echo "Rebuilding with profile guided optimizations:" 451 @echo "Rebuilding with profile guided optimizations:"
(...skipping 23 matching lines...) Expand all
471 platform: $(BUILDPYTHON) pybuilddir.txt 475 platform: $(BUILDPYTHON) pybuilddir.txt
472 $(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
473 477
474 # Create build directory and generate the sysconfig build-time data there. 478 # Create build directory and generate the sysconfig build-time data there.
475 # pybuilddir.txt contains the name of the build dir and is used for 479 # pybuilddir.txt contains the name of the build dir and is used for
476 # sys.path fixup -- see Modules/getpath.c. 480 # sys.path fixup -- see Modules/getpath.c.
477 pybuilddir.txt: $(BUILDPYTHON) 481 pybuilddir.txt: $(BUILDPYTHON)
478 $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars 482 $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars
479 483
480 # Build the shared modules 484 # Build the shared modules
481 # MAKEFLAGS are sorted and normalized. Under GNU make the 's' for 485 # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
482 # -s, --silent or --quiet is always the first char. 486 # -s, --silent or --quiet is always the first char.
487 # Under BSD make, MAKEFLAGS might be " -s -v x=y".
483 sharedmods: $(BUILDPYTHON) pybuilddir.txt 488 sharedmods: $(BUILDPYTHON) pybuilddir.txt
484 @case "$$MAKEFLAGS" in \ 489 @case "$$MAKEFLAGS" in \
485 » s*) quiet="-q";; \ 490 » *\ -s*|s*) quiet="-q";; \
486 *) quiet="";; \ 491 *) quiet="";; \
487 esac; \ 492 esac; \
488 $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ 493 $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
489 $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build 494 $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
490 495
491 # Build static library 496 # Build static library
492 # avoid long command lines, same as LIBRARY_OBJS 497 # avoid long command lines, same as LIBRARY_OBJS
493 $(LIBRARY): $(LIBRARY_OBJS) 498 $(LIBRARY): $(LIBRARY_OBJS)
494 -rm -f $@ 499 -rm -f $@
495 $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o 500 $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 $(srcdir)/Objects/unicodetype_db.h 693 $(srcdir)/Objects/unicodetype_db.h
689 694
690 BYTESTR_DEPS = \ 695 BYTESTR_DEPS = \
691 $(srcdir)/Include/bytes_methods.h \ 696 $(srcdir)/Include/bytes_methods.h \
692 $(srcdir)/Objects/stringlib/count.h \ 697 $(srcdir)/Objects/stringlib/count.h \
693 $(srcdir)/Objects/stringlib/ctype.h \ 698 $(srcdir)/Objects/stringlib/ctype.h \
694 $(srcdir)/Objects/stringlib/eq.h \ 699 $(srcdir)/Objects/stringlib/eq.h \
695 $(srcdir)/Objects/stringlib/fastsearch.h \ 700 $(srcdir)/Objects/stringlib/fastsearch.h \
696 $(srcdir)/Objects/stringlib/find.h \ 701 $(srcdir)/Objects/stringlib/find.h \
697 $(srcdir)/Objects/stringlib/find_max_char.h \ 702 $(srcdir)/Objects/stringlib/find_max_char.h \
698 $(srcdir)/Objects/stringlib/join.h \
699 $(srcdir)/Objects/stringlib/partition.h \ 703 $(srcdir)/Objects/stringlib/partition.h \
700 $(srcdir)/Objects/stringlib/split.h \ 704 $(srcdir)/Objects/stringlib/split.h \
701 $(srcdir)/Objects/stringlib/stringdefs.h \ 705 $(srcdir)/Objects/stringlib/stringdefs.h \
702 $(srcdir)/Objects/stringlib/transmogrify.h \ 706 $(srcdir)/Objects/stringlib/transmogrify.h \
703 $(srcdir)/Objects/stringlib/unicodedefs.h \ 707 $(srcdir)/Objects/stringlib/unicodedefs.h \
704 $(srcdir)/Objects/stringlib/localeutil.h \ 708 $(srcdir)/Objects/stringlib/localeutil.h \
705 $(srcdir)/Objects/stringlib/undef.h 709 $(srcdir)/Objects/stringlib/undef.h
706 710
707 UNICODE_DEPS = $(BYTESTR_DEPS) \ 711 UNICODE_DEPS = $(BYTESTR_DEPS) \
708 $(srcdir)/Objects/stringlib/asciilib.h \ 712 $(srcdir)/Objects/stringlib/asciilib.h \
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 $(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
1113 1117
1114 # Create the PLATDIR source directory, if one wasn't distributed.. 1118 # Create the PLATDIR source directory, if one wasn't distributed..
1115 $(srcdir)/Lib/$(PLATDIR): 1119 $(srcdir)/Lib/$(PLATDIR):
1116 mkdir $(srcdir)/Lib/$(PLATDIR) 1120 mkdir $(srcdir)/Lib/$(PLATDIR)
1117 cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen 1121 cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
1118 export PATH; PATH="`pwd`:$$PATH"; \ 1122 export PATH; PATH="`pwd`:$$PATH"; \
1119 export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \ 1123 export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
1120 export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \ 1124 export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
1121 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; \
1122 cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen 1133 cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
1123 1134
1124 python-config: $(srcdir)/Misc/python-config.in 1135 python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
1125 # Substitution happens here, as the completely-expanded BINDIR 1136 # Substitution happens here, as the completely-expanded BINDIR
1126 # is not available in configure 1137 # is not available in configure
1127 » 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
1128 # 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}
1129 » 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
1130 1141
1131 # Install the include files 1142 # Install the include files
1132 INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY) 1143 INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
1133 inclinstall: 1144 inclinstall:
1134 @for i in $(INCLDIRSTOMAKE); \ 1145 @for i in $(INCLDIRSTOMAKE); \
1135 do \ 1146 do \
1136 if test ! -d $(DESTDIR)$$i; then \ 1147 if test ! -d $(DESTDIR)$$i; then \
1137 echo "Creating directory $$i"; \ 1148 echo "Creating directory $$i"; \
1138 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ 1149 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
1139 else true; \ 1150 else true; \
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c 1188 $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
1178 $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o 1189 $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
1179 $(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
1180 $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile 1191 $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
1181 $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup 1192 $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
1182 $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local 1193 $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
1183 $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config 1194 $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
1184 $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc 1195 $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
1185 $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makeset up 1196 $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makeset up
1186 $(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
1187 $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-c onfig 1199 $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-c onfig
1188 $(INSTALL_SCRIPT) python-config.sh $(DESTDIR)$(BINDIR)/python-config.sh
1189 rm python-config
1190 @if [ -s Modules/python.exp -a \ 1200 @if [ -s Modules/python.exp -a \
1191 "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \ 1201 "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
1192 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:"; \
1193 $(INSTALL_DATA) Modules/python.exp \ 1203 $(INSTALL_DATA) Modules/python.exp \
1194 $(DESTDIR)$(LIBPL)/python.exp; \ 1204 $(DESTDIR)$(LIBPL)/python.exp; \
1195 echo; echo "$(LIBPL)/python.exp"; \ 1205 echo; echo "$(LIBPL)/python.exp"; \
1196 $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \ 1206 $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \
1197 $(DESTDIR)$(LIBPL)/makexp_aix; \ 1207 $(DESTDIR)$(LIBPL)/makexp_aix; \
1198 echo "$(LIBPL)/makexp_aix"; \ 1208 echo "$(LIBPL)/makexp_aix"; \
1199 $(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix \ 1209 $(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix \
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 1376
1367 profile-removal: 1377 profile-removal:
1368 find . -name '*.gc??' -exec rm -f {} ';' 1378 find . -name '*.gc??' -exec rm -f {} ';'
1369 1379
1370 clobber: clean profile-removal 1380 clobber: clean profile-removal
1371 -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \ 1381 -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
1372 tags TAGS \ 1382 tags TAGS \
1373 config.cache config.log pyconfig.h Modules/config.c 1383 config.cache config.log pyconfig.h Modules/config.c
1374 -rm -rf build platform 1384 -rm -rf build platform
1375 -rm -rf $(PYTHONFRAMEWORKDIR) 1385 -rm -rf $(PYTHONFRAMEWORKDIR)
1386 -rm -f python-config.py python-config
1376 1387
1377 # Make things extra clean, before making a distribution: 1388 # Make things extra clean, before making a distribution:
1378 # remove all generated files, even Makefile[.pre] 1389 # remove all generated files, even Makefile[.pre]
1379 # 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
1380 distclean: clobber 1391 distclean: clobber
1381 for file in Lib/test/data/* ; do \ 1392 for file in Lib/test/data/* ; do \
1382 if test "$$file" != "Lib/test/data/README"; then rm "$$file"; fi; \ 1393 if test "$$file" != "Lib/test/data/README"; then rm "$$file"; fi; \
1383 done 1394 done
1384 -rm -f core Makefile Makefile.pre config.status \ 1395 -rm -f core Makefile Makefile.pre config.status \
1385 Modules/Setup Modules/Setup.local Modules/Setup.config \ 1396 Modules/Setup Modules/Setup.local Modules/Setup.config \
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure 1455 .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
1445 .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools 1456 .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
1446 .PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean 1457 .PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
1447 .PHONY: smelly funny patchcheck touch 1458 .PHONY: smelly funny patchcheck touch
1448 .PHONY: gdbhooks 1459 .PHONY: gdbhooks
1449 1460
1450 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY 1461 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
1451 # Local Variables: 1462 # Local Variables:
1452 # mode: makefile 1463 # mode: makefile
1453 # End: 1464 # End:
LEFTRIGHT

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