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