accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [04/10] accumulo git commit: ACCUMULO-4399 Escape OUTPUT_DIR target in Makefile
Date Wed, 10 Aug 2016 21:50:14 GMT
ACCUMULO-4399 Escape OUTPUT_DIR target in Makefile

Escape spaces and parens in the OUTPUT_DIR make parameter when set.


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

Branch: refs/heads/master
Commit: 9bd3306f03fbd6b910e54df4e8e4834e2ee89a81
Parents: fc9bd07
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Wed Aug 10 17:48:07 2016 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Wed Aug 10 17:48:07 2016 -0400

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


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9bd3306f/server/native/src/main/resources/Makefile
----------------------------------------------------------------------
diff --git a/server/native/src/main/resources/Makefile b/server/native/src/main/resources/Makefile
index 1e26303..5434356 100644
--- a/server/native/src/main/resources/Makefile
+++ b/server/native/src/main/resources/Makefile
@@ -20,6 +20,10 @@ CXX=g++
 MAVERICKFLAGS=
 USERFLAGS=$(shell env | grep "^USERFLAGS=" | cut -d= -f2)
 
+ifneq (,$(OUTPUT_DIR))
+	OUTPUT_DIR_ESCAPED=$(shell echo '$(OUTPUT_DIR)' | sed 's/ /\\ /g' | sed 's/\([()]\)/\\\1/g')
+endif
+
 ifeq ($(shell uname),Linux)
 	JAVA_HOME=$(shell env | grep "^JAVA_HOME=" | cut -d= -f2)
 	ifeq ($(strip $(JAVA_HOME)),)
@@ -57,7 +61,7 @@ test : $(NATIVE_LIB) testJavaHome runTests
 testJavaHome :
 	@echo 'JAVA_HOME is $(JAVA_HOME)'
 
-runTests : $(NATIVE_LIB) $(TESTSRCS) $(OUTPUT_DIR)
+runTests : $(NATIVE_LIB) $(TESTSRCS) $(OUTPUT_DIR_ESCAPED)
 	$(CXX) -g -Wall -I/System/Library/Frameworks/JavaVM.framework/Headers -I'$(JAVA_HOME)'/include
-I'$(JAVA_HOME)'/include/linux -I'$(JAVA_HOME)'/include/darwin -InativeMap -o $@ $(TESTSRCS)
$(NATIVE_LIB) $(MAVERICK_FLAGS)
 	LD_LIBRARY_PATH=./ ./$@ 20 20 20 20 20 20 20 20 true
 	if [ ! -z "$(OUTPUT_DIR)" ]; then cp '$(NATIVE_LIB)' "$(OUTPUT_DIR)"; fi


Mime
View raw message