rocksdb/build_tools
Jim Meyering a42324e370 build: do not relink every single binary just for a timestamp
Summary:
Prior to this change, "make check" would always waste a lot of
time relinking 60+ binaries. With this change, it does that
only when the generated file, util/build_version.cc, changes,
and that happens only when the date changes or when the
current git SHA changes.

This change makes some other improvements: before, there was no
rule to build a deleted util/build_version.cc. If it was somehow
removed, any attempt to link a program would fail.
There is no longer any need for the separate file,
build_tools/build_detect_version.  Its functionality is
now in the Makefile.

* Makefile (DEPFILES): Don't filter-out util/build_version.cc.
No need, and besides, removing that dependency was wrong.
(date, git_sha, gen_build_version): New helper variables.
(util/build_version.cc): New rule, to create this file
and update it only if it would contain new information.
* build_tools/build_detect_platform: Remove file.
* db/db_impl.cc: Now, print only date (not the time).
* util/build_version.h (rocksdb_build_compile_time): Remove
declaration.  No longer used.

Test Plan:
- Run "make check" twice, and note that the second time no linking is performed.
- Remove util/build_version.cc and ensure that any "make"
command regenerates it before doing anything else.
- Run this: strings librocksdb.a|grep _build_.
That prints output including the following:

  rocksdb_build_git_date:2015-02-19
  rocksdb_build_git_sha:2.8.fb-1792-g3cb6cc0

Reviewers: ljin, sdong, igor

Reviewed By: igor

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D33591
2015-02-19 13:11:10 -08:00
..
build_detect_platform build: do not relink every single binary just for a timestamp 2015-02-19 13:11:10 -08:00
fbcode_config.sh rocksdb: Enable scan-build static analysis 2015-02-03 21:43:06 -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