You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2013/12/27 18:00:37 UTC

git commit: ACCUMULO-2101 Check the environment for JAVA_HOME for native-maps Makefile

Updated Branches:
  refs/heads/1.6.0-SNAPSHOT ccb6093bb -> 7838d4035


ACCUMULO-2101 Check the environment for JAVA_HOME for native-maps Makefile

Pull the value for JAVA_HOME out of the environment instead of blindly setting
it relative to the location of a javah executable. If we have an empty value,
then fall back on the old calculation.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7838d403
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7838d403
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7838d403

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 7838d4035f78376cbbd7452f7f8b013d4b398857
Parents: ccb6093
Author: Josh Elser <el...@apache.org>
Authored: Fri Dec 27 11:55:26 2013 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Fri Dec 27 11:55:26 2013 -0500

----------------------------------------------------------------------
 server/native/src/main/resources/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7838d403/server/native/src/main/resources/Makefile
----------------------------------------------------------------------
diff --git a/server/native/src/main/resources/Makefile b/server/native/src/main/resources/Makefile
index ffe5f24..1ca79eb 100644
--- a/server/native/src/main/resources/Makefile
+++ b/server/native/src/main/resources/Makefile
@@ -20,7 +20,10 @@ CXX=g++
 MAVERICKFLAGS=
 
 ifeq ($(shell uname),Linux)
-	JAVA_HOME=$(shell dirname $$(dirname $$(readlink -ef $$(which javah))))
+	JAVA_HOME=$(shell env | fgrep JAVA_HOME | cut -d= -f2)
+	ifeq ($(strip $(JAVA_HOME)),)
+		JAVA_HOME=$(shell dirname $$(dirname $$(readlink -ef $$(which javah))))
+	endif
 	NATIVE_LIB := libaccumulo.so
 	CXXFLAGS=-m64 -g -fPIC -shared -O2 -fno-omit-frame-pointer -fno-strict-aliasing -Wall -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -Ijavah
 endif