Reputation: 233
I'm using Eclipse + CDT for a project. I'm using the "generate Makefiles automatically" option from my build settings. I have in one file the date and some values that must be actualized every time the project is compiled. But since I don't change every time this file the compiler doesn't refresh it. Is there any option so I can have a Phony target?
if I could just add some lines to the makefile will work
rm -f *.o target
but this will be removed the next time I update my project.
I found that in the settings >> c/c++ build >> behaviour there is an opportunity to write some clean variables. Could this help? I tried to write the file name but this does not work.
Upvotes: 6
Views: 5854
Reputation: 1
I added the following to the Pre-build steps and it seems to work great:
del ${CWD}\addtional_dir\file.o
Upvotes: 0
Reputation: 15483
You can give CDT a pre-build command. For me (3.6.2 on Linux):
Project
→ Properties
C/C++ Build
categorySettings
sub-categoryBuild Steps
tabPre-build steps
panerm f.o
, or somesuch)Upvotes: 8