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

Skip to content

Commit 717d1fd

Browse files
committed
1. Augment the DG/UX rule so it doesn't break the BeOS build.
2. Add $(EXE) to various occurrences of python so it will work on Cygwin with egcs (after setting EXE=.exe). These patches by Norman Vine.
1 parent 027188a commit 717d1fd

1 file changed

Lines changed: 19 additions & 15 deletions

File tree

Makefile.in

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,10 @@ LIBRARY= libpython$(VERSION).a
164164
LDLIBRARY= @LDLIBRARY@
165165

166166
# Default target
167-
all: $(LIBRARY) python sharedmods
167+
all: $(LIBRARY) python$(EXE) sharedmods
168168

169169
# Build the interpreter
170-
python: $(LIBRARY) buildno Modules/python.o
170+
python$(EXE): $(LIBRARY) buildno Modules/python.o
171171
expr `cat buildno` + 1 >buildno1
172172
mv -f buildno1 buildno
173173
$(CC) -c $(CFLAGS) -DBUILD=`cat buildno` \
@@ -186,7 +186,7 @@ buildno:
186186
echo 0 >buildno
187187

188188
# Build the shared modules
189-
sharedmods: python
189+
sharedmods: python$(EXE)
190190
cd Modules; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
191191
prefix="$(prefix)" exec_prefix="$(exec_prefix)" \
192192
sharedmods
@@ -201,9 +201,13 @@ $(LIBRARY): $(SUBDIRS)
201201

202202
# This rule is only here for DG/UX!!!
203203
libpython$(VERSION).so: $(LIBRARY)
204-
test -d dgux || mkdir dgux
205-
(cd dgux;ar x ../$^;ld -G -o ../$@ * )
206-
/bin/rm -rf ./dgux
204+
case `uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'` in \
205+
*dgux*) \
206+
test -d dgux || mkdir dgux; \
207+
(cd dgux;ar x ../$^;ld -G -o ../$@ * ); \
208+
/bin/rm -rf ./dgux \
209+
;; \
210+
esac
207211

208212
# This rule is here for OPENSTEP/Rhapsody/MacOSX
209213
libpython$(VERSION).dylib: $(LIBRARY)
@@ -230,8 +234,8 @@ Modules: Parser Python Objects
230234
# Test the interpreter (twice, once without .pyc files, once with)
231235
TESTOPTS=
232236
TESTPROG= $(srcdir)/Lib/test/regrtest.py
233-
TESTPYTHON= ./python
234-
test: python
237+
TESTPYTHON= ./python$(EXE)
238+
test: python$(EXE)
235239
-rm -f $(srcdir)/Lib/test/*.py[co]
236240
-PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
237241
PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
@@ -244,15 +248,15 @@ altinstall: altbininstall libinstall inclinstall libainstall sharedinstall
244248

245249
# Install the interpreter (by creating a hard link to python$(VERSION))
246250
bininstall: altbininstall
247-
-if test -f $(BINDIR)/python; \
248-
then rm -f $(BINDIR)/python; \
251+
-if test -f $(BINDIR)/python$(EXE); \
252+
then rm -f $(BINDIR)/python$(EXE); \
249253
else true; \
250254
fi
251255
(cd $(BINDIR); $(LN) python$(VERSION)$(EXE) python$(EXE))
252256

253257
# Install the interpreter with $(VERSION) affixed
254258
# This goes into $(exec_prefix)
255-
altbininstall: python
259+
altbininstall: python$(EXE)
256260
@for i in $(BINDIR); \
257261
do \
258262
if test ! -d $$i; then \
@@ -342,9 +346,9 @@ libinstall: python $(srcdir)/Lib/$(PLATDIR)
342346
done; \
343347
done
344348
PYTHONPATH=$(LIBDEST) \
345-
./python $(LIBDEST)/compileall.py $(LIBDEST)
349+
./python$(EXE) $(LIBDEST)/compileall.py $(LIBDEST)
346350
PYTHONPATH=$(LIBDEST) \
347-
./python -O $(LIBDEST)/compileall.py $(LIBDEST)
351+
./python$(EXE) -O $(LIBDEST)/compileall.py $(LIBDEST)
348352

349353
# Create the PLATDIR source directory, if one wasn't distributed..
350354
$(srcdir)/Lib/$(PLATDIR):
@@ -459,7 +463,7 @@ config.status: $(srcdir)/configure
459463
else $(SHELL) $(srcdir)/configure $(WITH); \
460464
fi
461465

462-
.PRECIOUS: config.status python
466+
.PRECIOUS: config.status python$(EXE)
463467

464468
# Rerun configure with the same options as it was run last time,
465469
# provided the config.status script exists
@@ -508,7 +512,7 @@ clean: localclean
508512
done
509513

510514
localclobber: localclean
511-
-rm -f tags TAGS python $(LIBRARY) $(LDLIBRARY) *.o
515+
-rm -f tags TAGS python$(EXE) $(LIBRARY) $(LDLIBRARY) *.o
512516
-rm -f config.log config.cache config.h
513517

514518
clobber: localclobber

0 commit comments

Comments
 (0)