From: Michael Jerris Date: Fri, 4 Apr 2014 16:00:06 +0000 (-0400) Subject: FS-6430: fix running of print_git_revision from builddir not in src tree X-Git-Tag: v1.5.12~249 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e90a5a958a60fb2d9c84621dd706baadd5e629d;p=thirdparty%2Ffreeswitch.git FS-6430: fix running of print_git_revision from builddir not in src tree --- 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\"/;}" \