From d0916f452f7564c2f7dfeeb202353e8b9e4d16cf Mon Sep 17 00:00:00 2001 From: Chris Riccomini Date: Thu, 2 Oct 2014 11:07:45 -0700 Subject: [PATCH] add major minor micro version to java jars --- Makefile | 11 ++++++----- java/Makefile | 8 ++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index ab920b5923..2a1ae67352 100644 --- a/Makefile +++ b/Makefile @@ -164,8 +164,9 @@ endif LIBRARY = ${LIBNAME}.a MEMENVLIBRARY = libmemenv.a -ROCKSDB_MAJOR = 3 -ROCKSDB_MINOR = 4 +ROCKSDB_MAJOR = $(shell egrep "ROCKSDB_MAJOR.[0-9]" include/rocksdb/version.h | cut -d ' ' -f 3) +ROCKSDB_MINOR = $(shell egrep "ROCKSDB_MINOR.[0-9]" include/rocksdb/version.h | cut -d ' ' -f 3) +ROCKSDB_PATCH = $(shell egrep "ROCKSDB_PATCH.[0-9]" include/rocksdb/version.h | cut -d ' ' -f 3) default: all @@ -515,12 +516,12 @@ JNI_NATIVE_SOURCES = ./java/rocksjni/*.cc JAVA_INCLUDE = -I$(JAVA_HOME)/include/ -I$(JAVA_HOME)/include/linux ARCH := $(shell getconf LONG_BIT) ROCKSDBJNILIB = librocksdbjni-linux$(ARCH).so -ROCKSDB_JAR = rocksdbjni-linux$(ARCH).jar -ROCKSDB_JAR_ALL = rocksdbjni-all.jar +ROCKSDB_JAR = rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-linux$(ARCH).jar +ROCKSDB_JAR_ALL = rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-all.jar ifeq ($(PLATFORM), OS_MACOSX) ROCKSDBJNILIB = librocksdbjni-osx.jnilib -ROCKSDB_JAR = rocksdbjni-osx.jar +ROCKSDB_JAR = rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-osx.jar JAVA_INCLUDE = -I/System/Library/Frameworks/JavaVM.framework/Headers/ endif diff --git a/java/Makefile b/java/Makefile index 1b854755bb..2741f36d37 100644 --- a/java/Makefile +++ b/java/Makefile @@ -1,11 +1,15 @@ NATIVE_JAVA_CLASSES = org.rocksdb.RocksDB org.rocksdb.Options org.rocksdb.WriteBatch org.rocksdb.WriteBatchInternal org.rocksdb.WriteBatchTest org.rocksdb.WriteOptions org.rocksdb.BackupableDB org.rocksdb.BackupableDBOptions org.rocksdb.Statistics org.rocksdb.RocksIterator org.rocksdb.VectorMemTableConfig org.rocksdb.SkipListMemTableConfig org.rocksdb.HashLinkedListMemTableConfig org.rocksdb.HashSkipListMemTableConfig org.rocksdb.PlainTableConfig org.rocksdb.BlockBasedTableConfig org.rocksdb.ReadOptions org.rocksdb.Filter org.rocksdb.BloomFilter org.rocksdb.RestoreOptions org.rocksdb.RestoreBackupableDB org.rocksdb.RocksEnv org.rocksdb.GenericRateLimiterConfig +ROCKSDB_MAJOR = $(shell egrep "ROCKSDB_MAJOR.[0-9]" include/rocksdb/version.h | cut -d ' ' -f 3) +ROCKSDB_MINOR = $(shell egrep "ROCKSDB_MINOR.[0-9]" include/rocksdb/version.h | cut -d ' ' -f 3) +ROCKSDB_PATCH = $(shell egrep "ROCKSDB_PATCH.[0-9]" include/rocksdb/version.h | cut -d ' ' -f 3) + NATIVE_INCLUDE = ./include ARCH := $(shell getconf LONG_BIT) -ROCKSDB_JAR = rocksdbjni-linux$(ARCH).jar +ROCKSDB_JAR = rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-linux$(ARCH).jar ifeq ($(PLATFORM), OS_MACOSX) -ROCKSDB_JAR = rocksdbjni-osx.jar +ROCKSDB_JAR = rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-osx.jar endif clean: