[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Allow JavaHL to be tested before installation (Solves Issue #2040)

From: David James <james82_at_gmail.com>
Date: 2004-11-25 09:37:40 CET

This patch solves issue #2040 by fixing JavaHL so that it can be
tested before it is installed. I've revised this patch in response to
feedback from Justin Erenkrantz and I hope that this version is much
improved.

* Makefile.in
 (check-javahl): Instead of using the installed version of JavaHL, use
    the version compiled by libtool in the @JAVAHL_OBJDIR@ directory.
    We use FIX_JAVAHL_LIB to link libsvnjavahl-1.jnilib to
    libsvnjavahl-1.dylib on Mac OS X. We also replace the hardcoded
    path to the javahl classes directory with $(javahl_tests_PATH).

* configure.in
 (JAVAHL_OBJDIR): Get the directory where the compiled version of the
    JavaHL library is stored and save it as @JAVAHL_OBJDIR@
 (FIX_JAVAHL_LIB): On Mac OS X, substitute @FIX_JAVAHL_LIB@ for code
    to link libsvnjavahl-1.jnilib to libsvnjavahl-1.dylib

* build/generator/gen_make.py
 (Generator.write): Output the name of the directory where each target
    generates its files as %s_PATH. E.g., for the libsvnjavahl target,
    we create a variable called libsvnjavahl_PATH. Also, by setting
    path = target_ob.output_dir for TargetJava objects, we ensure that
    targets of type TargetJavaHeaders output the correct output
    directory into the %s_PATH variable.
    
Discussion:
- For why we need to link libsvnjavahl-1.jnilib to libsvnjavahl-1.dylib
  on Mac OS X, see Issue 1632:
  <http://subversion.tigris.org/issues/show_bug.cgi?id=1632>
- We assume that libtool stores its libraries in
    '$(libsvnjavahl_PATH)'/$objdir
  According to the libtool documentation, the $objdir variable
  specifies the name of the directory where the compiled versions
  of the library are stored. I also checked the libtool source code and
  found that regardless of your platform, when you try to run an
  uninstalled program using libtool, it simply adds the location of the
  $objdir directory to the variable specified by $shlibpath_var.
  Therefore there is no need for complex code to extract this directory
  by running libtool and checking $shlibpath_var; all we need to do is
  look in $objdir. So that's what we do.
- For discussion regarding the best method for retrieving the $objdir
  variable from libtool, see
  <http://svn.haxx.se/dev/archive-2004-11/1074.shtml>
- If my change "path = target_ob.output_dir" is controversial, feel
  free to omit it. It is only a cosmetic fix to the output of %s_PATH.
- This patch has been substantially improved from previous versions
  thanks to feedback from Justin Erenkrantz, Ben Reser, and Greg
  Hudson. For full history of the development of this patch see issue
  #2040: <http://subversion.tigris.org/issues/show_bug.cgi?id=2040>
- Let me know if you have any feedback. I am always happy to revise my
  patches to meet your needs.

Cheers,

David

--
http://www.cs.toronto.edu/~james


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Thu Nov 25 09:38:53 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.