Skip to content

Commit

Permalink
fix building scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dwing4g committed Jan 10, 2019
1 parent 7387b7f commit ac2d2d8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion make_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ cd `dirname $0`
# note:
# 1. if gcc supports c++11 (4.8+), remove "-Dconstexpr= -Doverride="

if [ "$JAVA_HOME" = "" ]; then JAVA_HOME=/usr/java/default; fi
if [ -z $JAVA_HOME ]; then JAVA_HOME=/usr/java/default; fi

JAVA_VER=`$JAVA_HOME/bin/java -version 2>&1 | awk -F "[ \"]" '/version/{print $4}'`
if [[ $JAVA_VER < 1.8 ]]; then echo 'ERROR: JDK 1.8 or later is required!'; exit 1; fi

CORE_FILES="\
db/builder.cc \
Expand Down
5 changes: 4 additions & 1 deletion make_linux_jemalloc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ cd `dirname $0`
# 1. if gcc supports c++11 (4.8+), remove "-Dconstexpr= -Doverride="
# 2. configure and make jemalloc, then put the result "lib/libjemalloc.a" and "lib/libjemalloc_pic.a" in this path

if [ "$JAVA_HOME" = "" ]; then JAVA_HOME=/usr/java/default; fi
if [ -z $JAVA_HOME ]; then JAVA_HOME=/usr/java/default; fi

JAVA_VER=`$JAVA_HOME/bin/java -version 2>&1 | awk -F "[ \"]" '/version/{print $4}'`
if [[ $JAVA_VER < 1.8 ]]; then echo 'ERROR: JDK 1.8 or later is required!'; exit 1; fi

CORE_FILES="\
db/builder.cc \
Expand Down
3 changes: 3 additions & 0 deletions make_mac.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

cd `dirname $0`

# note:
# 1. install JDK 8 or later and set $JAVA_INCLUDE if JDK is not in default path

if [ "$JAVA_INCLUDE" = "" ]; then JAVA_INCLUDE=/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers; fi

CORE_FILES="\
Expand Down

0 comments on commit ac2d2d8

Please sign in to comment.