Page 1 of 1
Triggering re-build when header changes
Posted: Mon May 27, 2013 4:54 pm
by Verax
Currently, if I only modify a header file, CodeLite doesn't recompile the source files that have included that header, as only the source files seem to be tracked. Is CodeLite able to figure out which source files have included the modified header and trigger a build of those source files?
Re: Triggering re-build when header changes
Posted: Mon May 27, 2013 5:03 pm
by eranif
Yes it does. However, it uses gcc to determine which files needs to be recompiled (its done via the Makefile)
Which compiler do you use?
Eran
Re: Triggering re-build when header changes
Posted: Mon May 27, 2013 7:51 pm
by Jarod42
Note that dependencies may not be up to date in some situations, as mentioned in
dependencies (.o.d) are not updated correctly (patch)
and in ticket
http://sourceforge.net/p/codelite/bugs/751/.
Re: Triggering re-build when header changes
Posted: Tue May 28, 2013 3:58 am
by Verax
I'm using Sourcery Codebench Lite (GCC 4.7.3 arm-none-eabi). Could you kindly describe the mechanism by which this process works so I can investigate? I'm using the -MD option in my compiler flags.
Re: Triggering re-build when header changes
Posted: Wed May 29, 2013 4:38 am
by Gibbon1
I had that problem quite awhile ago. I've totally forgotten what the issue exactly was but I have a lingering suspicion that it has to do with using the correct version of make.
Re: Triggering re-build when header changes
Posted: Sat Jun 15, 2013 5:14 am
by Verax
I think I may be on to something. My project makefiles look like this:
Code: Select all
ObjectSuffix :=.o
DependSuffix :=
PreprocessSuffix :=.i
Shouldn't the DependSuffix have a ".d"? How do I specify this in CodeLite's settings?
Re: Triggering re-build when header changes
Posted: Sat Jun 15, 2013 5:58 am
by Verax
Found it: Settings --> Build Settings... --> Compilers --> Compiler --> Advanced --> Depends extension
Setting that to ".o.d" and checking the "Use compiler -MT switch to generate source dependencies files (*.o.d)" fixed it for me.
What a relief. Having to rebuild after each minor change is major productivity killer.