From c18d75f39d8e73acc6382607d2cdebade76e728a Mon Sep 17 00:00:00 2001 From: Alcaro Date: Thu, 23 Oct 2014 19:20:33 +0200 Subject: [PATCH] Get rid of fragile escaping shenanigans. --- Makefile.common | 2 +- git_version.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.common b/Makefile.common index 02488e35d4..aaf34763e2 100644 --- a/Makefile.common +++ b/Makefile.common @@ -79,7 +79,7 @@ endif GIT_VERSION := $(shell git rev-parse --short HEAD 2>/dev/null) ifneq ($(GIT_VERSION),) - DEFINES += -DHAVE_GIT_VERSION -DGIT_VERSION="\"$(GIT_VERSION)\"" + DEFINES += -DHAVE_GIT_VERSION -DGIT_VERSION=$(GIT_VERSION) OBJ += git_version.o endif diff --git a/git_version.c b/git_version.c index 92e2fe0c06..6ea0dd2987 100644 --- a/git_version.c +++ b/git_version.c @@ -14,5 +14,7 @@ */ #include "git_version.h" -const char rarch_git_version[] = GIT_VERSION; +#define STR_(x) #x +#define STR(x) STR_(x) +const char rarch_git_version[] = STR(GIT_VERSION);