diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2012-11-27 02:34:56 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2012-12-12 15:34:37 +0100 |
commit | 0be793e674c8b076f0e8bf327257f15803480f49 (patch) | |
tree | 28c42a679265d25ea41f4265232e2bcc167b1f49 /lib/version.h.in | |
parent | zebra: include intf when sending IPv4 nexthop to FPM (diff) | |
download | frr-0be793e674c8b076f0e8bf327257f15803480f49.tar.xz frr-0be793e674c8b076f0e8bf327257f15803480f49.zip |
build: include git info
If enabled with --with-pkg-gitversion on ./configure, this will append
git version strings and branch information at the following places:
- overall version number: 0.99.21-g0123456
- login motd and show version: tag information + git id + branches
Sample output:
Hello, this is Quagga (version 0.99.21-g14b49ad-dirty).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
This is a git build of quagga_0_99_21_release-106-g14b49ad-dirty
Associated branch(es):
local:master
[v2]: fix build without gitinfo (add "else" branch)
[v2]: fix for repos without any tags (different git describe output)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/version.h.in')
-rw-r--r-- | lib/version.h.in | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/version.h.in b/lib/version.h.in index 429474d14..7e9985f00 100644 --- a/lib/version.h.in +++ b/lib/version.h.in @@ -24,9 +24,20 @@ #ifndef _ZEBRA_VERSION_H #define _ZEBRA_VERSION_H +#ifdef GIT_VERSION +#include "gitversion.h" +#endif + +#ifndef GIT_SUFFIX +#define GIT_SUFFIX "" +#endif +#ifndef GIT_INFO +#define GIT_INFO "" +#endif + #define QUAGGA_PROGNAME "@PACKAGE_NAME@" -#define QUAGGA_VERSION "@PACKAGE_VERSION@" +#define QUAGGA_VERSION "@PACKAGE_VERSION@" GIT_SUFFIX #define ZEBRA_BUG_ADDRESS "@PACKAGE_BUGREPORT@" |