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

Skip to content

Commit 3912fd8

Browse files
committed
Append version number to library install directory.
"make libinstall" no longer implies "make sharedinstall". "make altinstall" and "make altbininstall" install the python binary with a version number, for tentative installations (this does not install the include files or man page).
1 parent 4daf6ad commit 3912fd8

1 file changed

Lines changed: 23 additions & 10 deletions

File tree

Makefile.in

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
#
5252
# See also the section "Build instructions" in the README file.
5353

54+
# Interpreter version number, for library destination pathnames
55+
VERSION= 1.4
56+
5457
# Substitutions by configure
5558
srcdir= @srcdir@
5659
VPATH= @srcdir@
@@ -77,7 +80,7 @@ SO= @SO@
7780
LDSHARED= @LDSHARED@
7881
CCSHARED= @CCSHARED@
7982
LINKFORSHARED= @LINKFORSHARED@
80-
DESTSHARED= $(SCRIPTDIR)/python/$(MACHDEP)
83+
DESTSHARED= $(SCRIPTDIR)/python$(VERSION)/$(MACHDEP)
8184

8285
# Shell used by make (some versions default to the login shell, which is bad)
8386
SHELL= /bin/sh
@@ -131,6 +134,9 @@ test: python
131134
install: bininstall libinstall maninstall inclinstall \
132135
libainstall sharedinstall
133136

137+
# Install most things with $(VERSION) affixed
138+
altinstall: altbininstall libinstall libainstall sharedinstall
139+
134140
# Install the interpreter
135141
bininstall: python
136142
@for i in $(BINDIR); \
@@ -144,10 +150,23 @@ bininstall: python
144150
done
145151
$(INSTALL_PROGRAM) python $(BINDIR)/python
146152

153+
# Install the interpreter with $(VERSION) affixed
154+
altbininstall: python
155+
@for i in $(BINDIR); \
156+
do \
157+
if test ! -d $$i; then \
158+
echo "Creating directory $$i"; \
159+
mkdir $$i; \
160+
chmod 755 $$i; \
161+
else true; \
162+
fi; \
163+
done
164+
$(INSTALL_PROGRAM) python $(BINDIR)/python$(VERSION)
165+
147166
# Install the library.
148167
# If your system does not support "cp -r", try "copy -r" or perhaps
149168
# something like find Lib -print | cpio -pacvdmu $(LIBDEST)
150-
LIBDEST= $(SCRIPTDIR)/python
169+
LIBDEST= $(SCRIPTDIR)/python$(VERSION)
151170
libinstall: python
152171
@for i in $(SCRIPTDIR) $(LIBDEST); \
153172
do \
@@ -161,14 +180,6 @@ libinstall: python
161180
cp -r $(srcdir)/Lib/* $(LIBDEST)
162181
PYTHONPATH=$(LIBDEST) \
163182
./python $(LIBDEST)/compileall.py $(LIBDEST)
164-
$(MAKE) \
165-
OPT="$(OPT)" \
166-
SO="$(SO)" \
167-
LDSHARED="$(LDSHARED)" \
168-
CCSHARED="$(CCSHARED)" \
169-
LINKFORSHARED="$(LINKFORSHARED)" \
170-
DESTSHARED="$(DESTSHARED)" \
171-
sharedinstall
172183

173184
# Install the manual page
174185
maninstall:
@@ -239,6 +250,8 @@ sharedinstall:
239250
CCSHARED="$(CCSHARED)" \
240251
LINKFORSHARED="$(LINKFORSHARED)" \
241252
DESTSHARED="$(DESTSHARED)" \
253+
prefix="$(prefix)" \
254+
exec_prefix="$(exec_prefix)" \
242255
sharedinstall
243256

244257
# Build the sub-Makefiles

0 commit comments

Comments
 (0)