37319b
37319b
Fix the way libtool is used to match standard practice:
37319b
37319b
a) link ONLY libraries using -rpath $(libdir), not executables
37319b
   .. this avoids adding an RPATH for $libdir to executables
37319b
b) link non-installable test binaries using -no-install
37319b
   .. only for convenience but should speed up builds slightly(?)
37319b
37319b
--- subversion-1.12.0/build.conf.linking
37319b
+++ subversion-1.12.0/build.conf
37319b
@@ -572,7 +572,7 @@
37319b
 path = subversion/bindings/swig/python/libsvn_swig_py
37319b
 libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr
37319b
        apriconv apr python swig
37319b
-link-cmd = $(LINK)
37319b
+link-cmd = $(LINK_LIB)
37319b
 install = swig-py-lib
37319b
 # need special build rule to include -DSWIGPYTHON
37319b
 compile-cmd = $(COMPILE_SWIG_PY)
37319b
@@ -598,7 +598,7 @@
37319b
 lang = ruby
37319b
 path = subversion/bindings/swig/ruby/libsvn_swig_ruby
37319b
 libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr ruby swig
37319b
-link-cmd = $(LINK) $(SWIG_RB_LIBS)
37319b
+link-cmd = $(LINK_LIB) $(SWIG_RB_LIBS)
37319b
 install = swig-rb-lib
37319b
 # need special build rule to include
37319b
 compile-cmd = $(COMPILE_SWIG_RB)
37319b
@@ -769,6 +769,7 @@
37319b
 libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr aprutil apriconv apr
37319b
 msvc-static = yes
37319b
 undefined-lib-symbols = yes
37319b
+link-cmd = $(LINK_TEST_LIB)
37319b
 
37319b
 # ----------------------------------------------------------------------------
37319b
 # Tests for libsvn_fs_base
37319b
--- subversion-1.12.0/build/generator/gen_base.py.linking
37319b
+++ subversion-1.12.0/build/generator/gen_base.py
37319b
@@ -599,7 +599,7 @@
37319b
     self.install = options.get('install')
37319b
     self.compile_cmd = options.get('compile-cmd')
37319b
     self.sources = options.get('sources', '*.c *.cpp')
37319b
-    self.link_cmd = options.get('link-cmd', '$(LINK)')
37319b
+    self.link_cmd = options.get('link-cmd', '$(LINK_LIB)')
37319b
 
37319b
     self.external_lib = options.get('external-lib')
37319b
     self.external_project = options.get('external-project')
37319b
@@ -659,6 +659,14 @@
37319b
 
37319b
     self.msvc_force_static = options.get('msvc-force-static') == 'yes'
37319b
 
37319b
+    if self.install in ['test', 'bdb-test', 'sub-test', ]:
37319b
+      self.link_cmd = '$(LINK_TEST)'
37319b
+    elif self.install in ['bin', 'tools']:
37319b
+      self.link_cmd = '$(LINK_EXE)'
37319b
+    elif self.link_cmd == '$(LINK_LIB)':
37319b
+      raise GenError('ERROR: Unknown executable link type for ' + self.name + \
37319b
+                     ': ' + self.link_cmd + ' (' + self.install + ')')
37319b
+    
37319b
   def add_dependencies(self):
37319b
     TargetLinked.add_dependencies(self)
37319b
 
37319b
--- subversion-1.12.0/Makefile.in.linking
37319b
+++ subversion-1.12.0/Makefile.in
37319b
@@ -268,11 +268,14 @@
37319b
 COMPILE_SVNXX = $(LT_COMPILE_CXX) $(SVNXX_INCLUDES) -o $@ -c
37319b
 COMPILE_SVNXX_TEST = $(LT_COMPILE_CXX) $(SVNXX_INCLUDES) $(BOOST_TEST_CPPFLAGS) -o $@ -c
37319b
 
37319b
-LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
37319b
-LINK_LIB = $(LINK) $(LT_SO_VERSION)
37319b
-LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
37319b
-LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION)
37319b
-LINK_SVNXX_TEST = $(LINK_CXX) $(BOOST_TEST_LDFLAGS)
37319b
+LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
37319b
+LINK_LIB = $(LINK) $(LT_SO_VERSION) -rpath $(libdir)
37319b
+LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS)
37319b
+LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION) -rpath $(libdir)
37319b
+LINK_SVNXX_TEST = $(LINK_CXX) $(BOOST_TEST_LDFLAGS) -no-install
37319b
+LINK_TEST = $(LINK) -no-install
37319b
+LINK_TEST_LIB = $(LINK_TEST) -avoid-version
37319b
+LINK_EXE = $(LINK)
37319b
 
37319b
 # special link rule for mod_dav_svn
37319b
 LINK_APACHE_MOD = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(APACHE_LIBEXECDIR) -avoid-version -module $(APACHE_LDFLAGS) -shared