diff options
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 38182c5..e60f9b4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -58,6 +58,7 @@ defaults.hh: Makefile | |||
58 | 58 | ||
59 | defaults.cc: force | 59 | defaults.cc: force |
60 | @( \ | 60 | @( \ |
61 | GITDIR=$(top_srcdir)/.git; \ | ||
61 | echo '#include "defaults.hh"'; \ | 62 | echo '#include "defaults.hh"'; \ |
62 | echo ''; \ | 63 | echo ''; \ |
63 | echo 'std::string realProgramName(const std::string& name) {'; \ | 64 | echo 'std::string realProgramName(const std::string& name) {'; \ |
@@ -65,7 +66,7 @@ defaults.cc: force | |||
65 | echo '}'; \ | 66 | echo '}'; \ |
66 | echo ''; \ | 67 | echo ''; \ |
67 | echo 'const char* gitrevision() {'; \ | 68 | echo 'const char* gitrevision() {'; \ |
68 | echo ' return "'`cat ../.git/$$(cat ../.git/HEAD | cut -f 2 -d ' ')`'";';\ | 69 | echo ' return "'`cat $$GITDIR/$$(cat $$GITDIR/HEAD | cut -f 2 -d ' ')`'";';\ |
69 | echo '}' ) > defaults_tmp.cc | 70 | echo '}' ) > defaults_tmp.cc |
70 | @if ! cmp defaults_tmp.cc defaults.cc ; then cp defaults_tmp.cc defaults.cc; fi | 71 | @if ! cmp defaults_tmp.cc defaults.cc ; then cp defaults_tmp.cc defaults.cc; fi |
71 | @rm defaults_tmp.cc | 72 | @rm defaults_tmp.cc |