summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-07-21 02:35:58 (GMT)
committerGuido van Rossum <guido@python.org>1996-07-21 02:35:58 (GMT)
commit450b9b33a22b2a6da44090fa9af9654fad20cfb4 (patch)
tree3014878195cbec051baeeb39f8657fc9589816fd
parentbe6da271a185bdc531fc7409d23a345d5a38681a (diff)
downloadcpython-450b9b33a22b2a6da44090fa9af9654fad20cfb4.zip
cpython-450b9b33a22b2a6da44090fa9af9654fad20cfb4.tar.gz
cpython-450b9b33a22b2a6da44090fa9af9654fad20cfb4.tar.bz2
Added Jim Fulton's "asharedmodule" target
-rw-r--r--Modules/Makefile.pre.in18
1 files changed, 17 insertions, 1 deletions
diff --git a/Modules/Makefile.pre.in b/Modules/Makefile.pre.in
index a21af23..b0517d3 100644
--- a/Modules/Makefile.pre.in
+++ b/Modules/Makefile.pre.in
@@ -52,7 +52,8 @@ INSTALL_DATA= ${INSTALL} -m 644
LINKCC= $(CC)
INCLDIR= $(srcdir)/../Include
-CFLAGS= $(OPT) -I$(INCLDIR) -I.. $(DEFS)
+CONFIGINCLDIR= ..
+CFLAGS= $(OPT) -I$(INCLDIR) -I$(CONFIGINCLDIR) $(DEFS)
MKDEP= mkdep
SHELL= /bin/sh
@@ -87,6 +88,12 @@ SYSLIBS= $(LIBM) $(LIBC)
all: $(LIB) ../python sharedmods
+asharedmodule: $(ASHAREDMODULE)$(SO)
+
+$(ASHAREDMODULE)$(SO): $(ASHAREDMODULESOBS)
+ $(LDSHARED) -o $(ASHAREDMODULE)$(SO) $(ASHAREDMODULESOBS) \
+ $(ASHAREDMODULESEXTRA)
+
$(LIB): $& $(OBJS) Makefile
-rm -f $(LIB)
$(AR) cr $(LIB) $(OBJS)
@@ -177,6 +184,15 @@ sharedinstall: $(DESTSHARED) $(SHAREDMODS)
fi; \
done
+# Install a shared module from outside of setup
+asharedinstall: $(DESTSHARED) $(ASHAREDMODULE)$(SO)
+ -for i in dummy $(ASHAREDMODULE)$(SO); do \
+ if test -f $$i; then mv $$i $(DESTSHARED)/$$i; fi; done
+
+# This is handy when modules need to know where the destination directory is:
+echodestshared: $(DESTSHARED)
+ echo $(DESTSHARED)
+
DIRMODE=755
$(DESTSHARED): $(exec_prefix)/lib/python $(exec_prefix)/lib $(exec_prefix)