1. python_mirrors
  2. features/packaging

Commits

Guido van Rossum  committed eccfada

Added Jim Fulton's "asharedmodule" target

  • Participants
  • Parent commits ab110b1
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Modules/Makefile.pre.in

View file
  • Ignore whitespace
 
 LINKCC=		$(CC)
 INCLDIR=	$(srcdir)/../Include
-CFLAGS=		$(OPT) -I$(INCLDIR) -I.. $(DEFS)
+CONFIGINCLDIR=	..
+CFLAGS=		$(OPT) -I$(INCLDIR) -I$(CONFIGINCLDIR) $(DEFS)
 
 MKDEP=		mkdep
 SHELL=		/bin/sh
 
 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)
 			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)