subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1397846 - /subversion/trunk/Makefile.in
Date Sat, 13 Oct 2012 14:58:38 GMT
Author: breser
Date: Sat Oct 13 14:58:38 2012
New Revision: 1397846

URL: http://svn.apache.org/viewvc?rev=1397846&view=rev
Log:
Fix check-swig-py and check-swig-rb targets on OS X.

OS X needs the DYLD_LIBRARY_PATH env variable set in order to find the libraries
to link against.  In Python's case we have setup_path.py which is supposed to
be a good place to do this.  However, it won't work since it sets the
environment variables after python is already running and OS X's dynamic linker
only reads the environment variables at startup.

* Makefile.in
  (check-swig-py, check-swig-rb): Build a DYLD_LIBRARY_PATH variable if needed.

Modified:
    subversion/trunk/Makefile.in

Modified: subversion/trunk/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/trunk/Makefile.in?rev=1397846&r1=1397845&r2=1397846&view=diff
==============================================================================
--- subversion/trunk/Makefile.in (original)
+++ subversion/trunk/Makefile.in Sat Oct 13 14:58:38 2012
@@ -281,6 +281,19 @@ INSTALL_EXTRA_SWIG_PY=\
     compileall.compile_dir("$(DESTDIR)$(swig_pydir_extra)", 1, \
     "$(swig_pydir_extra)");'
 
+# export an env variable so that the tests can run without being installed
+TEST_SHLIB_VAR_SWIG_PY=\
+  if [ "@SVN_APR_SHLIB_PATH_VAR@" == "DYLD_LIBRARY_PATH" ]; then \
+    for d in $(SWIG_PY_DIR)/libsvn_swig_py $(SWIG_PY_DIR)/../../../libsvn_*; do \
+      if [ -n "$$DYLD_LIBRARY_PATH" ]; then \
+        @SVN_APR_SHLIB_PATH_VAR@="$$@SVN_APR_SHLIB_PATH_VAR@:$$d/.libs"; \
+      else \
+        @SVN_APR_SHLIB_PATH_VAR@="$$d/.libs"; \
+      fi; \
+    done; \
+    export @SVN_APR_SHLIB_PATH_VAR@; \
+  fi;
+
 # The path to generated and complementary source files for the SWIG
 # bindings.
 SWIG_PL_DIR = $(abs_builddir)/subversion/bindings/swig/perl
@@ -311,6 +324,19 @@ INSTALL_EXTRA_SWIG_RB=\
     $(INSTALL_DATA) "$$i" $(DESTDIR)$(SWIG_RB_SITE_LIB_DIR)/svn; \
   done
 
+# export an env variable so that the tests can run without being installed
+TEST_SHLIB_VAR_SWIG_RB=\
+  if [ "@SVN_APR_SHLIB_PATH_VAR@" == "DYLD_LIBRARY_PATH" ]; then \
+    for d in $(SWIG_PY_DIR)/libsvn_swig_rb $(SWIG_PY_DIR)/../../../libsvn_*; do \
+      if [ -n "$$DYLD_LIBRARY_PATH" ]; then \
+        @SVN_APR_SHLIB_PATH_VAR@="$$@SVN_APR_SHLIB_PATH_VAR@:$$d/.libs"; \
+      else \
+        @SVN_APR_SHLIB_PATH_VAR@="$$d/.libs"; \
+      fi; \
+    done; \
+    export @SVN_APR_SHLIB_PATH_VAR@; \
+  fi;
+ 
 APXS = @APXS@ 
 
 PYTHON = @PYTHON@
@@ -791,6 +817,7 @@ copy-swig-py: autogen-swig-py $(SWIG_PY_
 swig-py: autogen-swig-py copy-swig-py
 
 check-swig-py: swig-py
+	$(TEST_SHLIB_VAR_SWIG_PY) \
 	cd $(SWIG_PY_DIR); \
 	  $(PYTHON) $(SWIG_PY_SRC_DIR)/tests/run_all.py
 
@@ -813,6 +840,7 @@ extraclean-swig-py: clean-swig-py
 swig-rb: autogen-swig-rb
 
 check-swig-rb: swig-rb svnserve
+	$(TEST_SHLIB_VAR_SWIG_RB) \
 	cd $(SWIG_RB_DIR); \
 	  $(RUBY) -I $(SWIG_RB_SRC_DIR) \
 	    $(SWIG_RB_SRC_DIR)/test/run-test.rb \



Mime
View raw message