1996-05-28 19:49:08 -03:00
|
|
|
# Top-level Makefile for Python
|
|
|
|
#
|
|
|
|
# As distributed, this file is called Makefile.in; it is processed
|
|
|
|
# into the real Makefile by running the script ./configure, which
|
|
|
|
# replaces things like @spam@ with values appropriate for your system.
|
|
|
|
# This means that if you edit Makefile, your changes get lost the next
|
|
|
|
# time you run the configure script. Ideally, you can do:
|
|
|
|
#
|
|
|
|
# ./configure
|
|
|
|
# make
|
|
|
|
# make test
|
|
|
|
# make install
|
|
|
|
#
|
|
|
|
# The top-level Makefile invokes make recursively in a number of
|
|
|
|
# subdirectories (see the SUBDIRS variable below). If you want to,
|
|
|
|
# you can invoke make in individual subdirectories. However, the
|
|
|
|
# sub-Makefiles are also generated by configure, and the quickest way
|
|
|
|
# to make sure they are up to date is by running make (or "make
|
|
|
|
# Makefiles") at the top level. This is particularly important for
|
|
|
|
# Modules/Makefile, which has to be regenerated every time you edit
|
|
|
|
# Modules/Setup. The python executable is built in the Modules
|
|
|
|
# directory and then moved to the top-level directory. The recursive
|
|
|
|
# makes pass three options to subordinate makes: OPT (a quick way to
|
1996-07-30 15:04:22 -03:00
|
|
|
# change some compiler options; it usually defaults to -O), prefix and
|
1996-05-28 19:49:08 -03:00
|
|
|
# exec_prefix (the installation paths).
|
|
|
|
#
|
1996-07-30 15:04:22 -03:00
|
|
|
# If you have a previous version of Python installed that you don't
|
|
|
|
# want to overwrite, you can use "make altinstall" instead of "make
|
|
|
|
# install". This changes the install procedure so it installs the
|
|
|
|
# Python binary as "python<version>". The libraries and include files
|
|
|
|
# are always installed in a subdirectory called "python<version>".
|
|
|
|
# "make altinstall" does not install the manual page. If you want to
|
|
|
|
# make this installation the "official" installation but want to keep
|
|
|
|
# the old binary around "just in case", rename the installed python
|
|
|
|
# binary to "python<oldversion>" before running "make install".
|
|
|
|
# (This only works between different versions, e.g. 1.3 and 1.4 --
|
|
|
|
# different betas of the same version will overwrite each other in
|
|
|
|
# installation unless you override the VERSION Make variable.)
|
|
|
|
#
|
1996-07-30 17:42:12 -03:00
|
|
|
# In fact, "make install" or "make bininstall" installs the binary
|
|
|
|
# as python<version> and makes a hard link to python, so when
|
|
|
|
# installing a new version in the future, nothing of the current
|
|
|
|
# version will be lost (except for the man page).
|
|
|
|
#
|
1996-05-28 19:49:08 -03:00
|
|
|
# If recursive makes fail, try invoking make as "make MAKE=make".
|
|
|
|
#
|
|
|
|
# See also the section "Build instructions" in the README file.
|
1993-12-24 06:39:16 -04:00
|
|
|
|
1994-08-01 09:07:07 -03:00
|
|
|
# Substitutions by configure
|
1997-07-19 16:38:43 -03:00
|
|
|
VERSION= @VERSION@
|
1994-08-01 09:07:07 -03:00
|
|
|
srcdir= @srcdir@
|
|
|
|
VPATH= @srcdir@
|
1997-07-25 19:34:08 -03:00
|
|
|
CC= @CC@
|
1997-08-19 11:40:11 -03:00
|
|
|
AR= @AR@
|
1994-10-10 14:58:27 -03:00
|
|
|
RANLIB= @RANLIB@
|
1997-07-25 19:34:08 -03:00
|
|
|
DEFS= @DEFS@
|
1994-08-01 09:07:07 -03:00
|
|
|
|
1994-09-12 07:56:06 -03:00
|
|
|
# Machine-dependent subdirectories
|
|
|
|
MACHDEP= @MACHDEP@
|
|
|
|
|
1994-08-01 09:07:07 -03:00
|
|
|
# Install prefix for architecture-independent files
|
1995-01-02 14:33:54 -04:00
|
|
|
prefix= @prefix@
|
1994-08-01 09:07:07 -03:00
|
|
|
|
|
|
|
# Install prefix for architecture-dependent files
|
1995-01-02 14:33:54 -04:00
|
|
|
exec_prefix= @exec_prefix@
|
1994-08-01 09:07:07 -03:00
|
|
|
|
1994-10-20 19:04:30 -03:00
|
|
|
# Expanded directories
|
1996-07-30 15:04:22 -03:00
|
|
|
BINDIR= $(exec_prefix)/bin
|
|
|
|
LIBDIR= $(exec_prefix)/lib
|
|
|
|
MANDIR= $(prefix)/man
|
|
|
|
INCLUDEDIR= $(prefix)/include
|
1997-09-11 11:37:59 -03:00
|
|
|
CONFINCLUDEDIR= $(exec_prefix)/include
|
1996-07-30 15:04:22 -03:00
|
|
|
SCRIPTDIR= $(prefix)/lib
|
1994-10-20 19:04:30 -03:00
|
|
|
|
1996-07-31 14:30:37 -03:00
|
|
|
# Detailed destination directories
|
|
|
|
BINLIBDEST= $(LIBDIR)/python$(VERSION)
|
|
|
|
LIBDEST= $(SCRIPTDIR)/python$(VERSION)
|
|
|
|
INCLUDEPY= $(INCLUDEDIR)/python$(VERSION)
|
1997-09-11 11:37:59 -03:00
|
|
|
CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION)
|
1996-07-31 14:30:37 -03:00
|
|
|
LIBP= $(LIBDIR)/python$(VERSION)
|
|
|
|
|
1994-09-12 07:56:06 -03:00
|
|
|
# Symbols used for using shared libraries
|
|
|
|
SO= @SO@
|
|
|
|
LDSHARED= @LDSHARED@
|
|
|
|
CCSHARED= @CCSHARED@
|
|
|
|
LINKFORSHARED= @LINKFORSHARED@
|
1997-10-20 20:16:32 -03:00
|
|
|
DESTSHARED= $(BINLIBDEST)/lib-dynload
|
1994-09-12 07:56:06 -03:00
|
|
|
|
1996-05-28 19:49:08 -03:00
|
|
|
# Shell used by make (some versions default to the login shell, which is bad)
|
1994-08-01 09:07:07 -03:00
|
|
|
SHELL= /bin/sh
|
|
|
|
|
1997-11-11 14:29:22 -04:00
|
|
|
# Use ``EXE=.exe'' for Unix emulations on DOS/Windows (e.g. GNUWIN32)
|
|
|
|
EXE=
|
|
|
|
|
1997-12-02 13:52:37 -04:00
|
|
|
# Modes for directories, executables and data files created by the
|
2000-08-29 12:00:11 -03:00
|
|
|
# install process. Default to user-only-writable for all file types.
|
|
|
|
DIRMODE= 755
|
1997-12-02 13:52:37 -04:00
|
|
|
EXEMODE= 755
|
|
|
|
FILEMODE= 644
|
|
|
|
|
1996-05-28 19:49:08 -03:00
|
|
|
# Portable install script (configure doesn't always guess right)
|
|
|
|
INSTALL= @srcdir@/install-sh -c
|
1997-12-02 13:52:37 -04:00
|
|
|
INSTALL_PROGRAM=${INSTALL} -m $(EXEMODE)
|
|
|
|
INSTALL_DATA= ${INSTALL} -m $(FILEMODE)
|
1996-05-28 19:49:08 -03:00
|
|
|
|
1998-08-04 14:59:56 -03:00
|
|
|
# Use this to make a link between python$(VERSION) and python in $(BINDIR)
|
|
|
|
LN=@LN@
|
|
|
|
|
1994-08-01 09:07:07 -03:00
|
|
|
# --with-PACKAGE options for configure script
|
|
|
|
# e.g. --with-readline --with-svr5 --with-solaris --with-thread
|
|
|
|
# (see README for an explanation)
|
|
|
|
WITH=
|
|
|
|
|
|
|
|
# Compiler options passed to subordinate makes
|
1994-08-19 12:33:54 -03:00
|
|
|
OPT= @OPT@
|
1994-08-01 09:07:07 -03:00
|
|
|
|
|
|
|
# Subdirectories where to run make recursively
|
2000-08-11 19:26:35 -03:00
|
|
|
SUBDIRS= Parser Grammar Objects Python Modules
|
1994-08-01 09:07:07 -03:00
|
|
|
|
|
|
|
# Other subdirectories
|
2000-08-11 19:26:35 -03:00
|
|
|
SUBDIRSTOO= Include Lib Misc Demo
|
1994-08-01 09:07:07 -03:00
|
|
|
|
|
|
|
# Files and directories to be distributed
|
|
|
|
CONFIGFILES= configure configure.in acconfig.h config.h.in Makefile.in
|
|
|
|
DISTFILES= README ChangeLog $(CONFIGFILES)
|
|
|
|
DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
|
|
|
|
DIST= $(DISTFILES) $(DISTDIRS)
|
|
|
|
|
1997-07-25 19:34:08 -03:00
|
|
|
# Compilation flags for getbuildinfo.c only
|
|
|
|
CFLAGS= $(OPT) -I. $(DEFS)
|
|
|
|
|
1997-07-19 16:38:43 -03:00
|
|
|
LIBRARY= libpython$(VERSION).a
|
1999-01-27 13:53:11 -04:00
|
|
|
LDLIBRARY= @LDLIBRARY@
|
1997-07-19 16:38:43 -03:00
|
|
|
|
1994-08-01 09:07:07 -03:00
|
|
|
# Default target
|
1999-02-23 11:43:15 -04:00
|
|
|
all: $(LIBRARY) python$(EXE) sharedmods
|
1994-08-01 09:07:07 -03:00
|
|
|
|
|
|
|
# Build the interpreter
|
1999-02-23 11:43:15 -04:00
|
|
|
python$(EXE): $(LIBRARY) buildno Modules/python.o
|
1997-08-20 19:13:15 -03:00
|
|
|
expr `cat buildno` + 1 >buildno1
|
|
|
|
mv -f buildno1 buildno
|
1997-07-25 19:34:08 -03:00
|
|
|
$(CC) -c $(CFLAGS) -DBUILD=`cat buildno` \
|
|
|
|
$(srcdir)/Modules/getbuildinfo.c
|
|
|
|
$(AR) cr $(LIBRARY) getbuildinfo.o
|
|
|
|
$(RANLIB) $(LIBRARY)
|
1999-01-27 13:53:11 -04:00
|
|
|
@MAKE_LDLIBRARY@
|
1997-07-19 16:38:43 -03:00
|
|
|
cd Modules; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
|
|
|
|
prefix="$(prefix)" exec_prefix="$(exec_prefix)" \
|
1999-01-27 13:53:11 -04:00
|
|
|
LIBRARY=../$(LDLIBRARY) link
|
1997-07-19 16:38:43 -03:00
|
|
|
|
1998-10-01 13:42:41 -03:00
|
|
|
Modules/python.o: $(srcdir)/Modules/python.c
|
|
|
|
cd Modules; $(MAKE) OPT="$(OPT)" python.o
|
|
|
|
|
1997-07-25 19:34:08 -03:00
|
|
|
buildno:
|
|
|
|
echo 0 >buildno
|
|
|
|
|
1997-08-18 11:22:24 -03:00
|
|
|
# Build the shared modules
|
1999-02-23 11:43:15 -04:00
|
|
|
sharedmods: python$(EXE)
|
1997-08-18 11:22:24 -03:00
|
|
|
cd Modules; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
|
|
|
|
prefix="$(prefix)" exec_prefix="$(exec_prefix)" \
|
|
|
|
sharedmods
|
|
|
|
|
1997-07-19 16:38:43 -03:00
|
|
|
# Build the library
|
|
|
|
$(LIBRARY): $(SUBDIRS)
|
|
|
|
if test ! -f $(LIBRARY); \
|
|
|
|
then for i in $(SUBDIRS); do rm -f $$i/add2lib; done; true; \
|
|
|
|
else true; fi
|
|
|
|
for i in $(SUBDIRS); do \
|
|
|
|
(cd $$i; $(MAKE) VERSION="$(VERSION)" add2lib); done
|
1997-04-23 12:14:24 -03:00
|
|
|
|
1997-12-18 19:55:32 -04:00
|
|
|
# This rule is only here for DG/UX!!!
|
|
|
|
libpython$(VERSION).so: $(LIBRARY)
|
1999-02-23 11:43:15 -04:00
|
|
|
case `uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'` in \
|
|
|
|
*dgux*) \
|
|
|
|
test -d dgux || mkdir dgux; \
|
|
|
|
(cd dgux;ar x ../$^;ld -G -o ../$@ * ); \
|
|
|
|
/bin/rm -rf ./dgux \
|
|
|
|
;; \
|
|
|
|
esac
|
1997-12-18 19:55:32 -04:00
|
|
|
|
1999-01-27 13:53:11 -04:00
|
|
|
# This rule is here for OPENSTEP/Rhapsody/MacOSX
|
|
|
|
libpython$(VERSION).dylib: $(LIBRARY)
|
|
|
|
libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) -framework System @LIBTOOL_CRUFT@
|
|
|
|
|
1997-04-23 12:14:24 -03:00
|
|
|
$(SUBDIRS): Makefiles
|
|
|
|
|
2000-08-11 19:26:35 -03:00
|
|
|
Grammar:
|
2000-08-17 08:38:18 -03:00
|
|
|
cd Grammar ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
|
2000-08-11 19:26:35 -03:00
|
|
|
prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
|
|
|
|
|
1997-04-23 12:14:24 -03:00
|
|
|
Parser:
|
|
|
|
cd Parser ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
|
|
|
|
prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
|
|
|
|
|
|
|
|
Python:
|
|
|
|
cd Python ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
|
|
|
|
prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
|
|
|
|
|
|
|
|
Objects:
|
|
|
|
cd Objects ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
|
|
|
|
prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
|
|
|
|
|
1997-07-19 16:38:43 -03:00
|
|
|
Modules: Parser Python Objects
|
1997-04-23 12:14:24 -03:00
|
|
|
cd Modules ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
|
|
|
|
prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
|
1994-08-01 09:07:07 -03:00
|
|
|
|
|
|
|
# Test the interpreter (twice, once without .pyc files, once with)
|
2000-08-03 12:52:30 -03:00
|
|
|
TESTOPTS= -l
|
1997-01-03 11:54:36 -04:00
|
|
|
TESTPROG= $(srcdir)/Lib/test/regrtest.py
|
2000-02-10 13:23:44 -04:00
|
|
|
TESTPYTHON= ./python$(EXE) -tt
|
1999-11-16 11:58:32 -04:00
|
|
|
test: all
|
1997-10-20 20:16:32 -03:00
|
|
|
-rm -f $(srcdir)/Lib/test/*.py[co]
|
1997-08-29 18:52:14 -03:00
|
|
|
-PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
|
|
|
|
PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
|
1994-08-01 09:07:07 -03:00
|
|
|
|
1996-05-28 19:49:08 -03:00
|
|
|
# Install everything
|
1996-07-30 18:41:56 -03:00
|
|
|
install: altinstall bininstall maninstall
|
1996-05-28 19:49:08 -03:00
|
|
|
|
1996-07-30 17:42:12 -03:00
|
|
|
# Install almost everything without disturbing previous versions
|
1996-07-30 15:04:22 -03:00
|
|
|
altinstall: altbininstall libinstall inclinstall libainstall sharedinstall
|
1996-07-23 23:35:43 -03:00
|
|
|
|
1996-07-30 17:42:12 -03:00
|
|
|
# Install the interpreter (by creating a hard link to python$(VERSION))
|
|
|
|
bininstall: altbininstall
|
1999-02-23 11:43:15 -04:00
|
|
|
-if test -f $(BINDIR)/python$(EXE); \
|
|
|
|
then rm -f $(BINDIR)/python$(EXE); \
|
1996-07-30 17:42:12 -03:00
|
|
|
else true; \
|
|
|
|
fi
|
1998-08-04 14:59:56 -03:00
|
|
|
(cd $(BINDIR); $(LN) python$(VERSION)$(EXE) python$(EXE))
|
1994-08-01 09:07:07 -03:00
|
|
|
|
1996-07-23 23:35:43 -03:00
|
|
|
# Install the interpreter with $(VERSION) affixed
|
1996-07-30 17:42:12 -03:00
|
|
|
# This goes into $(exec_prefix)
|
1999-02-23 11:43:15 -04:00
|
|
|
altbininstall: python$(EXE)
|
1996-07-23 23:35:43 -03:00
|
|
|
@for i in $(BINDIR); \
|
|
|
|
do \
|
|
|
|
if test ! -d $$i; then \
|
|
|
|
echo "Creating directory $$i"; \
|
|
|
|
mkdir $$i; \
|
1997-12-02 13:52:37 -04:00
|
|
|
chmod $(DIRMODE) $$i; \
|
1996-07-23 23:35:43 -03:00
|
|
|
else true; \
|
|
|
|
fi; \
|
|
|
|
done
|
1997-11-11 14:29:22 -04:00
|
|
|
$(INSTALL_PROGRAM) python$(EXE) $(BINDIR)/python$(VERSION)$(EXE)
|
1997-12-19 19:02:22 -04:00
|
|
|
if test -f libpython$(VERSION).so; then \
|
|
|
|
$(INSTALL_DATA) libpython$(VERSION).so $(LIBDIR); \
|
|
|
|
else true; \
|
|
|
|
fi
|
1996-07-23 23:35:43 -03:00
|
|
|
|
1996-07-30 15:04:22 -03:00
|
|
|
# Install the manual page
|
|
|
|
maninstall:
|
|
|
|
@for i in $(MANDIR) $(MANDIR)/man1; \
|
1996-05-28 19:49:08 -03:00
|
|
|
do \
|
|
|
|
if test ! -d $$i; then \
|
|
|
|
echo "Creating directory $$i"; \
|
|
|
|
mkdir $$i; \
|
1997-12-02 13:52:37 -04:00
|
|
|
chmod $(DIRMODE) $$i; \
|
1996-05-28 19:49:08 -03:00
|
|
|
else true; \
|
|
|
|
fi; \
|
|
|
|
done
|
1996-07-30 15:04:22 -03:00
|
|
|
$(INSTALL_DATA) $(srcdir)/Misc/python.man \
|
|
|
|
$(MANDIR)/man1/python.1
|
1994-08-01 09:07:07 -03:00
|
|
|
|
1996-07-30 15:04:22 -03:00
|
|
|
# Install the library
|
1997-10-05 21:15:31 -03:00
|
|
|
PLATDIR= plat-$(MACHDEP)
|
|
|
|
MACHDEPS= $(PLATDIR)
|
2000-06-30 12:46:08 -03:00
|
|
|
XMLLIBSUBDIRS= xml xml/dom xml/parser xml/sax
|
2000-04-24 11:57:21 -03:00
|
|
|
LIBSUBDIRS= lib-old lib-tk site-packages test test/output encodings \
|
2000-06-30 12:46:08 -03:00
|
|
|
distutils distutils/command $(XMLLIBSUBDIRS) curses $(MACHDEPS)
|
1997-10-05 21:15:31 -03:00
|
|
|
libinstall: python $(srcdir)/Lib/$(PLATDIR)
|
1996-07-30 15:04:22 -03:00
|
|
|
@for i in $(SCRIPTDIR) $(LIBDEST); \
|
1996-05-28 19:49:08 -03:00
|
|
|
do \
|
|
|
|
if test ! -d $$i; then \
|
|
|
|
echo "Creating directory $$i"; \
|
|
|
|
mkdir $$i; \
|
1997-12-02 13:52:37 -04:00
|
|
|
chmod $(DIRMODE) $$i; \
|
1996-05-28 19:49:08 -03:00
|
|
|
else true; \
|
|
|
|
fi; \
|
|
|
|
done
|
1996-07-30 15:04:22 -03:00
|
|
|
@for d in $(LIBSUBDIRS); \
|
|
|
|
do \
|
|
|
|
a=$(srcdir)/Lib/$$d; \
|
|
|
|
if test ! -d $$a; then continue; else true; fi; \
|
|
|
|
b=$(LIBDEST)/$$d; \
|
|
|
|
if test ! -d $$b; then \
|
|
|
|
echo "Creating directory $$b"; \
|
|
|
|
mkdir $$b; \
|
1997-12-02 13:52:37 -04:00
|
|
|
chmod $(DIRMODE) $$b; \
|
1996-07-30 15:04:22 -03:00
|
|
|
else true; \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
@for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc; \
|
|
|
|
do \
|
|
|
|
if test -x $$i; then \
|
|
|
|
$(INSTALL_PROGRAM) $$i $(LIBDEST); \
|
|
|
|
echo $(INSTALL_PROGRAM) $$i $(LIBDEST); \
|
|
|
|
else \
|
|
|
|
$(INSTALL_DATA) $$i $(LIBDEST); \
|
|
|
|
echo $(INSTALL_DATA) $$i $(LIBDEST); \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
@for d in $(LIBSUBDIRS); \
|
|
|
|
do \
|
|
|
|
a=$(srcdir)/Lib/$$d; \
|
|
|
|
if test ! -d $$a; then continue; else true; fi; \
|
|
|
|
b=$(LIBDEST)/$$d; \
|
|
|
|
for i in $$a/*; \
|
|
|
|
do \
|
|
|
|
case $$i in \
|
|
|
|
*CVS) ;; \
|
1997-10-20 20:16:32 -03:00
|
|
|
*.py[co]) ;; \
|
2000-08-29 12:00:11 -03:00
|
|
|
*.orig) ;; \
|
1996-07-30 15:04:22 -03:00
|
|
|
*~) ;; \
|
|
|
|
*) \
|
1997-12-02 15:18:27 -04:00
|
|
|
if test -d $$i; then continue; fi; \
|
1996-07-30 15:04:22 -03:00
|
|
|
if test -x $$i; then \
|
|
|
|
echo $(INSTALL_PROGRAM) $$i $$b; \
|
|
|
|
$(INSTALL_PROGRAM) $$i $$b; \
|
|
|
|
else \
|
|
|
|
echo $(INSTALL_DATA) $$i $$b; \
|
|
|
|
$(INSTALL_DATA) $$i $$b; \
|
|
|
|
fi;; \
|
|
|
|
esac; \
|
|
|
|
done; \
|
|
|
|
done
|
|
|
|
PYTHONPATH=$(LIBDEST) \
|
2000-07-04 01:15:53 -03:00
|
|
|
./python$(EXE) -tt $(LIBDEST)/compileall.py $(LIBDEST)
|
1997-03-13 10:14:29 -04:00
|
|
|
PYTHONPATH=$(LIBDEST) \
|
1999-02-23 11:43:15 -04:00
|
|
|
./python$(EXE) -O $(LIBDEST)/compileall.py $(LIBDEST)
|
1994-08-01 09:07:07 -03:00
|
|
|
|
1997-10-05 21:15:31 -03:00
|
|
|
# Create the PLATDIR source directory, if one wasn't distributed..
|
|
|
|
$(srcdir)/Lib/$(PLATDIR):
|
|
|
|
mkdir $(srcdir)/Lib/$(PLATDIR)
|
|
|
|
cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
|
1996-09-10 15:21:32 -03:00
|
|
|
export PATH; PATH="`pwd`:$$PATH"; \
|
1996-08-28 16:23:01 -03:00
|
|
|
export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
|
1997-10-05 21:15:31 -03:00
|
|
|
cd $(srcdir)/Lib/$(PLATDIR); ./regen
|
1996-07-30 17:42:12 -03:00
|
|
|
|
1996-05-28 19:49:08 -03:00
|
|
|
# Install the include files
|
1997-09-11 11:37:59 -03:00
|
|
|
INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
|
1994-08-01 09:07:07 -03:00
|
|
|
inclinstall:
|
1997-09-11 11:37:59 -03:00
|
|
|
@for i in $(INCLDIRSTOMAKE); \
|
1996-05-28 19:49:08 -03:00
|
|
|
do \
|
|
|
|
if test ! -d $$i; then \
|
|
|
|
echo "Creating directory $$i"; \
|
|
|
|
mkdir $$i; \
|
1997-12-02 13:52:37 -04:00
|
|
|
chmod $(DIRMODE) $$i; \
|
1996-05-28 19:49:08 -03:00
|
|
|
else true; \
|
|
|
|
fi; \
|
|
|
|
done
|
1996-06-20 11:30:38 -03:00
|
|
|
@for i in $(srcdir)/Include/*.h; \
|
|
|
|
do \
|
|
|
|
echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
|
|
|
|
$(INSTALL_DATA) $$i $(INCLUDEPY); \
|
|
|
|
done
|
1997-09-11 11:37:59 -03:00
|
|
|
$(INSTALL_DATA) config.h $(CONFINCLUDEPY)/config.h
|
1994-08-01 09:07:07 -03:00
|
|
|
|
1997-07-19 16:38:43 -03:00
|
|
|
# Install the library and miscellaneous stuff needed for extending/embedding
|
1996-07-30 17:42:12 -03:00
|
|
|
# This goes into $(exec_prefix)
|
1996-07-30 15:04:22 -03:00
|
|
|
LIBPL= $(LIBP)/config
|
1994-08-01 09:07:07 -03:00
|
|
|
libainstall: all
|
1996-06-20 11:30:38 -03:00
|
|
|
@for i in $(LIBDIR) $(LIBP) $(LIBPL); \
|
1996-05-28 19:49:08 -03:00
|
|
|
do \
|
|
|
|
if test ! -d $$i; then \
|
|
|
|
echo "Creating directory $$i"; \
|
|
|
|
mkdir $$i; \
|
1997-12-02 13:52:37 -04:00
|
|
|
chmod $(DIRMODE) $$i; \
|
1996-05-28 19:49:08 -03:00
|
|
|
else true; \
|
|
|
|
fi; \
|
|
|
|
done
|
1999-01-12 16:30:23 -04:00
|
|
|
@if [ "$(MACHDEP)" != "beos" ] ; then \
|
|
|
|
$(INSTALL_DATA) $(LIBRARY) $(LIBPL)/$(LIBRARY) ; \
|
|
|
|
$(RANLIB) $(LIBPL)/$(LIBRARY) ; \
|
|
|
|
fi
|
1995-01-20 12:51:32 -04:00
|
|
|
$(INSTALL_DATA) Modules/config.c $(LIBPL)/config.c
|
1997-07-19 19:53:39 -03:00
|
|
|
$(INSTALL_DATA) Modules/python.o $(LIBPL)/python.o
|
1995-01-20 12:51:32 -04:00
|
|
|
$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(LIBPL)/config.c.in
|
|
|
|
$(INSTALL_DATA) Modules/Makefile $(LIBPL)/Makefile
|
|
|
|
$(INSTALL_DATA) Modules/Setup $(LIBPL)/Setup
|
1997-07-19 19:00:45 -03:00
|
|
|
$(INSTALL_DATA) Modules/Setup.local $(LIBPL)/Setup.local
|
2000-06-30 13:04:18 -03:00
|
|
|
$(INSTALL_DATA) Modules/Setup.config $(LIBPL)/Setup.config
|
1996-07-20 23:46:47 -03:00
|
|
|
$(INSTALL_PROGRAM) $(srcdir)/Modules/makesetup $(LIBPL)/makesetup
|
1997-10-04 01:35:24 -03:00
|
|
|
$(INSTALL_PROGRAM) $(srcdir)/install-sh $(LIBPL)/install-sh
|
1997-10-29 15:07:30 -04:00
|
|
|
$(INSTALL_DATA) $(srcdir)/Misc/Makefile.pre.in $(LIBPL)/Makefile.pre.in
|
1998-03-03 17:47:00 -04:00
|
|
|
@if [ -s Modules/python.exp -a \
|
1998-05-05 17:40:18 -03:00
|
|
|
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
|
1998-03-03 17:47:00 -04:00
|
|
|
echo; echo "Installing support files for building shared extension modules on AIX:"; \
|
|
|
|
$(INSTALL_DATA) Modules/python.exp \
|
|
|
|
$(LIBPL)/python.exp; \
|
|
|
|
echo; echo "$(LIBPL)/python.exp"; \
|
|
|
|
$(INSTALL_PROGRAM) $(srcdir)/Modules/makexp_aix \
|
|
|
|
$(LIBPL)/makexp_aix; \
|
|
|
|
echo "$(LIBPL)/makexp_aix"; \
|
|
|
|
$(INSTALL_PROGRAM) $(srcdir)/Modules/ld_so_aix \
|
|
|
|
$(LIBPL)/ld_so_aix; \
|
|
|
|
echo "$(LIBPL)/ld_so_aix"; \
|
|
|
|
echo; echo "See Misc/AIX-NOTES for details."; \
|
|
|
|
else true; \
|
|
|
|
fi
|
2000-08-31 19:02:46 -03:00
|
|
|
@if [ "$(MACHDEP)" = "beos" ] ; then \
|
2000-08-24 15:11:21 -03:00
|
|
|
echo; echo "Installing support files for building shared extension modules on BeOS:"; \
|
|
|
|
$(INSTALL_DATA) BeOS/README $(LIBPL)/README; \
|
|
|
|
echo; echo "$(LIBPL)/README"; \
|
|
|
|
$(INSTALL_DATA) BeOS/README.readline-2.2 $(LIBPL)/README.readline-2.2; \
|
|
|
|
echo "$(LIBPL)/README.readline-2.2"; \
|
|
|
|
$(INSTALL_DATA) BeOS/dl_export.h $(LIBPL)/dl_export.h; \
|
|
|
|
echo "$(LIBPL)/dl_export.h"; \
|
|
|
|
$(INSTALL_PROGRAM) BeOS/ar-fake $(LIBPL)/ar-fake; \
|
|
|
|
echo "$(LIBPL)/ar-fake"; \
|
|
|
|
$(INSTALL_PROGRAM) BeOS/linkcc $(LIBPL)/linkcc; \
|
|
|
|
echo "$(LIBPL)/linkcc"; \
|
|
|
|
$(INSTALL_PROGRAM) BeOS/linkmodule $(LIBPL)/linkmodule; \
|
|
|
|
echo "$(LIBPL)/linkmodule"; \
|
|
|
|
echo; echo "See BeOS/README for details."; \
|
|
|
|
else true; \
|
|
|
|
fi
|
1994-08-01 09:07:07 -03:00
|
|
|
|
1996-05-28 19:49:08 -03:00
|
|
|
# Install the dynamically loadable modules
|
1996-07-30 17:42:12 -03:00
|
|
|
# This goes into $(exec_prefix)
|
1994-09-12 07:56:06 -03:00
|
|
|
sharedinstall:
|
|
|
|
cd Modules; $(MAKE) \
|
|
|
|
OPT="$(OPT)" \
|
1996-07-30 15:04:22 -03:00
|
|
|
VERSION="$(VERSION)" \
|
1994-09-12 07:56:06 -03:00
|
|
|
SO="$(SO)" \
|
|
|
|
LDSHARED="$(LDSHARED)" \
|
|
|
|
CCSHARED="$(CCSHARED)" \
|
|
|
|
LINKFORSHARED="$(LINKFORSHARED)" \
|
|
|
|
DESTSHARED="$(DESTSHARED)" \
|
1996-07-23 23:35:43 -03:00
|
|
|
prefix="$(prefix)" \
|
|
|
|
exec_prefix="$(exec_prefix)" \
|
1994-09-12 07:56:06 -03:00
|
|
|
sharedinstall
|
|
|
|
|
1994-08-01 09:07:07 -03:00
|
|
|
# Build the sub-Makefiles
|
1995-01-17 12:45:08 -04:00
|
|
|
Makefiles: config.status Modules/Makefile.pre
|
1994-08-01 09:07:07 -03:00
|
|
|
(cd Modules; $(MAKE) -f Makefile.pre Makefile)
|
1996-06-20 11:30:38 -03:00
|
|
|
@for i in . $(SUBDIRS); do \
|
|
|
|
(echo making Makefile in subdirectory $$i; cd $$i; \
|
|
|
|
$(MAKE) Makefile); \
|
1993-12-28 15:39:56 -04:00
|
|
|
done
|
1998-10-07 19:51:56 -03:00
|
|
|
-(rm -f Modules/hassignal; cd Modules; $(MAKE) hassignal)
|
1993-12-28 15:39:56 -04:00
|
|
|
|
1995-01-17 12:45:08 -04:00
|
|
|
# Build the intermediate Makefile in Modules
|
|
|
|
Modules/Makefile.pre: config.status
|
|
|
|
$(SHELL) config.status
|
|
|
|
|
1994-08-01 09:07:07 -03:00
|
|
|
# Build the toplevel Makefile
|
|
|
|
Makefile: Makefile.in config.status
|
|
|
|
CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) config.status
|
|
|
|
|
|
|
|
# Run the configure script. If config.status already exists,
|
|
|
|
# call it with the --recheck argument, which reruns configure with the
|
|
|
|
# same options as it was run last time; otherwise run the configure
|
|
|
|
# script with options taken from the $(WITH) variable
|
|
|
|
config.status: $(srcdir)/configure
|
|
|
|
if test -f config.status; \
|
|
|
|
then $(SHELL) config.status --recheck; \
|
1995-01-12 08:26:50 -04:00
|
|
|
$(SHELL) config.status; \
|
1994-08-01 09:07:07 -03:00
|
|
|
else $(SHELL) $(srcdir)/configure $(WITH); \
|
|
|
|
fi
|
|
|
|
|
1999-02-23 11:43:15 -04:00
|
|
|
.PRECIOUS: config.status python$(EXE)
|
1993-12-28 15:39:56 -04:00
|
|
|
|
1994-08-01 09:07:07 -03:00
|
|
|
# Rerun configure with the same options as it was run last time,
|
|
|
|
# provided the config.status script exists
|
|
|
|
recheck:
|
|
|
|
$(SHELL) config.status --recheck
|
1995-01-04 15:02:35 -04:00
|
|
|
$(SHELL) config.status
|
1993-12-28 15:39:56 -04:00
|
|
|
|
1994-08-01 09:07:07 -03:00
|
|
|
# Rebuild the configure script from configure.in; also rebuild config.h.in
|
|
|
|
autoconf:
|
1996-06-28 17:15:41 -03:00
|
|
|
(cd $(srcdir); autoconf)
|
|
|
|
(cd $(srcdir); autoheader)
|
1994-08-01 09:07:07 -03:00
|
|
|
|
|
|
|
# Create a tags file for vi
|
|
|
|
tags::
|
2000-07-31 15:26:35 -03:00
|
|
|
cd $(srcdir); \
|
|
|
|
ctags -w -t Include/*.h; \
|
|
|
|
for i in $(SUBDIRS); do ctags -w -t -a $$i/*.[ch]; \
|
|
|
|
done; \
|
1994-08-01 09:07:07 -03:00
|
|
|
sort tags -o tags
|
|
|
|
|
|
|
|
# Create a tags file for GNU Emacs
|
|
|
|
TAGS::
|
2000-07-31 15:26:35 -03:00
|
|
|
cd $(srcdir); \
|
|
|
|
etags Include/*.h; \
|
1994-08-05 12:51:00 -03:00
|
|
|
for i in $(SUBDIRS); do etags -a $$i/*.[ch]; done
|
1994-08-01 09:07:07 -03:00
|
|
|
|
|
|
|
# Add dependencies to sub-Makefiles
|
1993-12-28 15:39:56 -04:00
|
|
|
depend:
|
1996-06-20 11:30:38 -03:00
|
|
|
@for i in $(SUBDIRS); do \
|
|
|
|
(echo making depend in subdirectory $$i; cd $$i; \
|
|
|
|
$(MAKE) depend); \
|
1993-12-28 15:39:56 -04:00
|
|
|
done
|
1993-12-24 06:39:16 -04:00
|
|
|
|
1994-08-01 09:07:07 -03:00
|
|
|
# Sanitation targets -- clean leaves libraries, executables and tags
|
|
|
|
# files, which clobber removes those as well
|
|
|
|
|
1993-12-24 06:39:16 -04:00
|
|
|
localclean:
|
|
|
|
-rm -f core *~ [@,#]* *.old *.orig *.rej
|
|
|
|
|
|
|
|
clean: localclean
|
|
|
|
-for i in $(SUBDIRS); do \
|
1998-05-19 18:15:03 -03:00
|
|
|
if test -d $$i; then \
|
1996-06-20 11:30:38 -03:00
|
|
|
(echo making clean in subdirectory $$i; cd $$i; \
|
1994-08-01 09:07:07 -03:00
|
|
|
if test -f Makefile; \
|
|
|
|
then $(MAKE) clean; \
|
|
|
|
else $(MAKE) -f Makefile.*in clean; \
|
|
|
|
fi); \
|
1998-05-19 18:15:03 -03:00
|
|
|
else true; fi; \
|
1993-12-24 06:39:16 -04:00
|
|
|
done
|
|
|
|
|
1993-12-28 15:39:56 -04:00
|
|
|
localclobber: localclean
|
1999-02-23 11:43:15 -04:00
|
|
|
-rm -f tags TAGS python$(EXE) $(LIBRARY) $(LDLIBRARY) *.o
|
1996-06-20 11:30:38 -03:00
|
|
|
-rm -f config.log config.cache config.h
|
1993-12-28 15:39:56 -04:00
|
|
|
|
|
|
|
clobber: localclobber
|
1993-12-24 06:39:16 -04:00
|
|
|
-for i in $(SUBDIRS); do \
|
1998-05-19 18:15:03 -03:00
|
|
|
if test -d $$i; then \
|
1996-06-20 11:30:38 -03:00
|
|
|
(echo clobbering subdirectory $$i; cd $$i; \
|
1994-08-01 09:07:07 -03:00
|
|
|
if test -f Makefile; \
|
|
|
|
then $(MAKE) clobber; \
|
1998-05-19 18:15:03 -03:00
|
|
|
else $(MAKE) -f $(srcdir)/Makefile*.in clobber; \
|
1994-08-01 09:07:07 -03:00
|
|
|
fi); \
|
1998-05-19 18:15:03 -03:00
|
|
|
else true; fi; \
|
1993-12-24 06:39:16 -04:00
|
|
|
done
|
|
|
|
|
1996-06-20 11:30:38 -03:00
|
|
|
# Make things extra clean, before making a distribution:
|
|
|
|
# remove all generated files, even Makefile[.pre]
|
1993-12-24 06:39:16 -04:00
|
|
|
distclean: clobber
|
1995-03-22 08:27:16 -04:00
|
|
|
-$(MAKE) -f $(srcdir)/Makefile.in \
|
|
|
|
SUBDIRS="$(SUBDIRSTOO)" clobber
|
1995-01-02 14:33:54 -04:00
|
|
|
-rm -f config.status config.log config.cache config.h Makefile
|
1997-08-29 15:42:35 -03:00
|
|
|
-rm -f buildno
|
1995-09-18 19:12:20 -03:00
|
|
|
-rm -f Modules/Makefile
|
1994-08-01 09:07:07 -03:00
|
|
|
-for i in $(SUBDIRS) $(SUBDIRSTOO); do \
|
|
|
|
for f in $$i/*.in; do \
|
|
|
|
f=`basename "$$f" .in`; \
|
|
|
|
if test "$$f" != "*"; then \
|
|
|
|
echo rm -f "$$i/$$f"; \
|
|
|
|
rm -f "$$i/$$f"; \
|
|
|
|
fi; \
|
|
|
|
done; \
|
1993-12-24 06:39:16 -04:00
|
|
|
done
|
|
|
|
|
1996-05-28 19:49:08 -03:00
|
|
|
# Check for smelly exported symbols (not starting with Py/_Py)
|
|
|
|
smelly: all
|
|
|
|
for i in $(SUBDIRS); do \
|
|
|
|
echo --- $$i ---; \
|
|
|
|
nm -p $$i/lib$$i.a | \
|
|
|
|
sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
|
|
|
|
done
|
|
|
|
|
1994-08-01 09:07:07 -03:00
|
|
|
# Find files with funny names
|
1996-06-20 11:30:38 -03:00
|
|
|
funny:
|
1994-08-01 09:07:07 -03:00
|
|
|
find $(DISTDIRS) -type d \
|
|
|
|
-o -name '*.[chs]' \
|
|
|
|
-o -name '*.py' \
|
|
|
|
-o -name '*.doc' \
|
|
|
|
-o -name '*.sty' \
|
|
|
|
-o -name '*.bib' \
|
|
|
|
-o -name '*.dat' \
|
|
|
|
-o -name '*.el' \
|
|
|
|
-o -name '*.fd' \
|
|
|
|
-o -name '*.in' \
|
|
|
|
-o -name '*.tex' \
|
|
|
|
-o -name '*,[vpt]' \
|
|
|
|
-o -name 'Setup' \
|
|
|
|
-o -name 'Setup.*' \
|
|
|
|
-o -name README \
|
|
|
|
-o -name Makefile \
|
|
|
|
-o -name ChangeLog \
|
|
|
|
-o -name Repository \
|
1996-06-20 11:30:38 -03:00
|
|
|
-o -name Root \
|
1994-08-01 09:07:07 -03:00
|
|
|
-o -name Entries \
|
|
|
|
-o -name Tag \
|
|
|
|
-o -name tags \
|
|
|
|
-o -name TAGS \
|
|
|
|
-o -name .cvsignore \
|
|
|
|
-o -name MANIFEST \
|
|
|
|
-o -print
|
2000-08-24 15:11:21 -03:00
|
|
|
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
|