Fix: Make version.h generation work with dash
authorOlivier Blin <olivier.blin@softathome.com>
Fri, 27 Oct 2017 09:46:19 +0000 (11:46 +0200)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 12 Nov 2017 19:26:32 +0000 (14:26 -0500)
version.h generation failed when using dash as shell:
Generating version.h... /bin/sh: 24: Syntax error: Missing '))'

dash does not handle the following construct:
git_describe="$((cd /path/to/lttng-tools/.; git describe) 2>/dev/null)"

Use backquotes instead.

The fix has been tested with dash and bash.

Signed-off-by: Olivier Blin <olivier.blin@softathome.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/Makefile.am

index 0536dcdf00e328a1f83433df310e7a37c888c622..3f07f2593df79b14cb37b97f87ed55f160e651f6 100644 (file)
@@ -21,7 +21,7 @@ version.h:
                ##
                ## Check whether we are in a git repo.
                ##
-               git_describe="$$($(GIT_DESCRIBE_CMD) 2>/dev/null)"; \
+               git_describe="`$(GIT_DESCRIBE_CMD) 2>/dev/null`"; \
                if [ $$? -eq 0 ]; then \
                        git_version="$${git_describe}"; \
                else \
This page took 0.025106 seconds and 4 git commands to generate.