Commit a13298c8 authored by Axel Auweter's avatar Axel Auweter
Browse files

/bin/sh compatibility, fixed ARM OpenSSL build.

parent 111f7f82
......@@ -24,13 +24,6 @@ DISTFILES = apache-cassandra-$(CASSANDRA_VERSION).tar.gz;http://apache.cs.utah.e
FETCH = wget -c --no-check-certificate -O -
# Determine OpenSSL dependency target
ifeq ("$(ARCH)", "arm")
OPENSSL_TARGET = "linux-armv4"
else
OPENSSL_TARGET = $(if $(findstring $(shell uname),Darwin),"darwin64-x86_64-cc","linux-x86_64")
endif
MAKETHREADS ?= $(if $(findstring $(shell uname),Darwin),$(shell sysctl machdep.cpu.thread_count | cut -b 27-),\
$(if $(findstring $(shell uname),Linux),$(shell cat /proc/cpuinfo | grep processor | wc -l),4))
......@@ -60,7 +53,9 @@ CMAKE_CROSS_FLAGS = -DCMAKE_C_COMPILER=$(CC) \
-DCMAKE_INCLUDE_PATH=$(DCDBDEPLOYPATH)/include
AUTOCONF_CROSS_FLAGS = --host=$(CROSS_COMPILE_STRP)
SKIP_PROJECTS = IPMIPusher MontBlancPusher
OPENSSL_TARGET = "linux-generic32"
else
OPENSSL_TARGET = $(if $(findstring $(shell uname),Darwin),"darwin64-x86_64-cc","linux-x86_64")
CMAKE_CROSS_FLAGS = ""
AUTOCONF_CROSS_FLAGS = ""
SKIP_PROJECTS = ""
......@@ -263,7 +258,7 @@ $(DCDBDEPSPATH)/.prerequesites: $(DCDBDEPSPATH)/.extract-distfiles
fi
$(eval D := $(shell echo "$(DISTFILESPATHS)" | sed 's/.*cpp-driver/cpp-driver/' | sed 's/\ .*//'))
if [ ! -e $(DCDBDEPSPATH)/$(D)/.installed ]; then \
@if [ ! -e $(DCDBDEPSPATH)/$(D)/.installed ]; then \
echo ""; \
echo "Building cpp-driver..."; \
if [ -e $(DCDBDEPSPATH)/patches/$(D).patch ]; then \
......@@ -293,7 +288,7 @@ $(DCDBDEPSPATH)/.prerequesites: $(DCDBDEPSPATH)/.extract-distfiles
@echo ""
@echo "Staging and configuring Cassandra..."
@$(eval C := $(shell echo "$(DISTFILESPATHS)" | sed 's/.*apache-cassandra/apache-cassandra/' | sed 's/\ .*//'))
@rsync -a $(DCDBDEPSPATH)/$(C)/ $(DCDBDEPLOYPATH)/cassandra
@rsync -rlptD $(DCDBDEPSPATH)/$(C)/ $(DCDBDEPLOYPATH)/cassandra
@$(eval P := $(shell echo "$(DCDBDEPLOYPATH)" | sed 's/\//\\\//g'))
@sed -i.original -e 's/\/var\/lib\/cassandra/$(P)\/var\/lib\/cassandra/g' $(DCDBDEPLOYPATH)/cassandra/conf/cassandra.yaml
@sed -i -e 's/.*cluster_name:.*/cluster_name:\ '\''$(CASSANDRA_CLUSTER_NAME)'\''/' $(DCDBDEPLOYPATH)/cassandra/conf/cassandra.yaml
......@@ -338,7 +333,7 @@ $(LIBRARIES): $(DCDBDEPSPATH)/.prerequesites
$(PROJECTS):
$(eval X := $(shell echo "$(SKIP_PROJECTS)" | grep "$@"))
@if [[ "$(X)" = "" ]]; then \
@if [ "$(X)" = "" ]; then \
echo ""; \
echo "Building $@..."; \
$(MAKE) -j $(MAKETHREADS) CC=$(CC) CXX=$(CXX) -C $@ ; \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment