@ -278,6 +278,10 @@ default: all
WARNING_FLAGS = -W -Wextra -Wall -Wsign-compare -Wshadow \
WARNING_FLAGS = -W -Wextra -Wall -Wsign-compare -Wshadow \
-Wno-unused-parameter
-Wno-unused-parameter
i f e q ( $( PLATFORM ) , O S _ O P E N B S D )
WARNING_FLAGS += -Wno-unused-lambda-capture
e n d i f
i f n d e f D I S A B L E _ W A R N I N G _ A S _ E R R O R
i f n d e f D I S A B L E _ W A R N I N G _ A S _ E R R O R
WARNING_FLAGS += -Werror
WARNING_FLAGS += -Werror
e n d i f
e n d i f
@ -674,7 +678,7 @@ coverage:
COVERAGEFLAGS = "-fprofile-arcs -ftest-coverage" LDFLAGS += "-lgcov" $( MAKE) J = 1 all check
COVERAGEFLAGS = "-fprofile-arcs -ftest-coverage" LDFLAGS += "-lgcov" $( MAKE) J = 1 all check
cd coverage && ./coverage_test.sh
cd coverage && ./coverage_test.sh
# Delete intermediate files
# Delete intermediate files
find . -type f -regex ".*\.\(\(gcda\)\|\(gcno\)\)" -exec rm { } \;
$( FIND) . -type f -regex ".*\.\(\(gcda\)\|\(gcno\)\)" -exec rm { } \;
i f n e q ( , $( filter check parallel_check ,$ ( MAKECMDGOALS ) ) , )
i f n e q ( , $( filter check parallel_check ,$ ( MAKECMDGOALS ) ) , )
# Use /dev/shm if it has the sticky bit set (otherwise, /tmp),
# Use /dev/shm if it has the sticky bit set (otherwise, /tmp),
@ -821,7 +825,7 @@ CLEAN_FILES += t LOG $(TMPD)
# regardless of their duration. As with any use of "watch", hit ^C to
# regardless of their duration. As with any use of "watch", hit ^C to
# interrupt.
# interrupt.
watch-log :
watch-log :
watch --interval= 0 'sort -k7,7nr -k4,4gr LOG|$(quoted_perl_command)'
$( WATCH) --interval= 0 'sort -k7,7nr -k4,4gr LOG|$(quoted_perl_command)'
# If J != 1 and GNU parallel is installed, run the tests in parallel,
# If J != 1 and GNU parallel is installed, run the tests in parallel,
# via the check_0 rule above. Otherwise, run them sequentially.
# via the check_0 rule above. Otherwise, run them sequentially.
@ -986,14 +990,14 @@ rocksdb.h rocksdb.cc: build_tools/amalgamate.py Makefile $(LIB_SOURCES) unity.cc
clean :
clean :
rm -f $( BENCHMARKS) $( TOOLS) $( TESTS) $( LIBRARY) $( SHARED)
rm -f $( BENCHMARKS) $( TOOLS) $( TESTS) $( LIBRARY) $( SHARED)
rm -rf $( CLEAN_FILES) ios-x86 ios-arm scan_build_report
rm -rf $( CLEAN_FILES) ios-x86 ios-arm scan_build_report
find . -name "*.[oda]" -exec rm -f { } \;
$( FIND) . -name "*.[oda]" -exec rm -f { } \;
find . -type f -regex ".*\.\(\(gcda\)\|\(gcno\)\)" -exec rm { } \;
$( FIND) . -type f -regex ".*\.\(\(gcda\)\|\(gcno\)\)" -exec rm { } \;
rm -rf bzip2* snappy* zlib* lz4* zstd*
rm -rf bzip2* snappy* zlib* lz4* zstd*
cd java; $( MAKE) clean
cd java; $( MAKE) clean
tags :
tags :
ctags -R .
ctags -R .
cscope -b ` find . -name '*.cc' ` ` find . -name '*.h' ` ` find . -name '*.c' `
cscope -b ` $( FIND) . -name '*.cc' ` ` $( FIND) . -name '*.h' ` ` $( FIND) . -name '*.c' `
ctags -e -R -o etags *
ctags -e -R -o etags *
format :
format :
@ -1510,10 +1514,10 @@ uninstall:
install-headers :
install-headers :
install -d $( INSTALL_PATH) /lib
install -d $( INSTALL_PATH) /lib
for header_dir in ` find "include/rocksdb" -type d` ; do \
for header_dir in ` $( FIND) "include/rocksdb" -type d` ; do \
install -d $( INSTALL_PATH) /$$ header_dir; \
install -d $( INSTALL_PATH) /$$ header_dir; \
done
done
for header in ` find "include/rocksdb" -type f -name *.h` ; do \
for header in ` $( FIND) "include/rocksdb" -type f -name *.h` ; do \
install -C -m 644 $$ header $( INSTALL_PATH) /$$ header; \
install -C -m 644 $$ header $( INSTALL_PATH) /$$ header; \
done
done
@ -1540,6 +1544,12 @@ install: install-static
JAVA_INCLUDE = -I$( JAVA_HOME) /include/ -I$( JAVA_HOME) /include/linux
JAVA_INCLUDE = -I$( JAVA_HOME) /include/ -I$( JAVA_HOME) /include/linux
i f e q ( $( PLATFORM ) , O S _ S O L A R I S )
i f e q ( $( PLATFORM ) , O S _ S O L A R I S )
ARCH := $( shell isainfo -b)
ARCH := $( shell isainfo -b)
e l s e i f e q ( $( PLATFORM ) , O S _ O P E N B S D )
ifneq ( ,$( filter $( MACHINE) , amd64 arm64 sparc64) )
ARCH := 64
else
ARCH := 32
endif
e l s e
e l s e
ARCH := $( shell getconf LONG_BIT)
ARCH := $( shell getconf LONG_BIT)
e n d i f
e n d i f
@ -1599,6 +1609,11 @@ ifeq ($(PLATFORM), OS_AIX)
EXTRACT_SOURCES = gunzip < TAR_GZ | tar xvf -
EXTRACT_SOURCES = gunzip < TAR_GZ | tar xvf -
SNAPPY_MAKE_TARGET = libsnappy.la
SNAPPY_MAKE_TARGET = libsnappy.la
e n d i f
e n d i f
i f e q ( $( PLATFORM ) , O S _ O P E N B S D )
JAVA_INCLUDE = -I$( JAVA_HOME) /include -I$( JAVA_HOME) /include/openbsd
ROCKSDBJNILIB = librocksdbjni-openbsd$( ARCH) .so
ROCKSDB_JAR = rocksdbjni-$( ROCKSDB_MAJOR) .$( ROCKSDB_MINOR) .$( ROCKSDB_PATCH) -openbsd$( ARCH) .jar
e n d i f
libz.a :
libz.a :
-rm -rf zlib-$( ZLIB_VER)
-rm -rf zlib-$( ZLIB_VER)