avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Adding date/version information to project??


From: Russell Shaw
Subject: Re: [avr-gcc-list] Adding date/version information to project??
Date: Tue, 29 Nov 2005 15:35:19 +1100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.11) Gecko/20050914 Debian/1.7.11-1

address@hidden wrote:
Hi all:

I am looking for an automated way to update a static string in program
space when my project is built. Is there an easy way to do this, either
by adding an extra target to the makefile, or some other way? I'd prefer
not to manually have to change the information, and I'd also prefer for
it to NOT change when none of the other source files change. That is,
the requirement is as follows:

1. The date/other information is changed when a build occurs, ie "make"
or "make all" or "make target" - basically anything which calls the
linker; maybe the clue is there. 2. The date/other info is NOT changed when a build does not occur. Eg,
"make program" causes no change in the string if the linker is not
called, nor does it change if the target is up to date already.
3. I know all this can be done using CVS/SVN $Id$ tags, but I don't have
a cvs/svn server here at work, and I don't want to go through the hassle
of setting one up in this windows-only shop. I also know that I should
be using version control here...

Any ideas??

In the makefile rule that calls the linker, a shell command could get
the current date and then edit the resulting binary to replace a special
marker string with the current date. There might be a way to edit the
linker script to edit a string before the linker is run too.




reply via email to

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