Adapted to the new build system.

This commit is contained in:
Guido van Rossum 1997-07-19 22:52:43 +00:00
parent ded2e207f4
commit bef03ae032

View file

@ -4,7 +4,7 @@
# Short Instructions # Short Instructions
# ------------------ # ------------------
# 1. Build and install Python (1.4 or newer). # 1. Build and install Python (1.5 or newer).
# 2. "make -f Makefile.pre.in boot" # 2. "make -f Makefile.pre.in boot"
# 3. "make" # 3. "make"
# You should now have a shared library. # You should now have a shared library.
@ -12,8 +12,9 @@
# Long Instructions # Long Instructions
# ----------------- # -----------------
# Build *and install* the basic Python 1.4 distribution. See the # Build *and install* the basic Python 1.5 distribution. See the
# Python README for instructions. # Python README for instructions. (This version of Makefile.pre.in
# only withs with Python 1.5, alpha 3 or newer.)
# Create a file Setup.in for your extension. This file follows the # Create a file Setup.in for your extension. This file follows the
# format of the Modules/Setup.in file; see the instructions there. # format of the Modules/Setup.in file; see the instructions there.
@ -46,7 +47,7 @@
# config.c, incorporating the values for sys.prefix, sys.exec_prefix # config.c, incorporating the values for sys.prefix, sys.exec_prefix
# and sys.version from the installed Python binary. For this to work, # and sys.version from the installed Python binary. For this to work,
# the python binary must be on your path. If this fails, try # the python binary must be on your path. If this fails, try
# make -f Makefile.pre.in Makefile VERSION=1.4 installdir=<prefix> # make -f Makefile.pre.in Makefile VERSION=1.5 installdir=<prefix>
# where <prefix> is the prefix used to install Python for installdir # where <prefix> is the prefix used to install Python for installdir
# (and possibly similar for exec_installdir=<exec_prefix>). # (and possibly similar for exec_installdir=<exec_prefix>).
@ -151,10 +152,7 @@ LIBP= $(exec_installdir)/lib/python$(VERSION)
LIBPL= $(LIBP)/config LIBPL= $(LIBP)/config
PYTHONLIBS= $(LIBPL)/libModules.a \ PYTHONLIBS= $(LIBPL)/libpython$(VERSION).a
$(LIBPL)/libPython.a \
$(LIBPL)/libObjects.a \
$(LIBPL)/libParser.a
MAKESETUP= $(LIBPL)/makesetup MAKESETUP= $(LIBPL)/makesetup
MAKEFILE= $(LIBPL)/Makefile MAKEFILE= $(LIBPL)/Makefile
@ -164,7 +162,7 @@ SETUP= $(LIBPL)/Setup
SYSLIBS= $(LIBM) $(LIBC) SYSLIBS= $(LIBM) $(LIBC)
ADDOBJS= $(LIBPL)/main.o getpath.o config.o ADDOBJS= $(LIBPL)/python.o config.o
# === Fixed rules === # === Fixed rules ===
@ -179,23 +177,16 @@ sharedmods: $(SHAREDMODS)
# Build a static Python binary containing our extension modules # Build a static Python binary containing our extension modules
static: $(TARGET) static: $(TARGET)
$(TARGET): $(ADDOBJS) lib.a $(PYTHONLIBS) Makefile $(BASELIB) buildno $(TARGET): $(ADDOBJS) lib.a $(PYTHONLIBS) Makefile $(BASELIB)
expr `cat buildno` + 1 >@buildno $(CC) $(LDFLAGS) $(ADDOBJS) lib.a $(PYTHONLIBS) \
mv @buildno buildno
$(CC) -c $(CFLAGS) -DBUILD=`cat buildno` $(LIBPL)/getbuildinfo.c
$(CC) $(LDFLAGS) $(ADDOBJS) getbuildinfo.o lib.a $(PYTHONLIBS) \
$(LINKPATH) $(BASELIB) $(MODLIBS) $(LIBS) $(SYSLIBS) \ $(LINKPATH) $(BASELIB) $(MODLIBS) $(LIBS) $(SYSLIBS) \
-o $(TARGET) -o $(TARGET)
buildno:
echo 0 >buildno
# Build the library containing our extension modules # Build the library containing our extension modules
lib.a: $(MODOBJS) lib.a: $(MODOBJS)
-rm -f lib.a -rm -f lib.a
ar cr lib.a $(MODOBJS) ar cr lib.a $(MODOBJS)
-$(RANLIB) lib.a || \ -$(RANLIB) lib.a
echo "don't worry if ranlib fails -- probably SYSV or equiv"
# This runs makesetup *twice* to use the BASESETUP definition from Setup # This runs makesetup *twice* to use the BASESETUP definition from Setup
config.c Makefile: Makefile.pre Setup $(BASESETUP) $(MAKESETUP) config.c Makefile: Makefile.pre Setup $(BASESETUP) $(MAKESETUP)
@ -212,10 +203,6 @@ do-it-again:
config.o: config.c config.o: config.c
$(CC) $(CFLAGS) -c config.c $(CC) $(CFLAGS) -c config.c
# Make our own private getpath.o from the installed source and our PYTHONPATH
getpath.o: $(LIBPL)/getpath.c Makefile
$(CC) $(CFLAGS) -DPYTHONPATH=\"$(PYTHONPATH)\" -c $(LIBPL)/getpath.c
# Setup is copied from Setup.in *only* if it doesn't yet exist # Setup is copied from Setup.in *only* if it doesn't yet exist
Setup: Setup:
cp $(srcdir)/Setup.in Setup cp $(srcdir)/Setup.in Setup