Not all systems have svnversion installed. Fall back to svn info if svnversion fails.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-svnversion_fallback/Makefile =================================================================== --- flashrom-svnversion_fallback/Makefile (Revision 713) +++ flashrom-svnversion_fallback/Makefile (Arbeitskopie) @@ -58,7 +58,7 @@ # of the checked out flashrom files. # Note to packagers: Any tree exported with "make export" or "make tarball" # will not require subversion. The downloadable snapshots are already exported. -SVNVERSION := $(shell LC_ALL=C svnversion -cn . | sed -e "s/.*://" -e "s/([0-9]*).*/\1/" | grep "[0-9]" || echo unknown) +SVNVERSION := $(shell LC_ALL=C svnversion -cn . | sed -e "s/.*://" -e "s/([0-9]*).*/\1/" | grep "[0-9]" || LC_ALL=C svn info . | grep ^Revision | sed "s/.*[[:blank:]]+([0-9]*)[^0-9]*/\1/" | grep "[0-9]" || echo unknown)
RELEASE := 0.9.1 VERSION := $(RELEASE)-r$(SVNVERSION)
On Fri, Sep 04, 2009 at 04:28:25PM +0200, Carl-Daniel Hailfinger wrote:
Not all systems have svnversion installed. Fall back to svn info if svnversion fails.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Tested via "chmod 000 /usr/bin/svnversion", works fine.
$ make export /bin/sh: svnversion: Permission denied Export complete. Exported ./flashrom-0.9.1-r714/
Acked-by: Uwe Hermann uwe@hermann-uwe.de
Uwe.
Uwe Hermann wrote:
On Fri, Sep 04, 2009 at 04:28:25PM +0200, Carl-Daniel Hailfinger wrote:
Not all systems have svnversion installed. Fall back to svn info if svnversion fails.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
What systems would that be?
Stefan
On 04.09.2009 19:43, Stefan Reinauer wrote:
Uwe Hermann wrote:
On Fri, Sep 04, 2009 at 04:28:25PM +0200, Carl-Daniel Hailfinger wrote:
Not all systems have svnversion installed. Fall back to svn info if svnversion fails.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
What systems would that be?
A few Linux distributions and some of the BSDs. Apparently some distributors consider svnversion to be optional or superfluous.
Regards, Carl-Daniel
On 04.09.2009 18:16, Uwe Hermann wrote:
On Fri, Sep 04, 2009 at 04:28:25PM +0200, Carl-Daniel Hailfinger wrote:
Not all systems have svnversion installed. Fall back to svn info if svnversion fails.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Tested via "chmod 000 /usr/bin/svnversion", works fine.
$ make export /bin/sh: svnversion: Permission denied Export complete. Exported ./flashrom-0.9.1-r714/
Acked-by: Uwe Hermann uwe@hermann-uwe.de
Thanks, r716.
Regards, Carl-Daniel