main/Makefile.am: support to extract version information from (git) tarballs created...
authorghost <andreas.monzner@multimedia-labs.de>
Thu, 19 Nov 2009 18:08:47 +0000 (19:08 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Thu, 19 Nov 2009 18:09:15 +0000 (19:09 +0100)
this needs latest bitbake changes done in our bitbake tree today

main/Makefile.am

index 7c6c520f502cf9eb1c6493206b5f5d142a8bff30..4f26387e09cbd7f8063e9259acf3b3160f19e679 100644 (file)
@@ -30,8 +30,13 @@ version.h: entries
        @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; \
+               if [ -f ../.git/last_commit_info ]; then \
+                       echo "#define ENIGMA2_LAST_CHANGE_DATE \"`cat ../.git/last_commit_info | grep 'Date:' | cut -d' ' -f4`\"" >> version.h; \
+                       echo "#define ENIGMA2_BRANCH \"`cat ../.git/branch`\"" >> version.h; \
+               else \
+                       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; \
        fi;
 
 enigma2_LDADD_WHOLE = \