From 5e90a5a958a60fb2d9c84621dd706baadd5e629d Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 4 Apr 2014 12:00:06 -0400 Subject: [PATCH] FS-6430: fix running of print_git_revision from builddir not in src tree --- Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6cb900d4a1..3fa74e029d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -416,9 +416,9 @@ src/switch_version.lo: src/include/switch_version.h src/include/switch_version.h: src/include/switch_version.h.in Makefile $(switch_builddir)/build/print_git_revision $(libfreeswitch_la_SOURCES) $(library_include_HEADERS) @cat $< > $@; \ - if [ -d .git ] && [ -n "$$(which git)" ]; then \ + if [ -d $(switch_srcdir)/.git ] && [ -n "$$(which git)" ]; then \ xver="$$(cd $(switch_srcdir)/ && $(switch_builddir)/build/print_git_revision)"; \ - xhver="$$(cd $(switch_srcdir)/ $(switch_builddir)/build/print_git_revision -h)"; \ + xhver="$$(cd $(switch_srcdir)/ && $(switch_builddir)/build/print_git_revision -h)"; \ sed \ -e "/#define *SWITCH_VERSION_REVISION[^a-zA-Z0-9_]/{s/\"\([^\"]*\)\"/\"\1$$xver\"/;}" \ -e "/#define *SWITCH_VERSION_REVISION_HUMAN[^a-zA-Z0-9_]/{s/\"\([^\"]*\)\"/\"\1$$xhver\"/;}" \