[Icc-mot] Build/Link time

Edward Karpicz ekarpicz at freemail.lt
Fri May 25 23:49:01 PDT 2007


Trying to solve what you are asking about, a long long ago I did some simple 
utility that creates (and overwrites) h file at specified location. Utility 
is writing the date in format I prefer to the file, something like:

const char VERDATE[] = "date here";

and I'm including it in many projects. I was execing this utility first from 
win95/98 autoexec.bat, then I moved it to the winXP scheduler to run at 
least every day at start up. Of course h file gets touched automatically and 
just date but no time is enough for me.

Also there are freeware utilities on the net to change file date, I hope 
those can set file time to current time. If you had some common h or c file 
with __DATE__ and __TIME__ inside, then you could touch this file from the 
scheduler regularily by executing this setfiletime.

Edward





----- Original Message ----- 
From: "Barry Callahan" <barryc at rjlsystems.com>
To: "Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe 
toicc-announce if you are a member of this." <icc-mot at imagecraft.com>
Sent: Saturday, May 26, 2007 00:10
Subject: [Icc-mot] Build/Link time


>I want to keep a string that indicates the date and time that the firmware 
>was built.
>
> Right now, I'm building a string with __DATE__ and __TIME__
>
> Problem is, those are evaluated by the preprocessor at compile time. If I 
> modify a file which doesn't reference those macros and forget to do a 
> "rebuild all", the version string doesn't get updated.
>
> In ICC12 (both v6 and v7) there's a text field under the "Compiler" tab of 
> the "Compiler Options" dialog labeled "Execute Command After Successful 
> Build:"
>
> Right now, I'm using this field to touch (update the modification time) on 
> the file which builds the timestamp. That way, (assuming the build 
> completed successfully) the next time I rebuild, that file will be 
> guaranteed to recompile, regardless of whether I edit it or not.
>
> Ideally, I'd touch this file *before* building so I know that the string 
> always accurately reflects the date and time of when the program was 
> built, regardless of whether the previous compile was clean or not..
>
>
> Any suggestions?
> Thanks.
>
> Barry
>
> _______________________________________________
> Icc-mot mailing list
> Icc-mot at imagecraft.com
> http://dragonsgate.net/mailman/listinfo/icc-mot
> 




More information about the Icc-mot mailing list