From: ghost Date: Thu, 19 Nov 2009 10:15:19 +0000 (+0100) Subject: main/Makefile.am: fix code to generate version.h code is now als able to handle git... X-Git-Tag: 2.7.0~43 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/7a81c7d2707f237d6aee01a945028e63baf5662c main/Makefile.am: fix code to generate version.h code is now als able to handle git trees (now we generate new defines ENIGMA2_LAST_CHANGE_DATA and ENIGMA2_BRANCH (the last only for git) --- diff --git a/main/Makefile.am b/main/Makefile.am index a37289ae..7c6c520f 100644 --- a/main/Makefile.am +++ b/main/Makefile.am @@ -27,7 +27,12 @@ entries: .svn/entries version.h: entries > version.h - if [ -d .svn ]; then echo "#define ENIGMA2_CHECKOUT_TAG \"D`svn info | grep 'Last Changed Date:' | sed -e 's/[^:]*: \(....\)-\(..\)-\(..\) \(..\):\(..\):\(..\).*+.*$$/\1.\2.\3.\4.\5.\6/'`\"" >> version.h; fi + @if [ -d .svn ]; then \ + echo "#define ENIGMA2_LAST_CHANGE_DATE \"`LANG="en" svn info | grep 'Last Changed Date:' | cut -d' ' -f4`\"" >> version.h; \ + elif [ -d ../.git ]; then \ + echo "#define ENIGMA2_LAST_CHANGE_DATE \"`LANG="en" git log --max-count=1 --date=short | grep 'Date:' | cut -d' ' -f4`\"" >> version.h; \ + echo "#define ENIGMA2_BRANCH \"`LANG="en" git branch | grep '* ' | cut -d' ' -f2`\"" >> version.h; \ + fi; enigma2_LDADD_WHOLE = \ $(top_builddir)/lib/actions/libenigma_actions.a \