Fix: git version build system integration (v2)
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 29 Jul 2014 22:36:51 +0000 (18:36 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 30 Jul 2014 12:46:28 +0000 (08:46 -0400)
commit4c6ac053271850d24b2eda44a78f066c332880e1
tree1d6afe93566e3348983ca159a1df0074b1dcd159
parent4900d3cd9c4accc131a6a79986151cf3e6236031
Fix: git version build system integration (v2)

Fix:
- Don't overwrite version.h if the previous content matches.
- While we are there, if we notice the previous content matches,
  print a (cached) message to show that we do not overwrite the
  content.
- Introduce LTTNG_TOOLS_BUILD_GIT_SOURCE automake conditional rather
  than compile-time define to disable the feature. It ensures we
  do not invoke "git describe" when configure --disable-git-version
  has been requested.
- Use git describe rather than git describe --long --all. Based
  on the last tag, and adds the first numbers of git revision.
  Last tag is useful both to the developer and in a bug report,
  whereas the branch name returned by --long --all is meaningless
  in a bug report.
- We want to ship version.h.tmpl in the tarball (make dist), not
  version.h which is generated. Someone could very well do a
  git init on the extracted tarball and want to have git tracking
  support.
- Fix the git prefix " - " that is incorrectly printed in some
  situations, e.g. when GIT_SOURCE was active, but we are in
  a non-git tree (or git is not available).
- Fix incorrect handling of out of tree build. Invoke git describe from
  top_srcdir.

Changelog since v1:
- Add missing comma for lttng usage output.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
configure.ac
include/Makefile.am
include/version.h.tmpl
src/bin/lttng/commands/version.c
src/bin/lttng/lttng.c
This page took 0.025354 seconds and 4 git commands to generate.