150N/A#
150N/A# This file is a static, checked in version of the build generated python
150N/A# Makefile.pre. It is packaged in place of the one in the proto area.
150N/A#
150N/A# Generated automatically from Makefile.pre by makesetup.
150N/A# Top-level Makefile for Python
150N/A#
150N/A# As distributed, this file is called Makefile.pre.in; it is processed
150N/A# into the real Makefile by running the script ./configure, which
150N/A# replaces things like @spam@ with values appropriate for your system.
150N/A# This means that if you edit Makefile, your changes get lost the next
150N/A# time you run the configure script. Ideally, you can do:
150N/A#
150N/A# ./configure
150N/A# make
150N/A# make test
150N/A# make install
150N/A#
150N/A# If you have a previous version of Python installed that you don't
150N/A# want to overwrite, you can use "make altinstall" instead of "make
150N/A# install". Refer to the "Installing" section in the README file for
150N/A# additional details.
150N/A#
150N/A# See also the section "Build instructions" in the README file.
150N/A
150N/A# === Variables set by makesetup ===
150N/A
150N/AMODOBJS= Modules/threadmodule.o Modules/signalmodule.o Modules/posixmodule.o Modules/errnomodule.o Modules/pwdmodule.o Modules/_sre.o Modules/_codecsmodule.o Modules/zipimport.o Modules/symtablemodule.o Modules/xxsubtype.o
150N/AMODLIBS= $(LOCALMODLIBS) $(BASEMODLIBS)
150N/A
150N/A# === Variables set by configure
150N/AVERSION= 2.6
150N/Asrcdir= .
150N/A
150N/A
150N/ACC= /usr/lib/python2.6/pycc
150N/ACXX= /usr/lib/python2.6/pyCC
150N/AMAINCC= $(CC)
150N/ALINKCC= $(PURIFY) $(MAINCC)
150N/AAR= ar
150N/ARANLIB= ranlib
150N/ASVNVERSION= svnversion $(srcdir)
150N/A
150N/A# Shell used by make (some versions default to the login shell, which is bad)
150N/ASHELL= /bin/sh
150N/A
150N/A# Use this to make a link between python$(VERSION) and python in $(BINDIR)
150N/ALN= ln
150N/A
150N/A# Portable install script (configure doesn't always guess right)
150N/AINSTALL= install
150N/AINSTALL_PROGRAM=${INSTALL}
150N/AINSTALL_SCRIPT= ${INSTALL}
150N/AINSTALL_DATA= ${INSTALL} -m 644
150N/A# Shared libraries must be installed with executable mode on some systems;
150N/A# rather than figuring out exactly which, we always give them executable mode.
150N/A# Also, making them read-only seems to be a good idea...
150N/AINSTALL_SHARED= ${INSTALL} -m 555
150N/A
150N/AMAKESETUP= $(srcdir)/Modules/makesetup
150N/A
150N/A# Compiler options
150N/AOPT= -DNDEBUG
150N/ABASECFLAGS=
150N/ACFLAGS= $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS)
150N/A# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
150N/A# be able to build extension modules using the directories specified in the
150N/A# environment variables
150N/ACPPFLAGS= -I. -IInclude -I$(srcdir)/Include -D_LARGEFILE64_SOURCE -I/usr/lib/libffi-3.0.9/include
150N/ALDFLAGS= -Wl,-zignore -Wl,-zcombreloc -Wl,-Bdirect -L. -L/usr/gnu/lib
150N/ALDLAST=
150N/ASGI_ABI=
150N/ACCSHARED= -KPIC
150N/ALINKFORSHARED=
150N/A# Extra C flags added for building the interpreter object files.
150N/ACFLAGSFORSHARED=$(CCSHARED)
150N/A# C flags used for building the interpreter object files
150N/APY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
150N/A
150N/A
150N/A# Machine-dependent subdirectories
150N/AMACHDEP= sunos5
150N/A
150N/A# Install prefix for architecture-independent files
150N/Aprefix= /usr
150N/A
150N/A# Install prefix for architecture-dependent files
150N/Aexec_prefix= ${prefix}
150N/A
150N/A# Install prefix for data files
150N/Adatarootdir= ${prefix}/share
150N/A
150N/A# Expanded directories
150N/ABINDIR= $(exec_prefix)/bin
150N/ALIBDIR= /usr/lib
150N/AMANDIR= /usr/share/man
150N/AINCLUDEDIR= ${prefix}/include
150N/ACONFINCLUDEDIR= $(exec_prefix)/include
150N/ASCRIPTDIR= $(prefix)/lib
150N/A
150N/A# Detailed destination directories
150N/ABINLIBDEST= $(exec_prefix)/lib/python$(VERSION)
150N/ALIBDEST= $(SCRIPTDIR)/python$(VERSION)
150N/AINCLUDEPY= $(INCLUDEDIR)/python$(VERSION)
150N/ACONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION)
150N/ALIBP= $(exec_prefix)/lib/python$(VERSION)
150N/A
150N/A# Symbols used for using shared libraries
150N/ASO= .so
150N/ALDSHARED= $(CC) -G
150N/ABLDSHARED= $(CC) -G
150N/ADESTSHARED= $(BINLIBDEST)/lib-dynload
150N/A
150N/A# Executable suffix (.exe on Windows and Mac OS X)
150N/AEXE=
150N/ABUILDEXE=
150N/A
150N/A# Short name and location for Mac OS X Python framework
150N/AUNIVERSALSDK=
150N/APYTHONFRAMEWORK=
150N/APYTHONFRAMEWORKDIR= no-framework
150N/APYTHONFRAMEWORKPREFIX=
150N/APYTHONFRAMEWORKINSTALLDIR=
150N/A# Deployment target selected during configure, to be checked
150N/A# by distutils. The export statement is needed to ensure that the
150N/A# deployment target is active during build.
150N/AMACOSX_DEPLOYMENT_TARGET=
150N/A#export MACOSX_DEPLOYMENT_TARGET
150N/A
150N/A# Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
150N/AOTHER_LIBTOOL_OPT=
150N/A
150N/A# Environment to run shared python without installed libraries
150N/ARUNSHARED=
150N/A
150N/A# Modes for directories, executables and data files created by the
150N/A# install process. Default to user-only-writable for all file types.
150N/ADIRMODE= 755
150N/AEXEMODE= 755
150N/AFILEMODE= 644
150N/A
150N/A# configure script arguments
150N/ACONFIG_ARGS= '--prefix=/usr' '--libdir=/usr/lib' '--mandir=/usr/share/man' '--datadir=/usr/share' '--infodir=/usr/share/info' '--enable-shared' '--with-system-ffi' '--disable-static' 'CC=/usr/lib/python2.6/pycc' 'CFLAGS=' 'LDFLAGS= -Wl,-zignore -Wl,-zcombreloc -Wl,-Bdirect -L. -L/usr/gnu/lib' 'CPPFLAGS=-D_LARGEFILE64_SOURCE -I/usr/lib/libffi-3.0.9/include '
150N/A
150N/A
150N/A# Subdirectories with code
150N/ASRCDIRS= Parser Grammar Objects Python Modules Mac
150N/A
150N/A# Other subdirectories
150N/ASUBDIRSTOO= Include Lib Misc Demo
150N/A
150N/A# Files and directories to be distributed
150N/ACONFIGFILES= configure configure.in acconfig.h pyconfig.h.in Makefile.pre.in
150N/ADISTFILES= README ChangeLog $(CONFIGFILES)
150N/ADISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
150N/ADIST= $(DISTFILES) $(DISTDIRS)
150N/A
150N/A
150N/ALIBRARY= libpython$(VERSION).a
150N/ALDLIBRARY= libpython$(VERSION).so
150N/ABLDLIBRARY= -Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)
150N/ADLLLIBRARY=
150N/ALDLIBRARYDIR=
150N/AINSTSONAME= libpython$(VERSION).so.1.0
150N/A
150N/A
150N/ALIBS= -lsocket -lnsl -ldl
150N/ALIBM= -lm
150N/ALIBC=
150N/ASYSLIBS= $(LIBM) $(LIBC)
150N/ASHLIBS= $(LIBS)
150N/A
150N/ATHREADOBJ= Python/thread.o
150N/ADLINCLDIR= .
150N/ADYNLOADFILE= dynload_shlib.o
150N/AMACHDEP_OBJS=
150N/ALIBOBJDIR= Python/
150N/ALIBOBJS=
150N/AUNICODE_OBJS= Objects/unicodeobject.o Objects/unicodectype.o
150N/A
150N/APYTHON= python$(EXE)
150N/ABUILDPYTHON= python$(BUILDEXE)
150N/A
150N/A# The task to run while instrument when building the profile-opt target
150N/APROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
150N/A#PROFILE_TASK= $(srcdir)/Lib/test/regrtest.py
150N/A
150N/A# === Definitions added by makesetup ===
150N/A
150N/ALOCALMODLIBS=
150N/ABASEMODLIBS=
150N/AGLHACK=-Dclear=__GLclear
150N/APYTHONPATH=$(COREPYTHONPATH)
150N/ACOREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)$(TKPATH)$(OLDPATH)
150N/AOLDPATH=:lib-old
150N/ATKPATH=:lib-tk
150N/AEXTRAMACHDEPPATH=
150N/AMACHDEPPATH=:plat-$(MACHDEP)
150N/ATESTPATH=
150N/ASITEPATH=
150N/ADESTPATH=
150N/AMACHDESTLIB=$(BINLIBDEST)
150N/ADESTLIB=$(LIBDEST)
150N/A
150N/A
150N/A
150N/A##########################################################################
150N/A# Modules
150N/AMODULE_OBJS= \
150N/A Modules/config.o \
150N/A Modules/getpath.o \
150N/A Modules/main.o \
150N/A Modules/gcmodule.o
150N/A
150N/A# Used of signalmodule.o is not available
150N/ASIGNAL_OBJS=
150N/A
150N/A
150N/A##########################################################################
150N/A# Grammar
150N/AGRAMMAR_H= $(srcdir)/Include/graminit.h
150N/AGRAMMAR_C= $(srcdir)/Python/graminit.c
150N/AGRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
150N/A
150N/ADTRACE_OBJS=Python/dtrace.o Python/phelper.o
150N/A
150N/A##########################################################################
150N/A# Parser
150N/APGEN= Parser/pgen$(EXE)
150N/A
150N/APOBJS= \
150N/A Parser/acceler.o \
150N/A Parser/grammar1.o \
150N/A Parser/listnode.o \
150N/A Parser/node.o \
150N/A Parser/parser.o \
150N/A Parser/parsetok.o \
150N/A Parser/bitset.o \
150N/A Parser/metagrammar.o \
150N/A Parser/firstsets.o \
150N/A Parser/grammar.o \
150N/A Parser/pgen.o
150N/A
150N/APARSER_OBJS= $(POBJS) Parser/myreadline.o Parser/tokenizer.o
150N/A
150N/APGOBJS= \
150N/A Objects/obmalloc.o \
150N/A Python/mysnprintf.o \
150N/A Parser/tokenizer_pgen.o \
150N/A Parser/printgrammar.o \
150N/A Parser/pgenmain.o
150N/A
150N/APARSER_HEADERS= \
150N/A Parser/parser.h \
150N/A Parser/tokenizer.h
150N/A
150N/APGENOBJS= $(PGENMAIN) $(POBJS) $(PGOBJS)
150N/A
150N/A##########################################################################
150N/A# AST
150N/AAST_H_DIR= $(srcdir)/Include
150N/AAST_H= $(AST_H_DIR)/Python-ast.h
150N/AAST_C_DIR= $(srcdir)/Python
150N/AAST_C= $(AST_C_DIR)/Python-ast.c
150N/AAST_ASDL= $(srcdir)/Parser/Python.asdl
150N/A
150N/AASDLGEN_FILES= $(srcdir)/Parser/asdl.py $(srcdir)/Parser/asdl_c.py
150N/A# XXX Note that a build now requires Python exist before the build starts
150N/AASDLGEN= $(srcdir)/Parser/asdl_c.py
150N/A
150N/A##########################################################################
150N/A# Python
150N/APYTHON_OBJS= \
150N/A Python/_warnings.o \
150N/A Python/Python-ast.o \
150N/A Python/asdl.o \
150N/A Python/ast.o \
150N/A Python/bltinmodule.o \
150N/A Python/ceval.o \
150N/A Python/compile.o \
150N/A Python/codecs.o \
150N/A Python/errors.o \
150N/A Python/frozen.o \
150N/A Python/frozenmain.o \
150N/A Python/future.o \
150N/A Python/getargs.o \
150N/A Python/getcompiler.o \
150N/A Python/getcopyright.o \
150N/A Python/getmtime.o \
150N/A Python/getplatform.o \
150N/A Python/getversion.o \
150N/A Python/graminit.o \
150N/A Python/import.o \
150N/A Python/importdl.o \
150N/A Python/marshal.o \
150N/A Python/modsupport.o \
150N/A Python/mystrtoul.o \
150N/A Python/mysnprintf.o \
150N/A Python/peephole.o \
150N/A Python/pyarena.o \
150N/A Python/pyfpe.o \
150N/A Python/pymath.o \
150N/A Python/pystate.o \
150N/A Python/pythonrun.o \
150N/A Python/structmember.o \
150N/A Python/symtable.o \
150N/A Python/sysmodule.o \
150N/A Python/traceback.o \
150N/A Python/getopt.o \
150N/A Python/pystrcmp.o \
150N/A Python/pystrtod.o \
150N/A Python/formatter_unicode.o \
150N/A Python/formatter_string.o \
150N/A Python/$(DYNLOADFILE) \
150N/A $(DTRACE_OBJS) \
150N/A $(LIBOBJS) \
150N/A $(MACHDEP_OBJS) \
150N/A $(THREADOBJ)
150N/A
150N/A
150N/A##########################################################################
150N/A# Objects
150N/AOBJECT_OBJS= \
150N/A Objects/abstract.o \
150N/A Objects/boolobject.o \
150N/A Objects/bufferobject.o \
150N/A Objects/bytes_methods.o \
150N/A Objects/bytearrayobject.o \
150N/A Objects/cellobject.o \
150N/A Objects/classobject.o \
150N/A Objects/cobject.o \
150N/A Objects/codeobject.o \
150N/A Objects/complexobject.o \
150N/A Objects/descrobject.o \
150N/A Objects/enumobject.o \
150N/A Objects/exceptions.o \
150N/A Objects/genobject.o \
150N/A Objects/fileobject.o \
150N/A Objects/floatobject.o \
150N/A Objects/frameobject.o \
150N/A Objects/funcobject.o \
150N/A Objects/intobject.o \
150N/A Objects/iterobject.o \
150N/A Objects/listobject.o \
150N/A Objects/longobject.o \
150N/A Objects/dictobject.o \
150N/A Objects/methodobject.o \
150N/A Objects/moduleobject.o \
150N/A Objects/object.o \
150N/A Objects/obmalloc.o \
150N/A Objects/rangeobject.o \
150N/A Objects/setobject.o \
150N/A Objects/sliceobject.o \
150N/A Objects/stringobject.o \
150N/A Objects/structseq.o \
150N/A Objects/tupleobject.o \
150N/A Objects/typeobject.o \
150N/A Objects/weakrefobject.o \
150N/A $(UNICODE_OBJS)
150N/A
150N/A
150N/A##########################################################################
150N/A# objects that get linked into the Python library
150N/ALIBRARY_OBJS= \
150N/A Modules/getbuildinfo.o \
150N/A $(PARSER_OBJS) \
150N/A $(OBJECT_OBJS) \
150N/A $(PYTHON_OBJS) \
150N/A $(MODULE_OBJS) \
150N/A $(SIGNAL_OBJS) \
150N/A $(MODOBJS)
150N/A
150N/A#########################################################################
150N/A# Rules
150N/A
150N/A# Default target
150N/Aall: build_all
150N/Abuild_all: $(BUILDPYTHON) oldsharedmods sharedmods
150N/A
150N/A# Compile a binary with gcc profile guided optimization.
150N/Aprofile-opt:
150N/A @echo "Building with support for profile generation:"
150N/A $(MAKE) clean
150N/A $(MAKE) build_all_generate_profile
150N/A @echo "Running benchmark to generate profile data:"
150N/A $(MAKE) profile-removal
150N/A $(MAKE) run_profile_task
150N/A @echo "Rebuilding with profile guided optimizations:"
150N/A $(MAKE) clean
150N/A $(MAKE) build_all_use_profile
150N/A
150N/Abuild_all_generate_profile:
150N/A $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"
150N/A
150N/Arun_profile_task:
150N/A ./$(BUILDPYTHON) $(PROFILE_TASK)
150N/A
150N/Abuild_all_use_profile:
150N/A $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"
150N/A
150N/Acoverage:
150N/A @echo "Building with support for coverage checking:"
150N/A $(MAKE) clean
150N/A $(MAKE) all CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -lgcov"
150N/A
150N/A
150N/A# Build the interpreter
150N/A$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
150N/A $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
150N/A Modules/python.o \
150N/A $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
150N/A
150N/Aplatform: $(BUILDPYTHON)
150N/A $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
150N/A
150N/A
150N/A# Build the shared modules
150N/Asharedmods: $(BUILDPYTHON)
150N/A @case $$MAKEFLAGS in \
150N/A *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
150N/A *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
150N/A esac
150N/A
150N/A# Build static library
150N/A# avoid long command lines, same as LIBRARY_OBJS
150N/A$(LIBRARY): $(LIBRARY_OBJS)
150N/A -rm -f $@
150N/A $(AR) cr $@ Modules/getbuildinfo.o
150N/A $(AR) cr $@ $(PARSER_OBJS)
150N/A $(AR) cr $@ $(OBJECT_OBJS)
150N/A $(AR) cr $@ $(PYTHON_OBJS)
150N/A $(AR) cr $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
150N/A $(AR) cr $@ $(MODOBJS)
150N/A $(RANLIB) $@
150N/A
150N/Alibpython$(VERSION).so: $(LIBRARY_OBJS)
150N/A if test $(INSTSONAME) != $(LDLIBRARY); then \
150N/A $(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
150N/A $(LN) -f $(INSTSONAME) $@; \
150N/A else \
150N/A $(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
150N/A fi
150N/A
150N/Alibpython$(VERSION).dylib: $(LIBRARY_OBJS)
150N/A $(CC) -dynamiclib -Wl,-single_module $(LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(VERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
150N/A
150N/A
150N/Alibpython$(VERSION).sl: $(LIBRARY_OBJS)
150N/A $(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)
150N/A
150N/A# This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
150N/A# minimal framework (not including the Lib directory and such) in the current
150N/A# directory.
150N/ARESSRCDIR=Mac/Resources/framework
150N/A$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
150N/A $(LIBRARY) \
150N/A $(RESSRCDIR)/Info.plist
150N/A $(INSTALL) -d -m $(DIRMODE) $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)
150N/A if test "${UNIVERSALSDK}"; then \
150N/A $(CC) -o $(LDLIBRARY) -dynamiclib \
150N/A -isysroot "${UNIVERSALSDK}" \
150N/A -all_load $(LIBRARY) -Wl,-single_module \
150N/A -install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) \
150N/A -compatibility_version $(VERSION) \
150N/A -current_version $(VERSION); \
150N/A else \
150N/A /usr/bin/libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \
150N/A ;\
150N/A fi
150N/A $(INSTALL) -d -m $(DIRMODE) \
150N/A $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj
150N/A $(INSTALL_DATA) $(RESSRCDIR)/Info.plist \
150N/A $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/Info.plist
150N/A $(LN) -fsn $(VERSION) $(PYTHONFRAMEWORKDIR)/Versions/Current
150N/A $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)
150N/A $(LN) -fsn Versions/Current/Headers $(PYTHONFRAMEWORKDIR)/Headers
150N/A $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources
150N/A
150N/A# This rule builds the Cygwin Python DLL and import library if configured
150N/A# for a shared core library; otherwise, this rule is a noop.
150N/A$(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
150N/A if test -n "$(DLLLIBRARY)"; then \
150N/A $(LDSHARED) $(LDFLAGS) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
150N/A $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \
150N/A else true; \
150N/A fi
150N/A
150N/A
150N/Aoldsharedmods: $(SHAREDMODS)
150N/A
150N/A
150N/AMakefile Modules/config.c: Makefile.pre \
150N/A $(srcdir)/Modules/config.c.in \
150N/A $(MAKESETUP) \
150N/A Modules/Setup.config \
150N/A Modules/Setup \
150N/A Modules/Setup.local
150N/A $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \
150N/A -s Modules \
150N/A Modules/Setup.config \
150N/A Modules/Setup.local \
150N/A Modules/Setup
150N/A @mv config.c Modules
150N/A @echo "The Makefile was updated, you may need to re-run make."
150N/A
150N/A
150N/AModules/Setup: $(srcdir)/Modules/Setup.dist
150N/A @if test -f Modules/Setup; then \
150N/A echo "-----------------------------------------------"; \
150N/A echo "Modules/Setup.dist is newer than Modules/Setup;"; \
150N/A echo "check to make sure you have all the updates you"; \
150N/A echo "need in your Modules/Setup file."; \
150N/A echo "Usually, copying Modules/Setup.dist to Modules/Setup will work."; \
150N/A echo "-----------------------------------------------"; \
150N/A fi
150N/A
150N/A############################################################################
150N/A# Special rules for object files
150N/A
150N/AModules/getbuildinfo.o: $(PARSER_OBJS) \
150N/A $(OBJECT_OBJS) \
150N/A $(PYTHON_OBJS) \
150N/A $(MODULE_OBJS) \
150N/A $(SIGNAL_OBJS) \
150N/A $(MODOBJS) \
150N/A $(srcdir)/Modules/getbuildinfo.c
150N/A $(CC) -c $(PY_CFLAGS) -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" -o $@ $(srcdir)/Modules/getbuildinfo.c
150N/A
150N/AModules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
150N/A $(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
150N/A -DPREFIX='"$(prefix)"' \
150N/A -DEXEC_PREFIX='"$(exec_prefix)"' \
150N/A -DVERSION='"$(VERSION)"' \
150N/A -DVPATH='"$(VPATH)"' \
150N/A -o $@ $(srcdir)/Modules/getpath.c
150N/A
150N/AModules/python.o: $(srcdir)/Modules/python.c
150N/A $(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c
150N/A
150N/A
150N/A$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
150N/A -@$(INSTALL) -d Include
150N/A -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
150N/A
150N/A$(PGEN): $(PGENOBJS)
150N/A $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
150N/A
150N/AParser/grammar.o: $(srcdir)/Parser/grammar.c \
150N/A $(srcdir)/Include/token.h \
150N/A $(srcdir)/Include/grammar.h
150N/AParser/metagrammar.o: $(srcdir)/Parser/metagrammar.c
150N/A
150N/AParser/tokenizer_pgen.o: $(srcdir)/Parser/tokenizer.c
150N/A
150N/AParser/pgenmain.o: $(srcdir)/Include/parsetok.h
150N/A
150N/A$(AST_H): $(AST_ASDL) $(ASDLGEN_FILES)
150N/A $(ASDLGEN) -h $(AST_H_DIR) $(AST_ASDL)
150N/A
150N/A$(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
150N/A $(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL)
150N/A
150N/APython/compile.o Python/symtable.o: $(GRAMMAR_H) $(AST_H)
150N/A
150N/APython/getplatform.o: $(srcdir)/Python/getplatform.c
150N/A $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
150N/A
150N/APython/importdl.o: $(srcdir)/Python/importdl.c
150N/A $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
150N/A
150N/AObjects/unicodectype.o: $(srcdir)/Objects/unicodectype.c \
150N/A $(srcdir)/Objects/unicodetype_db.h
150N/A
150N/ASTRINGLIB_HEADERS= \
150N/A $(srcdir)/Include/bytes_methods.h \
150N/A $(srcdir)/Objects/stringlib/count.h \
150N/A $(srcdir)/Objects/stringlib/ctype.h \
150N/A $(srcdir)/Objects/stringlib/fastsearch.h \
150N/A $(srcdir)/Objects/stringlib/find.h \
150N/A $(srcdir)/Objects/stringlib/formatter.h \
150N/A $(srcdir)/Objects/stringlib/partition.h \
150N/A $(srcdir)/Objects/stringlib/stringdefs.h \
150N/A $(srcdir)/Objects/stringlib/string_format.h \
150N/A $(srcdir)/Objects/stringlib/transmogrify.h \
150N/A $(srcdir)/Objects/stringlib/unicodedefs.h \
150N/A $(srcdir)/Objects/stringlib/localeutil.h
150N/A
150N/AObjects/unicodeobject.o: $(srcdir)/Objects/unicodeobject.c \
150N/A $(STRINGLIB_HEADERS)
150N/A
150N/AObjects/bytearrayobject.o: $(srcdir)/Objects/bytearrayobject.c \
150N/A $(STRINGLIB_HEADERS)
150N/A
150N/AObjects/stringobject.o: $(srcdir)/Objects/stringobject.c \
150N/A $(STRINGLIB_HEADERS)
150N/A
150N/APython/formatter_unicode.o: $(srcdir)/Python/formatter_unicode.c \
150N/A $(STRINGLIB_HEADERS)
150N/A
150N/APython/formatter_string.o: $(srcdir)/Python/formatter_string.c \
150N/A $(STRINGLIB_HEADERS)
150N/A
150N/APython/phelper.o: $(srcdir)/Python/phelper.d
150N/A dtrace -o $@ -DPHELPER $(DFLAGS) $(CPPFLAGS) -C -G -s $(srcdir)/Python/phelper.d
150N/A
150N/APython/python.h: $(srcdir)/Python/python.d
150N/A dtrace -o $@ $(DFLAGS) -C -h -s $(srcdir)/Python/python.d
150N/A
150N/APython/ceval.o: Python/python.h
150N/A
150N/APython/dtrace.o: $(srcdir)/Python/python.d Python/ceval.o
150N/A dtrace -o $@ $(DFLAGS) -C -G -s $(srcdir)/Python/python.d Python/ceval.o
150N/A
150N/A############################################################################
150N/A# Header files
150N/A
150N/APYTHON_HEADERS= \
150N/A Include/Python-ast.h \
150N/A Include/Python.h \
150N/A Include/abstract.h \
150N/A Include/asdl.h \
150N/A Include/ast.h \
150N/A Include/bitset.h \
150N/A Include/boolobject.h \
150N/A Include/bytearrayobject.h \
150N/A Include/bytes_methods.h \
150N/A Include/bytesobject.h \
150N/A Include/bufferobject.h \
150N/A Include/cellobject.h \
150N/A Include/ceval.h \
150N/A Include/classobject.h \
150N/A Include/cobject.h \
150N/A Include/code.h \
150N/A Include/codecs.h \
150N/A Include/compile.h \
150N/A Include/complexobject.h \
150N/A Include/descrobject.h \
150N/A Include/dictobject.h \
150N/A Include/enumobject.h \
150N/A Include/errcode.h \
150N/A Include/eval.h \
150N/A Include/fileobject.h \
150N/A Include/floatobject.h \
150N/A Include/frameobject.h \
150N/A Include/funcobject.h \
150N/A Include/genobject.h \
150N/A Include/import.h \
150N/A Include/intobject.h \
150N/A Include/intrcheck.h \
150N/A Include/iterobject.h \
150N/A Include/listobject.h \
150N/A Include/longintrepr.h \
150N/A Include/longobject.h \
150N/A Include/marshal.h \
150N/A Include/metagrammar.h \
150N/A Include/methodobject.h \
150N/A Include/modsupport.h \
150N/A Include/moduleobject.h \
150N/A Include/node.h \
150N/A Include/object.h \
150N/A Include/objimpl.h \
150N/A Include/opcode.h \
150N/A Include/osdefs.h \
150N/A Include/parsetok.h \
150N/A Include/patchlevel.h \
150N/A Include/pgen.h \
150N/A Include/pgenheaders.h \
150N/A Include/pyarena.h \
150N/A Include/pydebug.h \
150N/A Include/pyerrors.h \
150N/A Include/pyfpe.h \
150N/A Include/pymath.h \
150N/A Include/pygetopt.h \
150N/A Include/pymem.h \
150N/A Include/pyport.h \
150N/A Include/pystate.h \
150N/A Include/pystrcmp.h \
150N/A Include/pystrtod.h \
150N/A Include/pythonrun.h \
150N/A Include/pythread.h \
150N/A Include/rangeobject.h \
150N/A Include/setobject.h \
150N/A Include/sliceobject.h \
150N/A Include/stringobject.h \
150N/A Include/structmember.h \
150N/A Include/structseq.h \
150N/A Include/symtable.h \
150N/A Include/sysmodule.h \
150N/A Include/traceback.h \
150N/A Include/tupleobject.h \
150N/A Include/ucnhash.h \
150N/A Include/unicodeobject.h \
150N/A Include/warnings.h \
150N/A Include/weakrefobject.h \
150N/A pyconfig.h \
150N/A $(PARSER_HEADERS)
150N/A
150N/A$(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
150N/A
150N/A
150N/A######################################################################
150N/A
150N/A# Test the interpreter (twice, once without .pyc files, once with)
150N/A# In the past, we've had problems where bugs in the marshalling or
150N/A# elsewhere caused bytecode read from .pyc files to behave differently
150N/A# than bytecode generated directly from a .py source file. Sometimes
150N/A# the bytecode read from a .pyc file had the bug, somtimes the directly
150N/A# generated bytecode. This is sometimes a very shy bug needing a lot of
150N/A# sample data.
150N/A
150N/ATESTOPTS= -l $(EXTRATESTOPTS)
150N/ATESTPROG= $(srcdir)/Lib/test/regrtest.py
150N/ATESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -E -tt
150N/Atest: all platform
150N/A -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
150N/A -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
150N/A $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
150N/A
150N/Atestall: all platform
150N/A -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
150N/A $(TESTPYTHON) $(srcdir)/Lib/compileall.py
150N/A -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
150N/A -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
150N/A $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
150N/A
150N/A# Run the unitests for both architectures in a Universal build on OSX
150N/A# Must be run on an Intel box.
150N/Atestuniversal: all platform
150N/A if [ `arch` != 'i386' ];then \
150N/A echo "This can only be used on OSX/i386" ;\
150N/A exit 1 ;\
150N/A fi
150N/A -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
150N/A -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
150N/A $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
150N/A $(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E -tt $(TESTPROG) $(TESTOPTS) -uall
150N/A
150N/A
150N/A# Like testall, but with a single pass only
150N/A# run an optional script to include some information about the build environment
150N/Abuildbottest: all platform
150N/A -@if which pybuildbot.identify >/dev/null 2>&1; then \
150N/A pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
150N/A fi
150N/A $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall -rw
150N/A
150N/AQUICKTESTOPTS= $(TESTOPTS) -x test_thread test_signal test_strftime \
150N/A test_unicodedata test_re test_sre test_select test_poll \
150N/A test_linuxaudiodev test_struct test_sunaudiodev test_zlib
150N/Aquicktest: all platform
150N/A -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
150N/A -$(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
150N/A $(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
150N/A
150N/AMEMTESTOPTS= $(QUICKTESTOPTS) -x test_dl test___all__ test_fork1 \
150N/A test_longexp
150N/Amemtest: all platform
150N/A -rm -f $(srcdir)/Lib/test/*.py[co]
150N/A -$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
150N/A $(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
150N/A
150N/A# Install everything
150N/Ainstall: altinstall bininstall maninstall
150N/A
150N/A# Install almost everything without disturbing previous versions
150N/Aaltinstall: altbininstall libinstall inclinstall libainstall \
150N/A sharedinstall oldsharedinstall
150N/A
150N/A# Install shared libraries enabled by Setup
150N/ADESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
150N/A
150N/Aoldsharedinstall: $(DESTSHARED) $(SHAREDMODS)
150N/A @for i in X $(SHAREDMODS); do \
150N/A if test $$i != X; then \
150N/A echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
150N/A $(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/`basename $$i`; \
150N/A fi; \
150N/A done
150N/A
150N/A$(DESTSHARED):
150N/A @for i in $(DESTDIRS); \
150N/A do \
150N/A if test ! -d $(DESTDIR)$$i; then \
150N/A echo "Creating directory $$i"; \
150N/A $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
150N/A else true; \
150N/A fi; \
150N/A done
150N/A
150N/A
150N/A# Install the interpreter (by creating a hard link to python$(VERSION))
150N/Abininstall: altbininstall
150N/A -if test -f $(DESTDIR)$(BINDIR)/$(PYTHON) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON); \
150N/A then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
150N/A else true; \
150N/A fi
150N/A (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
150N/A -rm -f $(DESTDIR)$(BINDIR)/python-config
150N/A (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config)
150N/A
150N/A# Install the interpreter with $(VERSION) affixed
150N/A# This goes into $(exec_prefix)
150N/Aaltbininstall: $(BUILDPYTHON)
150N/A @for i in $(BINDIR) $(LIBDIR); \
150N/A do \
150N/A if test ! -d $(DESTDIR)$$i; then \
150N/A echo "Creating directory $$i"; \
150N/A $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
150N/A else true; \
150N/A fi; \
150N/A done
150N/A $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE)
150N/A if test -f $(LDLIBRARY); then \
150N/A if test -n "$(DLLLIBRARY)" ; then \
150N/A $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \
150N/A else \
150N/A $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
150N/A if test $(LDLIBRARY) != $(INSTSONAME); then \
150N/A (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) $(LDLIBRARY)) \
150N/A fi \
150N/A fi; \
150N/A else true; \
150N/A fi
150N/A
150N/A# Install the manual page
150N/Amaninstall:
150N/A @for i in $(MANDIR) $(MANDIR)/man1; \
150N/A do \
150N/A if test ! -d $(DESTDIR)$$i; then \
150N/A echo "Creating directory $$i"; \
150N/A $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
150N/A else true; \
150N/A fi; \
150N/A done
150N/A $(INSTALL_DATA) $(srcdir)/Misc/python.man \
150N/A $(DESTDIR)$(MANDIR)/man1/python.1
150N/A
150N/A# Install the library
150N/APLATDIR= plat-$(MACHDEP)
150N/AEXTRAPLATDIR=
150N/AEXTRAMACHDEPPATH=
150N/AMACHDEPS= $(PLATDIR) $(EXTRAPLATDIR)
150N/AXMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
150N/APLATMACDIRS= plat-mac plat-mac/Carbon plat-mac/lib-scriptpackages \
150N/A plat-mac/lib-scriptpackages/_builtinSuites \
150N/A plat-mac/lib-scriptpackages/CodeWarrior \
150N/A plat-mac/lib-scriptpackages/Explorer \
150N/A plat-mac/lib-scriptpackages/Finder \
150N/A plat-mac/lib-scriptpackages/Netscape \
150N/A plat-mac/lib-scriptpackages/StdSuites \
150N/A plat-mac/lib-scriptpackages/SystemEvents \
150N/A plat-mac/lib-scriptpackages/Terminal
150N/APLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
150N/ALIBSUBDIRS= lib-tk site-packages test test/output test/data \
150N/A test/decimaltestdata \
150N/A encodings compiler hotshot \
150N/A email email/mime email/test email/test/data \
150N/A json json/tests \
150N/A sqlite3 sqlite3/test \
150N/A logging bsddb bsddb/test csv wsgiref \
150N/A lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \
150N/A ctypes ctypes/test ctypes/macholib idlelib idlelib/Icons \
150N/A distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
150N/A multiprocessing multiprocessing/dummy \
150N/A lib-old \
150N/A curses $(MACHDEPS)
150N/Alibinstall: build_all $(srcdir)/Lib/$(PLATDIR)
150N/A @for i in $(SCRIPTDIR) $(LIBDEST); \
150N/A do \
150N/A if test ! -d $(DESTDIR)$$i; then \
150N/A echo "Creating directory $$i"; \
150N/A $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
150N/A else true; \
150N/A fi; \
150N/A done
150N/A @for d in $(LIBSUBDIRS); \
150N/A do \
150N/A a=$(srcdir)/Lib/$$d; \
150N/A if test ! -d $$a; then continue; else true; fi; \
150N/A b=$(LIBDEST)/$$d; \
150N/A if test ! -d $(DESTDIR)$$b; then \
150N/A echo "Creating directory $$b"; \
150N/A $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \
150N/A else true; \
150N/A fi; \
150N/A done
150N/A @for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \
150N/A do \
150N/A if test -x $$i; then \
150N/A $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
150N/A echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \
150N/A else \
150N/A $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
150N/A echo $(INSTALL_DATA) $$i $(LIBDEST); \
150N/A fi; \
150N/A done
150N/A @for d in $(LIBSUBDIRS); \
150N/A do \
150N/A a=$(srcdir)/Lib/$$d; \
150N/A if test ! -d $$a; then continue; else true; fi; \
150N/A if test `ls $$a | wc -l` -lt 1; then continue; fi; \
150N/A b=$(LIBDEST)/$$d; \
150N/A for i in $$a/*; \
150N/A do \
150N/A case $$i in \
150N/A *CVS) ;; \
150N/A *.py[co]) ;; \
150N/A *.orig) ;; \
150N/A *~) ;; \
150N/A *) \
150N/A if test -d $$i; then continue; fi; \
150N/A if test -x $$i; then \
150N/A echo $(INSTALL_SCRIPT) $$i $$b; \
150N/A $(INSTALL_SCRIPT) $$i $(DESTDIR)$$b; \
150N/A else \
150N/A echo $(INSTALL_DATA) $$i $$b; \
150N/A $(INSTALL_DATA) $$i $(DESTDIR)$$b; \
150N/A fi;; \
150N/A esac; \
150N/A done; \
150N/A done
150N/A $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
150N/A PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
150N/A ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
150N/A -d $(LIBDEST) -f \
150N/A -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
150N/A PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
150N/A ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
150N/A -d $(LIBDEST) -f \
150N/A -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
150N/A -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
150N/A ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
150N/A -d $(LIBDEST)/site-packages -f \
150N/A -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
150N/A -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
150N/A ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
150N/A -d $(LIBDEST)/site-packages -f \
150N/A -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
150N/A -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
150N/A ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
150N/A
150N/A# Create the PLATDIR source directory, if one wasn't distributed..
150N/A$(srcdir)/Lib/$(PLATDIR):
150N/A mkdir $(srcdir)/Lib/$(PLATDIR)
150N/A cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
150N/A export PATH; PATH="`pwd`:$$PATH"; \
150N/A export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
150N/A export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
150N/A export EXE; EXE="$(BUILDEXE)"; \
150N/A cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
150N/A
150N/A# Install the include files
150N/AINCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
150N/Ainclinstall:
150N/A @for i in $(INCLDIRSTOMAKE); \
150N/A do \
150N/A if test ! -d $(DESTDIR)$$i; then \
150N/A echo "Creating directory $$i"; \
150N/A $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
150N/A else true; \
150N/A fi; \
150N/A done
150N/A @for i in $(srcdir)/Include/*.h; \
150N/A do \
150N/A echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
150N/A $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
150N/A done
150N/A $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
150N/A
150N/A# Install the library and miscellaneous stuff needed for extending/embedding
150N/A# This goes into $(exec_prefix)
150N/ALIBPL= $(LIBP)/config
150N/Alibainstall: all
150N/A @for i in $(LIBDIR) $(LIBP) $(LIBPL); \
150N/A do \
150N/A if test ! -d $(DESTDIR)$$i; then \
150N/A echo "Creating directory $$i"; \
150N/A $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
150N/A else true; \
150N/A fi; \
150N/A done
150N/A @if test -d $(LIBRARY); then :; else \
150N/A if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
150N/A if test "$(SO)" = .dll; then \
150N/A $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
150N/A else \
150N/A $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
150N/A $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
150N/A fi; \
150N/A else \
150N/A echo Skip install of $(LIBRARY) - use make frameworkinstall; \
150N/A fi; \
150N/A fi
150N/A $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
150N/A $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
150N/A $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
150N/A $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
150N/A $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
150N/A $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
150N/A $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
150N/A $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
150N/A $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
150N/A # Substitution happens here, as the completely-expanded BINDIR
150N/A # is not available in configure
150N/A sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
150N/A $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config
150N/A rm python-config
150N/A @if [ -s Modules/python.exp -a \
150N/A "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
150N/A echo; echo "Installing support files for building shared extension modules on AIX:"; \
150N/A $(INSTALL_DATA) Modules/python.exp \
150N/A $(DESTDIR)$(LIBPL)/python.exp; \
150N/A echo; echo "$(LIBPL)/python.exp"; \
150N/A $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \
150N/A $(DESTDIR)$(LIBPL)/makexp_aix; \
150N/A echo "$(LIBPL)/makexp_aix"; \
150N/A $(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix \
150N/A $(DESTDIR)$(LIBPL)/ld_so_aix; \
150N/A echo "$(LIBPL)/ld_so_aix"; \
150N/A echo; echo "See Misc/AIX-NOTES for details."; \
150N/A else true; \
150N/A fi
150N/A @case "$(MACHDEP)" in beos*) \
150N/A echo; echo "Installing support files for building shared extension modules on BeOS:"; \
150N/A $(INSTALL_DATA) Misc/BeOS-NOTES $(DESTDIR)$(LIBPL)/README; \
150N/A echo; echo "$(LIBPL)/README"; \
150N/A $(INSTALL_SCRIPT) Modules/ar_beos $(DESTDIR)$(LIBPL)/ar_beos; \
150N/A echo "$(LIBPL)/ar_beos"; \
150N/A $(INSTALL_SCRIPT) Modules/ld_so_beos $(DESTDIR)$(LIBPL)/ld_so_beos; \
150N/A echo "$(LIBPL)/ld_so_beos"; \
150N/A echo; echo "See Misc/BeOS-NOTES for details."; \
150N/A ;; \
150N/A esac
150N/A
150N/A# Install the dynamically loadable modules
150N/A# This goes into $(exec_prefix)
150N/Asharedinstall:
150N/A $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
150N/A --prefix=$(prefix) \
150N/A --install-scripts=$(BINDIR) \
150N/A --install-platlib=$(DESTSHARED) \
150N/A --root=/$(DESTDIR)
150N/A
150N/A# Here are a couple of targets for MacOSX again, to install a full
150N/A# framework-based Python. frameworkinstall installs everything, the
150N/A# subtargets install specific parts. Much of the actual work is offloaded to
150N/A# the Makefile in Mac
150N/A#
150N/A#
150N/A# This target is here for backward compatiblity, previous versions of Python
150N/A# hadn't integrated framework installation in the normal install process.
150N/Aframeworkinstall: install
150N/A
150N/A# On install, we re-make the framework
150N/A# structure in the install location, /Library/Frameworks/ or the argument to
150N/A# --enable-framework. If --enable-framework has been specified then we have
150N/A# automatically set prefix to the location deep down in the framework, so we
150N/A# only have to cater for the structural bits of the framework.
150N/A
150N/Aframeworkinstallframework: frameworkinstallstructure install frameworkinstallmaclib
150N/A
150N/Aframeworkinstallstructure: $(LDLIBRARY)
150N/A @if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
150N/A echo Not configured with --enable-framework; \
150N/A exit 1; \
150N/A else true; \
150N/A fi
150N/A @for i in $(prefix)/Resources/English.lproj $(prefix)/lib; do\
150N/A if test ! -d $(DESTDIR)$$i; then \
150N/A echo "Creating directory $(DESTDIR)$$i"; \
150N/A $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
150N/A else true; \
150N/A fi; \
150N/A done
150N/A $(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
150N/A sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
150N/A $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
150N/A $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
150N/A $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
150N/A $(LN) -fsn Versions/Current/Resources $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Resources
150N/A $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(PYTHONFRAMEWORKPREFIX)/$(LDLIBRARY)
150N/A
150N/A# This installs Mac/Lib into the framework
150N/A# Install a number of symlinks to keep software that expects a normal unix
150N/A# install (which includes python-config) happy.
150N/Aframeworkinstallmaclib:
150N/A ln -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/python$(VERSION)/config/libpython$(VERSION).a"
150N/A cd Mac && $(MAKE) installmacsubtree DESTDIR="$(DESTDIR)"
150N/A
150N/A# This installs the IDE, the Launcher and other apps into /Applications
150N/Aframeworkinstallapps:
150N/A cd Mac && $(MAKE) installapps DESTDIR="$(DESTDIR)"
150N/A
150N/Aframeworkinstallapps4way:
150N/A cd Mac && $(MAKE) installapps4way DESTDIR="$(DESTDIR)"
150N/A
150N/A# This install the unix python and pythonw tools in /usr/local/bin
150N/Aframeworkinstallunixtools:
150N/A cd Mac && $(MAKE) installunixtools DESTDIR="$(DESTDIR)"
150N/A
150N/Aframeworkinstallunixtools4way:
150N/A cd Mac && $(MAKE) installunixtools4way DESTDIR="$(DESTDIR)"
150N/A
150N/Aframeworkaltinstallunixtools:
150N/A cd Mac && $(MAKE) altinstallunixtools DESTDIR="$(DESTDIR)"
150N/A
150N/Aframeworkaltinstallunixtools4way:
150N/A cd Mac && $(MAKE) altinstallunixtools4way DESTDIR="$(DESTDIR)"
150N/A
150N/A# This installs the Demos and Tools into the applications directory.
150N/A# It is not part of a normal frameworkinstall
150N/Aframeworkinstallextras:
150N/A cd Mac && $(MAKE) installextras DESTDIR="$(DESTDIR)"
150N/A
150N/A# This installs a few of the useful scripts in Tools/scripts
150N/Ascriptsinstall:
150N/A SRCDIR=$(srcdir) $(RUNSHARED) \
150N/A ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
150N/A --prefix=$(prefix) \
150N/A --install-scripts=$(BINDIR) \
150N/A --root=/$(DESTDIR)
150N/A
150N/A# Build the toplevel Makefile
150N/AMakefile.pre: Makefile.pre.in config.status
150N/A CONFIG_FILES=Makefile.pre CONFIG_HEADERS= $(SHELL) config.status
150N/A $(MAKE) -f Makefile.pre Makefile
150N/A
150N/A# Run the configure script.
150N/Aconfig.status: $(srcdir)/configure
150N/A $(SHELL) $(srcdir)/configure $(CONFIG_ARGS)
150N/A
150N/A.PRECIOUS: config.status $(BUILDPYTHON) Makefile Makefile.pre
150N/A
150N/A# Some make's put the object file in the current directory
150N/A.c.o:
150N/A $(CC) -c $(PY_CFLAGS) -o $@ $<
150N/A
150N/A# Run reindent on the library
150N/Areindent:
150N/A ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
150N/A
150N/A# Rerun configure with the same options as it was run last time,
150N/A# provided the config.status script exists
150N/Arecheck:
150N/A $(SHELL) config.status --recheck
150N/A $(SHELL) config.status
150N/A
150N/A# Rebuild the configure script from configure.in; also rebuild pyconfig.h.in
150N/Aautoconf:
150N/A (cd $(srcdir); autoconf)
150N/A (cd $(srcdir); autoheader)
150N/A
150N/A# Create a tags file for vi
150N/Atags::
150N/A cd $(srcdir); \
150N/A ctags -w -t Include/*.h; \
150N/A for i in $(SRCDIRS); do ctags -w -t -a $$i/*.[ch]; \
150N/A done; \
150N/A sort -o tags tags
150N/A
150N/A# Create a tags file for GNU Emacs
150N/ATAGS::
150N/A cd $(srcdir); \
150N/A etags Include/*.h; \
150N/A for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done
150N/A
150N/A# Sanitation targets -- clean leaves libraries, executables and tags
150N/A# files, which clobber removes as well
150N/Apycremoval:
150N/A find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
150N/A
150N/Aclean: pycremoval
150N/A find . -name '*.o' -exec rm -f {} ';'
150N/A find . -name '*.s[ol]' -exec rm -f {} ';'
150N/A find $(srcdir)/build -name 'fficonfig.h' -exec rm -f {} ';' || true
150N/A find $(srcdir)/build -name 'fficonfig.py' -exec rm -f {} ';' || true
150N/A -rm -f Lib/lib2to3/*Grammar*.pickle
150N/A
150N/Aprofile-removal:
150N/A find . -name '*.gc??' -exec rm -f {} ';'
150N/A
150N/Aclobber: clean profile-removal
150N/A -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
150N/A tags TAGS \
150N/A config.cache config.log pyconfig.h Modules/config.c
150N/A -rm -rf build platform
150N/A -rm -rf $(PYTHONFRAMEWORKDIR)
150N/A
150N/A# Make things extra clean, before making a distribution:
150N/A# remove all generated files, even Makefile[.pre]
150N/A# Keep configure and Python-ast.[ch], it's possible they can't be generated
150N/Adistclean: clobber
150N/A -rm -f core Makefile Makefile.pre config.status \
150N/A Modules/Setup Modules/Setup.local Modules/Setup.config
150N/A find $(srcdir) '(' -name '*.fdc' -o -name '*~' \
150N/A -o -name '[@,#]*' -o -name '*.old' \
150N/A -o -name '*.orig' -o -name '*.rej' \
150N/A -o -name '*.bak' ')' \
150N/A -exec rm -f {} ';'
150N/A
150N/A# Check for smelly exported symbols (not starting with Py/_Py)
150N/Asmelly: all
150N/A nm -p $(LIBRARY) | \
150N/A sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
150N/A
150N/A# Find files with funny names
150N/Afunny:
150N/A find $(DISTDIRS) -type d \
150N/A -o -name '*.[chs]' \
150N/A -o -name '*.py' \
150N/A -o -name '*.doc' \
150N/A -o -name '*.sty' \
150N/A -o -name '*.bib' \
150N/A -o -name '*.dat' \
150N/A -o -name '*.el' \
150N/A -o -name '*.fd' \
150N/A -o -name '*.in' \
150N/A -o -name '*.tex' \
150N/A -o -name '*,[vpt]' \
150N/A -o -name 'Setup' \
150N/A -o -name 'Setup.*' \
150N/A -o -name README \
150N/A -o -name Makefile \
150N/A -o -name ChangeLog \
150N/A -o -name Repository \
150N/A -o -name Root \
150N/A -o -name Entries \
150N/A -o -name Tag \
150N/A -o -name tags \
150N/A -o -name TAGS \
150N/A -o -name .cvsignore \
150N/A -o -name MANIFEST \
150N/A -o -print
150N/A
150N/A# Perform some verification checks on any modified files.
150N/Apatchcheck:
150N/A $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
150N/A
150N/A# Dependencies
150N/A
150N/APython/thread.o: $(srcdir)/Python/thread_atheos.h $(srcdir)/Python/thread_beos.h $(srcdir)/Python/thread_cthread.h $(srcdir)/Python/thread_foobar.h $(srcdir)/Python/thread_lwp.h $(srcdir)/Python/thread_nt.h $(srcdir)/Python/thread_os2.h $(srcdir)/Python/thread_pth.h $(srcdir)/Python/thread_pthread.h $(srcdir)/Python/thread_sgi.h $(srcdir)/Python/thread_solaris.h $(srcdir)/Python/thread_wince.h
150N/A
150N/A# Declare targets that aren't real files
150N/A.PHONY: all build_all sharedmods oldsharedmods test quicktest memtest
150N/A.PHONY: install altinstall oldsharedinstall bininstall altbininstall
150N/A.PHONY: maninstall libinstall inclinstall libainstall sharedinstall
150N/A.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
150N/A.PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
150N/A.PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
150N/A.PHONY: smelly funny patchcheck
150N/A
150N/A# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
150N/A
150N/A# Rules appended by makedepend
150N/A
150N/AModules/threadmodule.o: $(srcdir)/Modules/threadmodule.c; $(CC) $(PY_CFLAGS) -c $(srcdir)/Modules/threadmodule.c -o Modules/threadmodule.o
150N/AModules/threadmodule$(SO): Modules/threadmodule.o; $(BLDSHARED) Modules/threadmodule.o -o Modules/threadmodule$(SO)
150N/AModules/signalmodule.o: $(srcdir)/Modules/signalmodule.c; $(CC) $(PY_CFLAGS) -c $(srcdir)/Modules/signalmodule.c -o Modules/signalmodule.o
150N/AModules/signalmodule$(SO): Modules/signalmodule.o; $(BLDSHARED) Modules/signalmodule.o -o Modules/signalmodule$(SO)
150N/AModules/posixmodule.o: $(srcdir)/Modules/posixmodule.c; $(CC) $(PY_CFLAGS) -c $(srcdir)/Modules/posixmodule.c -o Modules/posixmodule.o
150N/AModules/posixmodule$(SO): Modules/posixmodule.o; $(BLDSHARED) Modules/posixmodule.o -o Modules/posixmodule$(SO)
150N/AModules/errnomodule.o: $(srcdir)/Modules/errnomodule.c; $(CC) $(PY_CFLAGS) -c $(srcdir)/Modules/errnomodule.c -o Modules/errnomodule.o
150N/AModules/errnomodule$(SO): Modules/errnomodule.o; $(BLDSHARED) Modules/errnomodule.o -o Modules/errnomodule$(SO)
150N/AModules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c; $(CC) $(PY_CFLAGS) -c $(srcdir)/Modules/pwdmodule.c -o Modules/pwdmodule.o
150N/AModules/pwdmodule$(SO): Modules/pwdmodule.o; $(BLDSHARED) Modules/pwdmodule.o -o Modules/pwdmodule$(SO)
150N/AModules/_sre.o: $(srcdir)/Modules/_sre.c; $(CC) $(PY_CFLAGS) -c $(srcdir)/Modules/_sre.c -o Modules/_sre.o
150N/AModules/_sre$(SO): Modules/_sre.o; $(BLDSHARED) Modules/_sre.o -o Modules/_sre$(SO)
150N/AModules/_codecsmodule.o: $(srcdir)/Modules/_codecsmodule.c; $(CC) $(PY_CFLAGS) -c $(srcdir)/Modules/_codecsmodule.c -o Modules/_codecsmodule.o
150N/AModules/_codecsmodule$(SO): Modules/_codecsmodule.o; $(BLDSHARED) Modules/_codecsmodule.o -o Modules/_codecsmodule$(SO)
150N/AModules/zipimport.o: $(srcdir)/Modules/zipimport.c; $(CC) $(PY_CFLAGS) -c $(srcdir)/Modules/zipimport.c -o Modules/zipimport.o
150N/AModules/zipimport$(SO): Modules/zipimport.o; $(BLDSHARED) Modules/zipimport.o -o Modules/zipimport$(SO)
150N/AModules/symtablemodule.o: $(srcdir)/Modules/symtablemodule.c; $(CC) $(PY_CFLAGS) -c $(srcdir)/Modules/symtablemodule.c -o Modules/symtablemodule.o
150N/AModules/_symtablemodule$(SO): Modules/symtablemodule.o; $(BLDSHARED) Modules/symtablemodule.o -o Modules/_symtablemodule$(SO)
150N/AModules/xxsubtype.o: $(srcdir)/Modules/xxsubtype.c; $(CC) $(PY_CFLAGS) -c $(srcdir)/Modules/xxsubtype.c -o Modules/xxsubtype.o
150N/AModules/xxsubtype$(SO): Modules/xxsubtype.o; $(BLDSHARED) Modules/xxsubtype.o -o Modules/xxsubtype$(SO)