[Icc-mot] Build/Link time

Gene Norris genenorris at spotengineering.com
Fri May 25 14:46:38 PDT 2007


You already effectively touch the file before building.

build. touch. build. touch. build.

works exactly the same as

touch. build. touch. build...

By updating the file after compilation, you ensure it will be compiled 
on the next make or build.

Gene

Barry Callahan wrote:
> 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
> 
> 
> 

-- 
Gene Norris
Chief Engineer

SPOT Engineering, Inc.
1261 Campground Road
Lancaster, Ohio 43130
740.654.0880
FAX.654.0889

http://www.spotengineering.com/



More information about the Icc-mot mailing list