$OpenBSD: patch-Makefile_pre_in,v 1.3 2006/11/01 20:38:37 alek Exp $ --- Makefile.pre.in.orig Sun Oct 8 19:41:25 2006 +++ Makefile.pre.in Sat Oct 21 15:06:35 2006 @@ -315,7 +315,7 @@ all: $(BUILDPYTHON) oldsharedmods share $(BUILDPYTHON): Modules/$(MAINOBJ) $(LIBRARY) $(LDLIBRARY) $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \ Modules/$(MAINOBJ) \ - $(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 @@ -364,6 +364,11 @@ libpython$(VERSION).so: $(LIBRARY_OBJS) libpython$(VERSION).sl: $(LIBRARY_OBJS) $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) +# 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. @@ -626,7 +631,6 @@ bininstall: altbininstall then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \ else true; \ fi - (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)) # Install the interpreter with $(VERSION) affixed # This goes into $(exec_prefix) @@ -637,7 +641,7 @@ altbininstall: $(BUILDPYTHON) exit 1; \ fi; \ fi - @for i in $(BINDIR) $(LIBDIR); \ + @for i in $(BINDIR) $(LIBDIR) $(LIBPL); \ do \ if test ! -d $(DESTDIR)$$i; then \ echo "Creating directory $$i"; \ @@ -646,14 +650,12 @@ altbininstall: $(BUILDPYTHON) fi; \ done $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE) - if test -f libpython$(VERSION)$(SO); then \ + if test -f $(LDLIBRARY); then \ if test "$(SO)" = .dll; then \ $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(BINDIR); \ else \ - $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \ - if test libpython$(VERSION)$(SO) != $(INSTSONAME); then \ - (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \ - fi \ + $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(LIBPL)/$(LDLIBRARY); \ + (cd $(DESTDIR)$(LIBDIR); $(LN) -s python$(VERSION)/config/$(LDLIBRARY)); \ fi; \ else true; \ fi @@ -669,7 +671,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)