summaryrefslogtreecommitdiffstats
path: root/Misc/Makefile.pre.in
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1997-10-04 04:56:40 (GMT)
committerFred Drake <fdrake@acm.org>1997-10-04 04:56:40 (GMT)
commitbfeb74d4ca22102d6056bf8c1f115e643b1cc079 (patch)
tree0c741a8c14982267be4c409a5d076712a9319a6c /Misc/Makefile.pre.in
parentd99d714ac9df3b94c9879a715902f5e89418045b (diff)
downloadcpython-bfeb74d4ca22102d6056bf8c1f115e643b1cc079.zip
cpython-bfeb74d4ca22102d6056bf8c1f115e643b1cc079.tar.gz
cpython-bfeb74d4ca22102d6056bf8c1f115e643b1cc079.tar.bz2
install: New target that installs shared modules in
$exec_prefix/lib/python$VERSION/site-packages by default.
Diffstat (limited to 'Misc/Makefile.pre.in')
-rw-r--r--Misc/Makefile.pre.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/Misc/Makefile.pre.in b/Misc/Makefile.pre.in
index a8db764..31d491d 100644
--- a/Misc/Makefile.pre.in
+++ b/Misc/Makefile.pre.in
@@ -149,6 +149,7 @@ BINLIBDEST= $(LIBDIR)/python$(VERSION)
LIBDEST= $(SCRIPTDIR)/python$(VERSION)
INCLUDEPY= $(INCLUDEDIR)/python$(VERSION)
LIBP= $(exec_installdir)/lib/python$(VERSION)
+DESTSHARED= $(BINLIBDEST)/site-packages
LIBPL= $(LIBP)/config
@@ -164,6 +165,13 @@ SYSLIBS= $(LIBM) $(LIBC)
ADDOBJS= $(LIBPL)/python.o config.o
+# Portable install script (configure doesn't always guess right)
+INSTALL= $(LIBPL)/install-sh -c
+# Shared libraries must be installed with executable mode on some systems;
+# rather than figuring out exactly which, we always give them executable mode.
+# Also, making them read-only seems to be a good idea...
+INSTALL_SHARED= ${INSTALL} -m 555
+
# === Fixed rules ===
# Default target. This builds shared libraries only
@@ -182,6 +190,15 @@ $(TARGET): $(ADDOBJS) lib.a $(PYTHONLIBS) Makefile $(BASELIB)
$(LINKPATH) $(BASELIB) $(MODLIBS) $(LIBS) $(SYSLIBS) \
-o $(TARGET)
+install: sharedmods
+ if test ! -d $(DESTSHARED) ; then \
+ mkdir $(DESTSHARED) ; else true ; fi
+ -for i in X $(SHAREDMODS); do \
+ if test $$i != X; \
+ then $(INSTALL_SHARED) $$i $(DESTSHARED)/$$i; \
+ fi; \
+ done
+
# Build the library containing our extension modules
lib.a: $(MODOBJS)
-rm -f lib.a