openbsd-ports/lang/python/2.6/patches/patch-Makefile_pre_in

80 lines
3.0 KiB
Plaintext

$OpenBSD: patch-Makefile_pre_in,v 1.3 2010/07/23 13:56:26 sthen Exp $
--- Makefile.pre.in.orig Thu Dec 24 14:19:38 2009
+++ Makefile.pre.in Thu Jun 17 13:51:01 2010
@@ -350,6 +350,8 @@ LIBRARY_OBJS= \
#########################################################################
# Rules
+everything: all $(srcdir)/Lib/$(PLATDIR)
+
# Default target
all: build_all
build_all: $(BUILDPYTHON) oldsharedmods sharedmods
@@ -385,7 +387,7 @@ coverage:
$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
Modules/python.o \
- $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+ -lpython$(VERSION) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
platform: $(BUILDPYTHON)
$(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
@@ -425,6 +427,11 @@ libpython$(VERSION).dylib: $(LIBRARY_OBJS)
libpython$(VERSION).sl: $(LIBRARY_OBJS)
$(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)
+# This rule for OpenBSD...
+$(LDLIBRARY): $(LIBRARY)
+ $(LDSHARED) -o $@ $(LIBRARY_OBJS)
+
+
# This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
# minimal framework (not including the Lib directory and such) in the current
# directory.
@@ -760,14 +767,13 @@ bininstall: altbininstall
then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
else true; \
fi
- (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
-rm -f $(DESTDIR)$(BINDIR)/python-config
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config)
# Install the interpreter with $(VERSION) affixed
# This goes into $(exec_prefix)
altbininstall: $(BUILDPYTHON)
- @for i in $(BINDIR) $(LIBDIR); \
+ @for i in $(BINDIR) $(LIBDIR) $(LIBPL); \
do \
if test ! -d $(DESTDIR)$$i; then \
echo "Creating directory $$i"; \
@@ -783,7 +789,8 @@ altbininstall: $(BUILDPYTHON)
$(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
if test $(LDLIBRARY) != $(INSTSONAME); then \
(cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) $(LDLIBRARY)) \
- fi \
+ fi ; \
+ (cd $(DESTDIR)$(LIBPL); $(LN) -sf $(LIBDIR)/$(LDLIBRARY)) \
fi; \
else true; \
fi
@@ -799,7 +806,7 @@ maninstall:
fi; \
done
$(INSTALL_DATA) $(srcdir)/Misc/python.man \
- $(DESTDIR)$(MANDIR)/man1/python.1
+ $(DESTDIR)$(MANDIR)/man1/python$(VERSION).1
# Install the library
PLATDIR= plat-$(MACHDEP)
@@ -906,8 +913,8 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR)
./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
# Create the PLATDIR source directory, if one wasn't distributed..
-$(srcdir)/Lib/$(PLATDIR):
- mkdir $(srcdir)/Lib/$(PLATDIR)
+$(srcdir)/Lib/$(PLATDIR): $(BUILDPYTHON)
+ mkdir -p $(srcdir)/Lib/$(PLATDIR)
cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
export PATH; PATH="`pwd`:$$PATH"; \
export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \