@ -515,7 +515,8 @@ TOOL_OBJECTS = $(patsubst %.cc, $(OBJ_DIR)/%.o, $(TOOL_LIB_SOURCES))
ANALYZE_OBJECTS = $( patsubst %.cc, $( OBJ_DIR) /%.o, $( ANALYZER_LIB_SOURCES) )
ANALYZE_OBJECTS = $( patsubst %.cc, $( OBJ_DIR) /%.o, $( ANALYZER_LIB_SOURCES) )
STRESS_OBJECTS = $( patsubst %.cc, $( OBJ_DIR) /%.o, $( STRESS_LIB_SOURCES) )
STRESS_OBJECTS = $( patsubst %.cc, $( OBJ_DIR) /%.o, $( STRESS_LIB_SOURCES) )
ALL_SOURCES = $( LIB_SOURCES) $( TEST_LIB_SOURCES) $( MOCK_LIB_SOURCES) $( GTEST_DIR) /gtest/gtest-all.cc
# Exclude build_version.cc -- a generated source file -- from all sources. Not needed for dependencies
ALL_SOURCES = $( filter-out util/build_version.cc, $( LIB_SOURCES) ) $( TEST_LIB_SOURCES) $( MOCK_LIB_SOURCES) $( GTEST_DIR) /gtest/gtest-all.cc
ALL_SOURCES += $( TOOL_LIB_SOURCES) $( BENCH_LIB_SOURCES) $( ANALYZER_LIB_SOURCES) $( STRESS_LIB_SOURCES)
ALL_SOURCES += $( TOOL_LIB_SOURCES) $( BENCH_LIB_SOURCES) $( ANALYZER_LIB_SOURCES) $( STRESS_LIB_SOURCES)
ALL_SOURCES += $( TEST_MAIN_SOURCES) $( TOOL_MAIN_SOURCES) $( BENCH_MAIN_SOURCES)
ALL_SOURCES += $( TEST_MAIN_SOURCES) $( TOOL_MAIN_SOURCES) $( BENCH_MAIN_SOURCES)
@ -1353,8 +1354,9 @@ analyze_incremental:
$( MAKE) dbg
$( MAKE) dbg
CLEAN_FILES += unity.cc
CLEAN_FILES += unity.cc
unity.cc : Makefile
unity.cc : Makefile util /build_version .cc .in
rm -f $@ $@ -t
rm -f $@ $@ -t
$( AM_V_at) $( gen_build_version) > util/build_version.cc
for source_file in $( LIB_SOURCES) ; do \
for source_file in $( LIB_SOURCES) ; do \
echo " #include \" $$ source_file\" " >> $@ -t; \
echo " #include \" $$ source_file\" " >> $@ -t; \
done
done
@ -2494,12 +2496,14 @@ endif
# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
# Source files dependencies detection
# Source files dependencies detection
# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
# If skip dependencies is ON, skip including the dep files
i f n e q ( $( SKIP_DEPENDS ) , 1 )
DEPFILES = $( patsubst %.cc, $( OBJ_DIR) /%.cc.d, $( ALL_SOURCES) )
DEPFILES = $( patsubst %.cc, $( OBJ_DIR) /%.cc.d, $( ALL_SOURCES) )
D E P F I L E S + = $( patsubst %.c , $ ( OBJ_DIR ) /%.c .d , $ ( LIB_SOURCES_C ) $ ( TEST_MAIN_SOURCES_C ) )
D E P F I L E S + = $( patsubst %.c , $ ( OBJ_DIR ) /%.c .d , $ ( LIB_SOURCES_C ) $ ( TEST_MAIN_SOURCES_C ) )
i f e q ( $( USE_FOLLY_DISTRIBUTED_MUTEX ) , 1 )
i f e q ( $( USE_FOLLY_DISTRIBUTED_MUTEX ) , 1 )
DEPFILES += $( patsubst %.cpp, $( OBJ_DIR) /%.cpp.d, $( FOLLY_SOURCES) )
DEPFILES += $( patsubst %.cpp, $( OBJ_DIR) /%.cpp.d, $( FOLLY_SOURCES) )
e n d i f
e n d i f
e n d i f
# Add proper dependency support so changing a .h file forces a .cc file to
# Add proper dependency support so changing a .h file forces a .cc file to
# rebuild.
# rebuild.
@ -2539,28 +2543,9 @@ endif
build_subset_tests : $( ROCKSDBTESTS_SUBSET )
build_subset_tests : $( ROCKSDBTESTS_SUBSET )
$( AM_V_GEN) if [ -n " $$ {ROCKSDBTESTS_SUBSET_TESTS_TO_FILE} " ] ; then echo " $( ROCKSDBTESTS_SUBSET) " > " $$ {ROCKSDBTESTS_SUBSET_TESTS_TO_FILE} " ; else echo " $( ROCKSDBTESTS_SUBSET) " ; fi
$( AM_V_GEN) if [ -n " $$ {ROCKSDBTESTS_SUBSET_TESTS_TO_FILE} " ] ; then echo " $( ROCKSDBTESTS_SUBSET) " > " $$ {ROCKSDBTESTS_SUBSET_TESTS_TO_FILE} " ; else echo " $( ROCKSDBTESTS_SUBSET) " ; fi
# if the make goal is either "clean" or "format", we shouldn't
# Remove the rules for which dependencies should not be generated and see if any are left.
# try to import the *.d files.
#If so, include the dependencies; if not, do not include the dependency files
# TODO(kailiu) The unfamiliarity of Make's conditions leads to the ugly
ROCKS_DEP_RULES = $( filter-out clean format check-format check-buck-targets jclean jtest package analyze tags rocksdbjavastatic% unity.% unity_test, $( MAKECMDGOALS) )
# working solution.
i f n e q ( "$(ROCKS_DEP_RULES)" , "" )
i f n e q ( $( MAKECMDGOALS ) , c l e a n )
i f n e q ( $( MAKECMDGOALS ) , f o r m a t )
i f n e q ( $( MAKECMDGOALS ) , c h e c k - f o r m a t )
i f n e q ( $( MAKECMDGOALS ) , c h e c k - b u c k - t a r g e t s )
i f n e q ( $( MAKECMDGOALS ) , j c l e a n )
i f n e q ( $( MAKECMDGOALS ) , j t e s t )
i f n e q ( $( MAKECMDGOALS ) , r o c k s d b j a v a s t a t i c )
i f n e q ( $( MAKECMDGOALS ) , r o c k s d b j a v a s t a t i c _ d e p s )
i f n e q ( $( MAKECMDGOALS ) , p a c k a g e )
i f n e q ( $( MAKECMDGOALS ) , a n a l y z e )
- i n c l u d e $( DEPFILES )
- i n c l u d e $( DEPFILES )
e n d i f
e n d i f
e n d i f
e n d i f
e n d i f
e n d i f
e n d i f
e n d i f
e n d i f
e n d i f
e n d i f