• Home
  • Raw
  • Download

Lines Matching +full:python +full:- +full:version

1 # Top-level Makefile for Python
14 # If you have a previous version of Python installed that you don't
29 VERSION= @VERSION@
63 # Use this to make a link between python$(VERSION) and python in $(BINDIR)
73 INSTALL_SHARED= ${INSTALL} -m 755
86 # once Python is installed (Issue #21121).
90 # once Python is installed (bpo-35257)
95 # command line to append to these values without stomping the pre-set
98 PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include/internal
102 PY_CPPFLAGS= $(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)
109 # the python executable -- this is only needed for a few systems
116 PY_BUILTIN_MODULE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN
117 PY_CORE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE
120 # Strict or non-strict aliasing flags used to compile dtoa.c, see above
124 # Machine-dependent subdirectories
131 # Install prefix for architecture-independent files
134 # Install prefix for architecture-dependent files
150 BINLIBDEST= $(LIBDIR)/python$(VERSION)
151 LIBDEST= $(SCRIPTDIR)/python$(VERSION)
152 INCLUDEPY= $(INCLUDEDIR)/python$(LDVERSION)
153 CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(LDVERSION)
161 DESTSHARED= $(BINLIBDEST)/lib-dynload
167 # Short name and location for Mac OS X Python framework
180 STRIPFLAG=-s
182 # Flags to lipo to produce a 32-bit-only universal executable
188 # Environment to run shared python without installed libraries
200 # install process. Default to user-only-writable for all file types.
218 DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
240 LIBOBJDIR= Python/
243 PYTHON= python$(EXE)
244 BUILDPYTHON= python$(BUILDEXE)
253 # Tcl and Tk config info from --with-tcltk-includes and -libs options
257 # The task to run while instrumented when building the profile-opt target.
259 # by default. The default is "-m test --pgo". To run more tests, use
260 # PROFILE_TASK="-m test --pgo-extended"
265 COVERAGE_REPORT=$(abs_builddir)/lcov-report
266 COVERAGE_REPORT_OPTIONS=--no-branch-coverage --title "CPython lcov report"
314 # Python
317 Python/_warnings.o \
318 Python/Python-ast.o \
319 Python/asdl.o \
320 Python/ast.o \
321 Python/ast_opt.o \
322 Python/ast_unparse.o \
323 Python/bltinmodule.o \
324 Python/ceval.o \
325 Python/codecs.o \
326 Python/compile.o \
327 Python/context.o \
328 Python/dynamic_annotations.o \
329 Python/errors.o \
330 Python/frozenmain.o \
331 Python/future.o \
332 Python/getargs.o \
333 Python/getcompiler.o \
334 Python/getcopyright.o \
335 Python/getplatform.o \
336 Python/getversion.o \
337 Python/graminit.o \
338 Python/hamt.o \
339 Python/import.o \
340 Python/importdl.o \
341 Python/initconfig.o \
342 Python/marshal.o \
343 Python/modsupport.o \
344 Python/mysnprintf.o \
345 Python/mystrtoul.o \
346 Python/pathconfig.o \
347 Python/peephole.o \
348 Python/preconfig.o \
349 Python/pyarena.o \
350 Python/pyctype.o \
351 Python/pyfpe.o \
352 Python/pyhash.o \
353 Python/pylifecycle.o \
354 Python/pymath.o \
355 Python/pystate.o \
356 Python/pythonrun.o \
357 Python/pytime.o \
358 Python/bootstrap_hash.o \
359 Python/structmember.o \
360 Python/symtable.o \
361 Python/sysmodule.o \
362 Python/thread.o \
363 Python/traceback.o \
364 Python/getopt.o \
365 Python/pystrcmp.o \
366 Python/pystrtod.o \
367 Python/pystrhex.o \
368 Python/dtoa.o \
369 Python/formatter_unicode.o \
370 Python/fileutils.o \
371 Python/$(DYNLOADFILE) \
424 # objects that get linked into the Python library
435 Python/frozen.o
441 # in-place by dtrace(1).
443 Python/ceval.o Python/import.o Python/sysmodule.o Modules/gcmodule.o
450 build_all: check-clean-src $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks \
451 Programs/_testembed python-config
454 check-clean-src:
455 @if test -n "$(VPATH)" -a -f "$(srcdir)/Programs/python.o"; then \
457 …echo "Building Python out of the source tree (in $(abs_builddir)) requires a clean source tree ($(…
458 echo "Try to run: make -C \"$(srcdir)\" clean" ; \
463 profile-clean-stamp:
464 $(MAKE) clean profile-removal
468 profile-gen-stamp: profile-clean-stamp
470 echo "Error: Cannot perform PGO build because llvm-profdata was not found in PATH" ;\
479 profile-run-stamp:
483 $(MAKE) profile-gen-stamp
491 # to record its completion and avoid re-running it.
504 # Compile Python binary with profile guided optimization.
505 # To force re-running of the profile task, remove the profile-run-stamp file.
506 profile-opt: profile-run-stamp
508 -rm -f profile-clean-stamp
512 .PHONY=coverage coverage-lcov coverage-report
515 $(MAKE) clean profile-removal
516 …$(MAKE) @DEF_MAKE_RULE@ CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -l…
518 coverage-lcov:
520 @rm -f $(COVERAGE_INFO)
521 @rm -rf $(COVERAGE_REPORT)
522 @lcov --capture --directory $(abs_builddir) \
523 --base-directory $(realpath $(abs_builddir)) \
524 --path $(realpath $(abs_srcdir)) \
525 --output-file $(COVERAGE_INFO)
528 @lcov --remove $(COVERAGE_INFO) \
538 '*/Python/pyfpe.c' \
539 '*/Python/pystrcmp.c' \
543 --output-file $(COVERAGE_INFO)
544 @genhtml $(COVERAGE_INFO) --output-directory $(COVERAGE_REPORT) \
551 coverage-report: regen-grammar regen-token regen-importlib
557 $(MAKE) coverage-lcov
561 clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
562 $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir)
565 $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
566 …$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODL…
569 …$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%…
571 # Create build directory and generate the sysconfig build-time data there.
573 # sys.path fixup -- see Modules/getpath.c.
576 # initialization to succeed. It will be overwritten by generate-posix-vars
580 $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars ;\
581 if test $$? -ne 0 ; then \
582 echo "generate-posix-vars failed" ; \
583 rm -f ./pybuilddir.txt ; \
589 $(CC) -c $(CCSHARED) $(PY_CORE_CFLAGS) -o $@ $<
591 # blake2s is auto-generated from blake2b
594 $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py -f $@
598 # -s, --silent or --quiet is always the first char.
599 # Under BSD make, MAKEFLAGS might be " -s -v x=y".
600 # Ignore macros passed by GNU make, passed after --
602 @case "`echo X $$MAKEFLAGS | sed 's/^X //;s/ -- .*//'`" in \
603 *\ -s*|s*) quiet="-q";; \
616 -rm -f $@
621 …$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(L…
622 $(LN) -f $(INSTSONAME) $@; \
624 $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \
628 $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^
631-dynamiclib -Wl,-single_module $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(pr…
634 libpython$(VERSION).sl: $(LIBRARY_OBJS)
635 $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM)
637 # Copy up the gdb python hooks into a position where they can be automatically
642 gdbhooks: $(BUILDPYTHON)-gdb.py
645 $(BUILDPYTHON)-gdb.py: $(SRC_GDB_HOOKS)
646 $(INSTALL_DATA) $(SRC_GDB_HOOKS) $(BUILDPYTHON)-gdb.py
652 $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
655 $(INSTALL) -d -m $(DIRMODE) $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)
656 $(CC) -o $(LDLIBRARY) $(PY_CORE_LDFLAGS) -dynamiclib \
657 -all_load $(LIBRARY) -Wl,-single_module \
658 -install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) \
659 -compatibility_version $(VERSION) \
660 -current_version $(VERSION) \
661 -framework CoreFoundation $(LIBS);
662 $(INSTALL) -d -m $(DIRMODE) \
663 $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj
665 $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/Info.plist
666 $(LN) -fsn $(VERSION) $(PYTHONFRAMEWORKDIR)/Versions/Current
667 $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)
668 $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources
670 # This rule builds the Cygwin Python DLL and import library if configured
673 if test -n "$(DLLLIBRARY)"; then \
674 $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
688 $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \
689 -s Modules \
693 @echo "The Makefile was updated, you may need to re-run make."
697 …$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(…
705 …$(LINKCC) $(PY_CORE_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS…
707 .PHONY: regen-importlib
708 regen-importlib: Programs/_freeze_importlib
709 # Regenerate Python/importlib_external.h
713 $(srcdir)/Python/importlib_external.h.new
714 $(UPDATE_FILE) $(srcdir)/Python/importlib_external.h $(srcdir)/Python/importlib_external.h.new
715 # Regenerate Python/importlib.h from Lib/importlib/_bootstrap.py
719 $(srcdir)/Python/importlib.h.new
720 $(UPDATE_FILE) $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib.h.new
721 # Regenerate Python/importlib_zipimport.h from Lib/zipimport.py
725 $(srcdir)/Python/importlib_zipimport.h.new
726 $(UPDATE_FILE) $(srcdir)/Python/importlib_zipimport.h $(srcdir)/Python/importlib_zipimport.h.new
732 regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar \
733 regen-token regen-keyword regen-symbol regen-ast regen-importlib clinic
745 $(CC) -c $(PY_CORE_CFLAGS) \
746 -DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \
747 -DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \
748 -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \
749 -o $@ $(srcdir)/Modules/getbuildinfo.c
752 $(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
753 -DPREFIX='"$(prefix)"' \
754 -DEXEC_PREFIX='"$(exec_prefix)"' \
755 -DVERSION='"$(VERSION)"' \
756 -DVPATH='"$(VPATH)"' \
757 -o $@ $(srcdir)/Modules/getpath.c
759 Programs/python.o: $(srcdir)/Programs/python.c
760 $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c
763 $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c
775 Python/dynload_shlib.o: $(srcdir)/Python/dynload_shlib.c Makefile
776 $(CC) -c $(PY_CORE_CFLAGS) \
777 -DSOABI='"$(SOABI)"' \
778 -o $@ $(srcdir)/Python/dynload_shlib.c
780 Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile
781 $(CC) -c $(PY_CORE_CFLAGS) \
782 -DSHLIB_EXT='"$(EXT_SUFFIX)"' \
783 -o $@ $(srcdir)/Python/dynload_hpux.c
785 Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(srcdir)/Include/pydtrace.h
786 $(CC) -c $(PY_CORE_CFLAGS) \
787 -DABIFLAGS='"$(ABIFLAGS)"' \
789 -o $@ $(srcdir)/Python/sysmodule.c
793 .PHONY: regen-grammar
794 regen-grammar: regen-token
795 # Regenerate Include/graminit.h and Python/graminit.c
798 PYTHONPATH=$(srcdir) $(PYTHON_FOR_REGEN) -m Parser.pgen $(srcdir)/Grammar/Grammar \
801 $(srcdir)/Python/graminit.c.new
803 $(UPDATE_FILE) $(srcdir)/Python/graminit.c $(srcdir)/Python/graminit.c.new
805 .PHONY=regen-ast
806 regen-ast:
807 # Regenerate Include/Python-ast.h using Parser/asdl_c.py -h
810 -h $(srcdir)/Include/Python-ast.h.new \
811 $(srcdir)/Parser/Python.asdl
812 $(UPDATE_FILE) $(srcdir)/Include/Python-ast.h $(srcdir)/Include/Python-ast.h.new
813 # Regenerate Python/Python-ast.c using Parser/asdl_c.py -c
814 $(MKDIR_P) $(srcdir)/Python
816 -c $(srcdir)/Python/Python-ast.c.new \
817 $(srcdir)/Parser/Python.asdl
818 $(UPDATE_FILE) $(srcdir)/Python/Python-ast.c $(srcdir)/Python/Python-ast.c.new
820 .PHONY: regen-opcode
821 regen-opcode:
829 .PHONY: regen-token
830 regen-token:
831 # Regenerate Doc/library/token-list.inc from Grammar/Tokens
835 $(srcdir)/Doc/library/token-list.inc
852 .PHONY: regen-keyword
853 regen-keyword:
856 PYTHONPATH=$(srcdir) $(PYTHON_FOR_REGEN) -m Parser.pgen.keywordgen $(srcdir)/Grammar/Grammar \
861 .PHONY: regen-symbol
862 regen-symbol: $(srcdir)/Include/graminit.h
869 Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o Python/future.o Parser/parseto…
871 Python/getplatform.o: $(srcdir)/Python/getplatform.c
872 $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
874 Python/importdl.o: $(srcdir)/Python/importdl.c
875 $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
915 Objects/odictobject.o: $(srcdir)/Objects/dict-common.h
916 Objects/dictobject.o: $(srcdir)/Objects/stringlib/eq.h $(srcdir)/Objects/dict-common.h
919 .PHONY: regen-opcode-targets
920 regen-opcode-targets:
921 # Regenerate Python/opcode_targets.h from Lib/opcode.py
922 # using Python/makeopcodetargets.py
923 $(PYTHON_FOR_REGEN) $(srcdir)/Python/makeopcodetargets.py \
924 $(srcdir)/Python/opcode_targets.h.new
925 $(UPDATE_FILE) $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/opcode_targets.h.new
927 Python/ceval.o: $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/ceval_gil.h \
928 $(srcdir)/Python/condvar.h
930 Python/frozen.o: $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib_external.h \
931 $(srcdir)/Python/importlib_zipimport.h
933 # Generate DTrace probe macros, then rename them (PYTHON_ -> PyDTrace_) to
938 $(DTRACE) $(DFLAGS) -o $@ -h -s $<
939 : sed in-place edit with POSIX-only tools
943 Python/ceval.o: $(srcdir)/Include/pydtrace.h
944 Python/import.o: $(srcdir)/Include/pydtrace.h
947 Python/pydtrace.o: $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS)
948 $(DTRACE) $(DFLAGS) -o $@ -G -s $< $(DTRACE_DEPS)
952 .PHONY: regen-typeslots
953 regen-typeslots:
965 $(srcdir)/Include/Python.h \
1057 $(srcdir)/Include/Python-ast.h \
1098 $(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)
1111 # Pass TESTOPTS options because it can contain --tempdir option.
1113 $(TESTRUNNER) $(TESTOPTS) --cleanup
1116 # This excludes some tests that are particularly resource-intensive.
1120 # Run the full test suite twice - once without .pyc files, and once with.
1128 -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
1129 $(TESTPYTHON) -E $(srcdir)/Lib/compileall.py
1130 -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
1131 -$(TESTRUNNER) -u all $(TESTOPTS)
1132 $(TESTRUNNER) -u all $(TESTOPTS)
1141 $(TESTRUNNER) -u all $(TESTOPTS)
1143 ./$(BUILDPYTHON) -E -m test -j 0 -u all $(TESTOPTS)
1148 -@if which pybuildbot.identify >/dev/null 2>&1; then \
1151 $(TESTRUNNER) -j 1 -u all -W --slowest --fail-env-changed --timeout=$(TESTTIMEOUT) $(TESTOPTS)
1154 $(RUNSHARED) ./$(BUILDPYTHON) -m test.pythoninfo
1156 QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
1168 $(RUNSHARED) ./$(BUILDPYTHON) Tools/ssl/multissltests.py --steps=modules
1176 upgrade) ensurepip="--upgrade" ;; \
1179 $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
1180 $$ensurepip --root=$(DESTDIR)/ ; \
1186 upgrade) ensurepip="--altinstall --upgrade" ;; \
1187 install|*) ensurepip="--altinstall" ;; \
1189 $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
1190 $$ensurepip --root=$(DESTDIR)/ ; \
1193 commoninstall: check-clean-src @FRAMEWORKALTINSTALLFIRST@ \
1212 if test ! -d $(DESTDIR)$$i; then \
1214 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
1219 # Install the interpreter with $(VERSION) affixed
1224 if test ! -d $(DESTDIR)$$i; then \
1226 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
1230 if test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \
1231 $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \
1233 $(INSTALL_PROGRAM) $(STRIPFLAG) Mac/pythonw $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \
1235 -if test "$(VERSION)" != "$(LDVERSION)"; then \
1236 …if test -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE) -o -h $(DESTDIR)$(BINDIR)/python$(VERSION)$(…
1237 then rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
1239 (cd $(DESTDIR)$(BINDIR); $(LN) python$(LDVERSION)$(EXE) python$(VERSION)$(EXE)); \
1241 if test -f $(LDLIBRARY) && test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \
1242 if test -n "$(DLLLIBRARY)" ; then \
1247 (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) $(LDLIBRARY)) \
1250 if test -n "$(PY3LIBRARY)"; then \
1256 rm -f $(DESTDIR)$(BINDIR)python$(VERSION)-32$(EXE); \
1258 -output $(DESTDIR)$(BINDIR)/python$(VERSION)-32$(EXE) \
1259 $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
1263 if test ! -d $(DESTDIR)$(LIBPC); then \
1265 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC); \
1267 -if test -f $(DESTDIR)$(BINDIR)/python3$(EXE) -o -h $(DESTDIR)$(BINDIR)/python3$(EXE); \
1268 then rm -f $(DESTDIR)$(BINDIR)/python3$(EXE); \
1271 (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) python3$(EXE))
1272 -if test "$(VERSION)" != "$(LDVERSION)"; then \
1273 rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config; \
1274 (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(LDVERSION)-config python$(VERSION)-config); \
1275 rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc; \
1276 (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python-$(LDVERSION).pc); \
1277 rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION)-embed.pc; \
1278 (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python-$(LDVERSION)-embed.pc); \
1280 -rm -f $(DESTDIR)$(BINDIR)/python3-config
1281 (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config)
1282 -rm -f $(DESTDIR)$(LIBPC)/python3.pc
1283 (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc)
1284 -rm -f $(DESTDIR)$(LIBPC)/python3-embed.pc
1285 (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python3-embed.pc)
1286 -rm -f $(DESTDIR)$(BINDIR)/idle3
1287 (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
1288 -rm -f $(DESTDIR)$(BINDIR)/pydoc3
1289 (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
1290 -rm -f $(DESTDIR)$(BINDIR)/2to3
1291 (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
1293 rm -f $(DESTDIR)$(BINDIR)/python3-32$(EXE); \
1294 (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-32$(EXE) python3-32$(EXE)) \
1301 if test ! -d $(DESTDIR)$$i; then \
1303 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
1307 $(INSTALL_DATA) $(srcdir)/Misc/python.man \
1308 $(DESTDIR)$(MANDIR)/man1/python$(VERSION).1
1312 -rm -f $(DESTDIR)$(MANDIR)/man1/python3.1
1313 (cd $(DESTDIR)$(MANDIR)/man1; $(LN) -s python$(VERSION).1 python3.1)
1318 tkinter/test/test_ttk site-packages test \
1322 test/xmltestdata test/xmltestdata/c14n-20 \
1399 if test ! -d $(DESTDIR)$$i; then \
1401 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
1408 if test ! -d $$a; then continue; else true; fi; \
1410 if test ! -d $(DESTDIR)$$b; then \
1412 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \
1418 if test -x $$i; then \
1429 if test ! -d $$a; then continue; else true; fi; \
1430 if test `ls $$a | wc -l` -lt 1; then continue; fi; \
1440 if test -d $$i; then continue; fi; \
1441 if test -x $$i; then \
1454 if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
1458 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
1459 $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
1460 -j0 -d $(LIBDEST) -f \
1461 -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
1463 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
1464 $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
1465 -j0 -d $(LIBDEST) -f \
1466 -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
1468 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
1469 $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
1470 -j0 -d $(LIBDEST) -f \
1471 -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
1473 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
1474 $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
1475 -j0 -d $(LIBDEST)/site-packages -f \
1476 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
1477 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
1478 $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
1479 -j0 -d $(LIBDEST)/site-packages -f \
1480 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
1481 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
1482 $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
1483 -j0 -d $(LIBDEST)/site-packages -f \
1484 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
1485 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
1486 $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
1487 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
1488 $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
1490 # bpo-21536: Misc/python-config.sh is generated in the build directory
1491 # from $(srcdir)Misc/python-config.sh.in.
1492 python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
1493 @ # Substitution happens here, as the completely-expanded BINDIR
1495 …sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python…
1496 @ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}
1497 LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config
1498 @ # On Darwin, always use the python version of the script, the shell
1499 @ # version doesn't use the compiler customizations that are provided
1500 @ # in python (_osx_support.py).
1501 @if test `uname -s` = Darwin; then \
1502 cp python-config.py python-config; \
1511 if test ! -d $(DESTDIR)$$i; then \
1513 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
1517 @if test ! -d $(DESTDIR)$(INCLUDEPY)/cpython; then \
1519 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(INCLUDEPY)/cpython; \
1522 @if test ! -d $(DESTDIR)$(INCLUDEPY)/internal; then \
1524 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(INCLUDEPY)/internal; \
1551 libainstall: @DEF_MAKE_RULE@ python-config
1554 if test ! -d $(DESTDIR)$$i; then \
1556 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
1560 @if test -d $(LIBRARY); then :; else \
1561 if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
1568 echo Skip install of $(LIBRARY) - use make frameworkinstall; \
1572 $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o
1577 $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
1578 $(INSTALL_DATA) Misc/python-embed.pc $(DESTDIR)$(LIBPC)/python-$(VERSION)-embed.pc
1580 $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
1581 $(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
1582 $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config
1583 @if [ -s Modules/python.exp -a \
1586 $(INSTALL_DATA) Modules/python.exp \
1587 $(DESTDIR)$(LIBPL)/python.exp; \
1588 echo; echo "$(LIBPL)/python.exp"; \
1595 echo; echo "See Misc/AIX-NOTES for details."; \
1603 --prefix=$(prefix) \
1604 --install-scripts=$(BINDIR) \
1605 --install-platlib=$(DESTSHARED) \
1606 --root=$(DESTDIR)/
1607 -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py
1608 -rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
1611 # framework-based Python. frameworkinstall installs everything, the
1616 # This target is here for backward compatibility, previous versions of Python
1620 # On install, we re-make the framework
1622 # --enable-framework. If --enable-framework has been specified then we have
1629 @if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
1630 echo Not configured with --enable-framework; \
1635 if test ! -d $(DESTDIR)$$i; then \
1637 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
1641 $(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers
1642 …sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_versi…
1643 $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
1644 …$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAM…
1645 $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
1646 $(LN) -fsn Versions/Current/Resources $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Resources
1651 # install (which includes python-config) happy.
1653 $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).a"
1654 $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).dylib"
1655 $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).a"
1656 $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).dylib"
1657 $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(LDVERSION).dylib"
1658 $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(VERSION).dylib"
1670 # This installs the python* and other bin symlinks in $prefix/bin or in
1686 $(MAKE) -f Makefile.pre Makefile
1696 $(CC) -c $(PY_CORE_CFLAGS) -o $@ $<
1698 # bpo-30104: dtoa.c uses union to cast double to unsigned long[2]. clang 4.0
1699 # with -O2 or higher and strict aliasing miscompiles the ratio() function
1700 # causing rounding issues. Compile dtoa.c using -fno-strict-aliasing on clang.
1702 Python/dtoa.o: Python/dtoa.c
1703 $(CC) -c $(PY_CORE_CFLAGS) $(CFLAGS_ALIASING) -o $@ $<
1707 ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
1712 $(SHELL) config.status --recheck
1719 (cd $(srcdir); autoconf -Wall)
1721 (cd $(srcdir); autoheader -Wall)
1725 ctags -w $(srcdir)/Include/*.h $(srcdir)/Include/cpython/*.h $(srcdir)/Include/internal/*.h
1726 for i in $(SRCDIRS); do ctags -f tags -w -a $(srcdir)/$$i/*.[ch]; done
1727 ctags -f tags -w -a $(srcdir)/Modules/_ctypes/*.[ch]
1728 …r)/Lib -type f -name "*.py" -not -name "test_*.py" -not -path "*/test/*" -not -path "*/tests/*" -n…
1729 LC_ALL=C sort -o tags tags
1735 for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done
1736 etags -a $(srcdir)/Modules/_ctypes/*.[ch]
1737 …$(srcdir)/Lib -type f -name "*.py" -not -name "test_*.py" -not -path "*/test/*" -not -path "*/test…
1739 # Sanitation targets -- clean leaves libraries, executables and tags
1742 -find $(srcdir) -depth -name '__pycache__' -exec rm -rf {} ';'
1743 -find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
1746 -rm -f *BAD *GOOD *SKIPPED
1747 -rm -rf OUT
1748 -rm -f *.TXT
1749 -rm -f *.txt
1750 -rm -f gb-18030-2000.xml
1753 -rm -rf Doc/build
1754 -rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils
1757 find . -name '*.[oa]' -exec rm -f {} ';'
1758 find . -name '*.s[ol]' -exec rm -f {} ';'
1759 find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
1760 find build -name 'fficonfig.h' -exec rm -f {} ';' || true
1761 find build -name '*.py' -exec rm -f {} ';' || true
1762 find build -name '*.py[co]' -exec rm -f {} ';' || true
1763 -rm -f pybuilddir.txt
1764 -rm -f Lib/lib2to3/*Grammar*.pickle
1765 -rm -f Programs/_testembed Programs/_freeze_importlib
1766 -find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
1767 -rm -f Include/pydtrace_probes.h
1768 -rm -f profile-gen-stamp
1770 profile-removal:
1771 find . -name '*.gc??' -exec rm -f {} ';'
1772 find . -name '*.profclang?' -exec rm -f {} ';'
1773 find . -name '*.dyn' -exec rm -f {} ';'
1774 rm -f $(COVERAGE_INFO)
1775 rm -rf $(COVERAGE_REPORT)
1776 rm -f profile-run-stamp
1778 clobber: clean profile-removal
1779 -rm -f $(BUILDPYTHON) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
1782 -rm -rf build platform
1783 -rm -rf $(PYTHONFRAMEWORKDIR)
1784 -rm -f python-config.py python-config
1785 -rm -f profile-gen-stamp profile-clean-stamp
1789 # Keep configure and Python-ast.[ch], it's possible they can't be generated
1794 -rm -f core Makefile Makefile.pre config.status Modules/Setup.local \
1795 Modules/ld_so_aix Modules/python.exp Misc/python.pc \
1796 Misc/python-embed.pc Misc/python-config.sh
1797 -rm -f python*-gdb.py
1802 LC_ALL=C; find $(srcdir)/[a-zA-Z]* '(' -name '*.fdc' -o -name '*~' \
1803 -o -name '[@,#]*' -o -name '*.old' \
1804 -o -name '*.orig' -o -name '*.rej' \
1805 -o -name '*.bak' ')' \
1806 -exec rm -f {} ';'
1815 -type d \
1816 -o -name '*.[chs]' \
1817 -o -name '*.py' \
1818 -o -name '*.pyw' \
1819 -o -name '*.dat' \
1820 -o -name '*.el' \
1821 -o -name '*.fd' \
1822 -o -name '*.in' \
1823 -o -name '*.gif' \
1824 -o -name '*.txt' \
1825 -o -name '*.xml' \
1826 -o -name '*.xbm' \
1827 -o -name '*.xpm' \
1828 -o -name '*.uue' \
1829 -o -name '*.decTest' \
1830 -o -name '*.tmCommand' \
1831 -o -name '*.tmSnippet' \
1832 -o -name 'Setup' \
1833 -o -name 'Setup.*' \
1834 -o -name README \
1835 -o -name NEWS \
1836 -o -name HISTORY \
1837 -o -name Makefile \
1838 -o -name ChangeLog \
1839 -o -name .hgignore \
1840 -o -name MANIFEST \
1841 -o -print
1849 Python/thread.o: @THREADHEADERS@ $(srcdir)/Python/condvar.h
1852 .PHONY: all build_all sharedmods check-clean-src oldsharedmods test quicktest