[PATCH 1/1] build: handle special characters when building from git
Manuel Bachmann
manuel.bachmann at open.eurogiciel.org
Tue Jul 29 15:28:52 PDT 2014
When building from a git repository, in Makefile.am, the
macro creating the "src/git-version.h" file will fail
if the last commit subject contains a special character
such as ". Escape characters so that the output string
is, at worst, empty.
Signed-off-by: Manuel Bachmann <manuel.bachmann at open.eurogiciel.org>
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 191dcc9..68f4d18 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -112,7 +112,7 @@ endif
if HAVE_GIT_REPO
src/git-version.h : $(top_srcdir)/.git/logs/HEAD
- $(AM_V_GEN)echo "#define BUILD_ID \"$(shell git --git-dir=$(top_srcdir)/.git describe --always --dirty) $(shell git --git-dir=$(top_srcdir)/.git log -1 --format='%s (%ci)')\"" > $@
+ $(AM_V_GEN)echo "#define BUILD_ID \"${(shell git --git-dir=$(top_srcdir)/.git describe --always --dirty)} ${(shell git --git-dir=$(top_srcdir)/.git log -1 --format='%s (%ci)')}\"" > $@
else
src/git-version.h :
$(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or tarball)\"" > $@
--
1.7.10.4
More information about the wayland-devel
mailing list