rocksdb/build_tools
Jim Meyering ebc647de87 build: fix missing dependency problems
Summary:
Any time one would modify a dependent of any *test*.cc file,
"make" would fail to rebuild the affected test binaries,
e.g., db_test.  That was due to the fact that we deliberately
excluded those test-related files from the definition of SOURCES
and only $(SOURCES) was used to create the automatically-generated
.d dependency files.  The fix is to generate a .d file for every
source file.
* src.mk: New file.  Defines LIB_SOURCES, MOCK_SOURCES
and TEST_BENCH_SOURCES.
* Makefile: Include src.mk.
Reflect s/SOURCES/LIB_SOURCES/ renaming.
* build_tools/build_detect_platform: Remove the code
that was used to generate SOURCES= and MOCK_SOURCES=
definitions in make_config.mk. Those lists of files
are now hard-coded in src.mk. Hard-coding this list of
sources is desirable, because without that, one risks
including stray .cc files in a build.  Not reproducible.

Test Plan:
Touch a file used by db_test's dependent .o files and ensure that
they are all recompiled.  Before, none would be:

  $ touch db/db_impl.h && make db_test
    CC       db/db_test.o
    CC       db/column_family.o
    CC       db/db_filesnapshot.o
    CC       db/db_impl.o
    CC       db/db_impl_debug.o
    CC       db/db_impl_readonly.o
    CC       db/forward_iterator.o
    CC       db/internal_stats.o
    CC       db/managed_iterator.o
    CC       db/repair.o
    CC       db/write_batch.o
    CC       utilities/compacted_db/compacted_db_impl.o
    CC       utilities/ttl/db_ttl_impl.o
    CC       util/ldb_cmd.o
    CC       util/ldb_tool.o
    CC       util/sst_dump_tool.o
    CC       util/xfunc.o
    CCLD     db_test

Reviewers: ljin, igor.sugak, igor, rven, sdong

Reviewed By: sdong

Subscribers: yhchiang, adamretter, fyrz, dhruba

Differential Revision: https://reviews.facebook.net/D33849
2015-03-06 10:55:11 -08:00
..
build_detect_platform build: fix missing dependency problems 2015-03-06 10:55:11 -08:00
fbcode_config.sh rocksdb: Update path to dev clang in fbcode 2015-02-26 15:12:08 -08:00
fbcode_config4.8.1.sh Return the build with 4.8.1 2015-01-23 14:51:27 -08:00
format-diff.sh Misc cleanup on performance branch 2014-01-17 14:26:29 -08:00
make_new_version.sh Create new branch instead of tag in make_new_version 2014-04-29 13:22:34 -04:00
make_package.sh Package generation for Ubuntu and CentOS 2014-09-29 16:09:46 -07:00
regression_build_test.sh Add db_bench with lots of column families to regression tests 2014-09-05 14:20:18 -07:00
unity Compile MemEnv with standard RocksDB library 2015-01-29 16:33:11 -08:00
valgrind_test.sh Clean up the Makefile and the build scripts 2013-08-15 12:59:45 -07:00
version.sh Cross-platform fix version.sh 2014-10-04 11:17:06 +02:00