Triggering Clean Build

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Triggering Clean Build

667 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jdurand on Wed Dec 12 13:51:13 MST 2012
In one project I use the __DATE__ string in several places.  I just ran into a momentary bit of confusion when the date showed up as yesterday's in one bit of code, then I realized that file hadn't changed since yesterday so of course the __DATE__ string hadn't been updated.

A Clean and build of course fixes this.  Is there a way to trigger a Clean on the first build of a new day in case I forget?
0 Kudos
Reply
3 Replies

659 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Dec 13 09:15:00 MST 2012
Just to clarify, I was suggesting launch the headless clean, followed by the IDE proper, from a batch file. Thus rather than launching LPCXpresso at the start of the day from the Start menu etc, you would just double click on the batch file.


Regards,
CodeRedSupport
0 Kudos
Reply

659 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jdurand on Thu Dec 13 08:54:11 MST 2012
Thanks.  Until now I'd never run into a case where I had the __DATE__ in more than one file and needed them all the same.

The only other thing I can think of is referencing it with a pointer and making sure there's only one copy in memory and have that defined in something that's small and always changed, maybe main() and then use a pre-build touch to make sure that's always built.
0 Kudos
Reply

659 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Dec 13 05:43:45 MST 2012
Can't think of an obvious way to do this directly within the IDE.

What you could do though is change the way that you launch the product, such that you do a "headless" build first to do the clean (and initial rebuild), and then start up the IDE itself to carry on with your work for the new day...

http://support.code-red-tech.com/CodeRedWiki/HeadlessBuild

Regards,
CodeRedSupport.
0 Kudos
Reply