]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6430: try to fix print_git_revision when running from builddir not inside src...
authorMichael Jerris <mike@jerris.com>
Fri, 4 Apr 2014 15:09:47 +0000 (11:09 -0400)
committerMichael Jerris <mike@jerris.com>
Fri, 4 Apr 2014 15:09:47 +0000 (11:09 -0400)
Makefile.am

index d24060346d064aa6b723c8a5158b1ffc50101337..6cb900d4a1b3b4fc6922d0e0c3d0b59a1164fa32 100644 (file)
@@ -409,16 +409,16 @@ $(OUR_MODULES): $(switch_builddir)/modules.conf libfreeswitch.la
           || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
        test -z "$$fail"
 
-build/print_git_revision: build/print_git_revision.c
+$(switch_builddir)/build/print_git_revision: $(switch_srcdir)/build/print_git_revision.c
        $(CC_FOR_BUILD) -o $@ $<
 
 src/switch_version.lo: src/include/switch_version.h
 
-src/include/switch_version.h: src/include/switch_version.h.in Makefile build/print_git_revision $(libfreeswitch_la_SOURCES) $(library_include_HEADERS)
+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 \
-         xver="$$(./build/print_git_revision)"; \
-         xhver="$$(./build/print_git_revision -h)"; \
+         xver="$$(cd $(switch_srcdir)/ && $(switch_builddir)/build/print_git_revision)"; \
+         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\"/;}" \