Force recompile of a particular file

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
        I have one file in my project that uses the _DATE_ macro to place a date stamp of the last compile into Flash. However, if the file was not changed, it is not compiled automatically. How can I force the recompiling of a selected file everytime a new hex file is built?   
0 Likes
9 Replies
Anonymous
Not applicable
        Hi ado   
How about Clean and Build?   
Is it re-compile all?   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

...or do a right-click on the file in the workspace explorer and select "Compile"

   

 

   

Bob

0 Likes
Anonymous
Not applicable
        Of course, I can manually force the compilation of the particular file. But that is a manual act, and if it is forgotten (there are several developers) then the resulting image might be unusable. (I cannot explain why that is).   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Then use a script to force compile/linker options, and distribute that

   

to the development team. That way the hex file productuion will always

   

come from the same directives.

   

 

   

See applicable compiler/linker manual to write the script.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable
        How was the macro value changed? If you change one of the files, it should re-compile the change file when you build the project. Do you meam that you want to re-build automactially after chaning a file?   
0 Likes
Anonymous
Not applicable
        Hi HL   
He said ...   
there is a DATE macro in file1   
when change the file1 that is show correct date   
but change file except file1 the build is not show updated date.   
that is no help   
I wonder handy way but can't find good clue.   
0 Likes
Anonymous
Not applicable

I may have miss something here. If there is not change in the macro, changing other files would not re-compile the file with the macro, that I understand. 

   

But there is no change to the value of the macro. so what is the problem? 

0 Likes
Anonymous
Not applicable

Ok, I see, the DATE macro is the current data of the system. He want this to be included in the files that was last change.

0 Likes
Anonymous
Not applicable
        I think ...   
If I can change and add to MAKEFILE easily,   
Compile the file have DATE macro, unconditionally   
But I don know how to modify it.   
Pre-compile? Script?   
0 Likes