From 5006567aeb801664a861ffe05337943c89dcae60 Mon Sep 17 00:00:00 2001
From: Benoit Rat <benoit@sevensols.com>
Date: Fri, 11 May 2012 12:48:13 +0200
Subject: [PATCH 14/19] Correct a bug in makefile

---
 Makefile |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index fd7f16e..88dfffc 100644
--- a/Makefile
+++ b/Makefile
@@ -285,14 +285,14 @@ version.c: $(SOBJS-y) $(COBJS-y)
 	@echo "const char git_revision[] = \"\";" >> $@
 	@echo "" >> $@
 else
-version.c: $(SOBJS-y) $(COBJS-y) .git/HEAD .git/index
+version.c: $(SOBJS-y) $(COBJS-y) .git/HEAD .git/index Makefile
 	@echo "/**" > $@ 
 	@echo " * File automatically generated by Makefile (DO NOT MODIFIED)\n *\n * To use this you in a c code just add the following lines:\n * " >> $@
 	@echo "\textern const char build_time[];\n\textern const char git_user[];\n\textren const char git_revision[];\n * " >> $@ 
 	@echo "**/" >> $@   
 	@echo 'const char build_time[] = __DATE__ " @ " __TIME__ ;' >> $@
 	@echo "const char git_user[] = \"$(shell git config --get user.name)\";" >> $@
-	@echo "const char git_revision[] = \"$(shell git log --abbrev-commit --pretty=oneline -1 . | cut -d" " -f1)$(shell if git status -s > /dev/null; then echo '+'; fi;)\";" >> $@
+	@echo "const char git_revision[] = \"$(shell git log --abbrev-commit --pretty=oneline -1 . | cut -d" " -f1)$(shell if git status -s > /dev/null; then echo '+'; else echo ''; fi;)\";" >> $@
 	@echo "" >> $@
 endif
 
-- 
1.7.9.5

