-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ceph_ver: show the git sha1 version in the logs
- Loading branch information
Yehuda Sadeh
committed
Mar 3, 2009
1 parent
06edba7
commit c88c4da
Showing
5 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
AUTOMAKE_OPTIONS = gnu | ||
EXTRA_DIST = debian autogen.sh ceph.spec.in | ||
SUBDIRS = src | ||
|
||
dist-hook: | ||
src/make_version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
#include "acconfig.h" | ||
#include "ceph_ver.h" | ||
|
||
#define CONCAT_VER_SYMBOL(x) ceph_ver__##x | ||
|
||
#define DEFINE_VER_SYMBOL(x) int CONCAT_VER_SYMBOL(x) | ||
|
||
DEFINE_VER_SYMBOL(CEPH_GIT_VER); | ||
|
||
#define CEPH_VER VERSION "-" #CEPH_GIT_VER | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
|
||
dname=`dirname $0` | ||
|
||
git_ver=`git-rev-parse HEAD 2>/dev/null` | ||
|
||
[ -e $dname/.make_last_ver ] && \ | ||
[ -e $dname/ceph_ver.h ] && \ | ||
[ "$git_ver" == "`cat $dname/.make_last_ver`" ] && exit | ||
|
||
|
||
print_all() { | ||
echo "#ifndef __CEPH_VERSION_H" | ||
echo "#define __CEPH_VERSION_H" | ||
echo | ||
echo "#define CEPH_GIT_VER `git-rev-parse HEAD 2>/dev/null`" | ||
echo | ||
echo "#endif" | ||
|
||
} | ||
|
||
print_all > $dname/ceph_ver.h | ||
|
||
echo $git_ver > $dname/.make_last_ver | ||
|