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 18:06:08 +0000 (13:06 -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 24cbf09d8ad21553b5cc38ce4389879035fd008b..7de634b8e8a9046d2ed6992de8a6a30e5bd31257 100644 (file)
@@ -21,7 +21,7 @@ version.h:
                ##
                ## Check whether we are in a git repo.
                ##
                ##
                ## 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 \
                if [ $$? -eq 0 ]; then \
                        git_version="$${git_describe}"; \
                else \
This page took 0.025736 seconds and 4 git commands to generate.