[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] __DATE__ constant, any way to format it differently ?

From: David Kelly
Subject: Re: [avr-gcc-list] __DATE__ constant, any way to format it differently ?
Date: Wed, 28 Jan 2009 15:21:15 -0600
User-agent: Mutt/

On Wed, Jan 28, 2009 at 09:23:12PM +0100, Vincent Trouilliez wrote:
> > You just want the latest revision number from Subversion
> Yep, so that when I power up the target, I know what revision of the
> code is in there, and when it was compiled. 

OK, but if you don't commit the code to svn (as Vincent has stated in
other messages in this thread) then the svn version number is only "less
than or equal to" the real version number.

I think if you don't like the format of __DATE__ then drop it into a
const during compile then pick out the parts you like when displaying.
Should be able to find them at constant offsets at run time.

The rule in the Makefile for the file containing __DATE__ needs to be an
"always build."

David Kelly N4HHE, address@hidden
Whom computers would destroy, they must first drive mad.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]