summaryrefslogtreecommitdiff
path: root/math/octave-current/patches/patch-ag
blob: 081ea44e0c8e9435e090eb3ddbb8766e1cbf4ded (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
$NetBSD: patch-ag,v 1.15 2006/01/06 22:41:48 adam Exp $

--- src/Makefile.in.orig	2005-11-11 20:48:04.000000000 +0100
+++ src/Makefile.in
@@ -291,8 +291,9 @@ libraries: $(LIBRARIES)
 
 liboctinterp.$(LIBEXT): $(OBJECTS) $(XERBLA)
 	rm -f $@
-	$(TEMPLATE_AR) $(TEMPLATE_ARFLAGS) $@ $^
-	$(RANLIB) $@
+	${LIBTOOL} --mode=link ${CC} -o liboctinterp.$(LIBEXT) \
+		$(OBJECTS:.o=.lo) $(XERBLA:.o=.lo) -rpath ${PREFIX}/lib \
+		-version-info ${version:2.9.%=2:%}
 
 liboctinterp.$(SHLEXT_VER): liboctinterp.$(SHLEXT)
 	rm -f $@
@@ -300,12 +301,13 @@ liboctinterp.$(SHLEXT_VER): liboctinterp
 
 liboctinterp.$(SHLEXT): $(PICOBJ) $(PIC_XERBLA)
 	rm -f $@
-	$(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ $(OCTINTERP_LINK_DEPS)
+	${LIBTOOL} --mode=link $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ $(OCTINTERP_LINK_DEPS)
 
 stamp-prereq: defaults.h oct-conf.h oct-gperf.h parse.cc lex.cc gplot.cc $(OPT_HANDLERS)
 	touch stamp-prereq
 
 octave$(EXEEXT): stamp-prereq $(LIBRARIES) main.o $(DLD_STATIC_OBJ)
+	${LIBTOOL} --mode=link \
 	$(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
 	$(ALL_LDFLAGS) -o $@ \
 	main.o $(DLD_STATIC_OBJ) \
@@ -392,6 +394,7 @@ install-strip:
 install-bin:
 	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
 	rm -f $(DESTDIR)$(bindir)/octave$(EXEEXT)
+	${LIBTOOL} --mode=install \
 	$(INSTALL_PROGRAM) octave$(EXEEXT) $(DESTDIR)$(bindir)/octave-$(version)$(EXEEXT)
 	cd $(DESTDIR)$(bindir) ; $(LN_S) octave-$(version)$(EXEEXT) octave$(EXEEXT)
 .PHONY: install-bin
@@ -401,9 +404,10 @@ install-oct:
 	if [ -n "$(OCT_FILES)" ]; then \
 	  xfiles="$(OCT_FILES)"; \
 	  for f in $$xfiles; do \
+	    ${LIBTOOL} --mode=install \
 	    $(INSTALL_PROGRAM) $$f $(DESTDIR)$(octfiledir)/$$f; \
 	  done; \
-	  $(srcdir)/mk-pkg-add --prefix $(octfiledir) $(DLD_DEF_FILES) > $(DESTDIR)$(octfiledir)/PKG_ADD
+	  $(srcdir)/mk-pkg-add --prefix $(octfiledir) $(DLD_DEF_FILES) > $(DESTDIR)$(octfiledir)/PKG_ADD; \
 	fi
 .PHONY: install-oct
 
@@ -411,9 +415,8 @@ install-lib:
 	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(octlibdir)
 	if $(STATIC_LIBS); then \
 	  rm -f $(DESTDIR)$(octlibdir)/liboctinterp.$(LIBEXT); \
-	  $(INSTALL_DATA) liboctinterp.$(LIBEXT) \
-	    $(DESTDIR)$(octlibdir)/liboctinterp.$(LIBEXT); \
-	  $(RANLIB) $(DESTDIR)$(octlibdir)/liboctinterp.$(LIBEXT); \
+	  ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} liboctinterp.$(LIBEXT) \
+	    ${PREFIX}/lib; \
 	fi
 	if $(SHARED_LIBS); then \
 	  rm -f $(DESTDIR)$(octlibdir)/liboctinterp.$(SHLEXT_VER); \