Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bef03ae

Browse files
committed
Adapted to the new build system.
1 parent ded2e20 commit bef03ae

1 file changed

Lines changed: 10 additions & 23 deletions

File tree

Misc/Makefile.pre.in

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44
# Short Instructions
55
# ------------------
66

7-
# 1. Build and install Python (1.4 or newer).
7+
# 1. Build and install Python (1.5 or newer).
88
# 2. "make -f Makefile.pre.in boot"
99
# 3. "make"
1010
# You should now have a shared library.
1111

1212
# Long Instructions
1313
# -----------------
1414

15-
# Build *and install* the basic Python 1.4 distribution. See the
16-
# Python README for instructions.
15+
# Build *and install* the basic Python 1.5 distribution. See the
16+
# Python README for instructions. (This version of Makefile.pre.in
17+
# only withs with Python 1.5, alpha 3 or newer.)
1718

1819
# Create a file Setup.in for your extension. This file follows the
1920
# format of the Modules/Setup.in file; see the instructions there.
@@ -46,7 +47,7 @@
4647
# config.c, incorporating the values for sys.prefix, sys.exec_prefix
4748
# and sys.version from the installed Python binary. For this to work,
4849
# the python binary must be on your path. If this fails, try
49-
# make -f Makefile.pre.in Makefile VERSION=1.4 installdir=<prefix>
50+
# make -f Makefile.pre.in Makefile VERSION=1.5 installdir=<prefix>
5051
# where <prefix> is the prefix used to install Python for installdir
5152
# (and possibly similar for exec_installdir=<exec_prefix>).
5253

@@ -151,10 +152,7 @@ LIBP= $(exec_installdir)/lib/python$(VERSION)
151152

152153
LIBPL= $(LIBP)/config
153154

154-
PYTHONLIBS= $(LIBPL)/libModules.a \
155-
$(LIBPL)/libPython.a \
156-
$(LIBPL)/libObjects.a \
157-
$(LIBPL)/libParser.a
155+
PYTHONLIBS= $(LIBPL)/libpython$(VERSION).a
158156

159157
MAKESETUP= $(LIBPL)/makesetup
160158
MAKEFILE= $(LIBPL)/Makefile
@@ -164,7 +162,7 @@ SETUP= $(LIBPL)/Setup
164162

165163
SYSLIBS= $(LIBM) $(LIBC)
166164

167-
ADDOBJS= $(LIBPL)/main.o getpath.o config.o
165+
ADDOBJS= $(LIBPL)/python.o config.o
168166

169167
# === Fixed rules ===
170168

@@ -179,23 +177,16 @@ sharedmods: $(SHAREDMODS)
179177

180178
# Build a static Python binary containing our extension modules
181179
static: $(TARGET)
182-
$(TARGET): $(ADDOBJS) lib.a $(PYTHONLIBS) Makefile $(BASELIB) buildno
183-
expr `cat buildno` + 1 >@buildno
184-
mv @buildno buildno
185-
$(CC) -c $(CFLAGS) -DBUILD=`cat buildno` $(LIBPL)/getbuildinfo.c
186-
$(CC) $(LDFLAGS) $(ADDOBJS) getbuildinfo.o lib.a $(PYTHONLIBS) \
180+
$(TARGET): $(ADDOBJS) lib.a $(PYTHONLIBS) Makefile $(BASELIB)
181+
$(CC) $(LDFLAGS) $(ADDOBJS) lib.a $(PYTHONLIBS) \
187182
$(LINKPATH) $(BASELIB) $(MODLIBS) $(LIBS) $(SYSLIBS) \
188183
-o $(TARGET)
189184

190-
buildno:
191-
echo 0 >buildno
192-
193185
# Build the library containing our extension modules
194186
lib.a: $(MODOBJS)
195187
-rm -f lib.a
196188
ar cr lib.a $(MODOBJS)
197-
-$(RANLIB) lib.a || \
198-
echo "don't worry if ranlib fails -- probably SYSV or equiv"
189+
-$(RANLIB) lib.a
199190

200191
# This runs makesetup *twice* to use the BASESETUP definition from Setup
201192
config.c Makefile: Makefile.pre Setup $(BASESETUP) $(MAKESETUP)
@@ -212,10 +203,6 @@ do-it-again:
212203
config.o: config.c
213204
$(CC) $(CFLAGS) -c config.c
214205

215-
# Make our own private getpath.o from the installed source and our PYTHONPATH
216-
getpath.o: $(LIBPL)/getpath.c Makefile
217-
$(CC) $(CFLAGS) -DPYTHONPATH=\"$(PYTHONPATH)\" -c $(LIBPL)/getpath.c
218-
219206
# Setup is copied from Setup.in *only* if it doesn't yet exist
220207
Setup:
221208
cp $(srcdir)/Setup.in Setup

0 commit comments

Comments
 (0)