News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Forcing re-compiling of a .cpp file upon changes to a .h file

Started by AlexPaes, March 23, 2006, 09:22:28 PM

Previous topic - Next topic

AlexPaes

Hi everyone,

Here's the issue, i just created a small script that generates a VERSION.H file to be included in my project in order to get up-to-date versioning inside the project. Now i managed to get this script running ok by adding it in the pre-build steps section. Now my problem is that some files that include this VERSION.H don't get recompiled when the .H file changes since the .o file is already on the system. Is there any way i can force a dependency so that when building a given.o file that includes VERSION.H it will actually check the creation dates and rebuild given.o if VERSION.H is more recent?

Btw, i'm running codeblocks 1.0rc2 on linux with gcc 4.0.2.

Thanks to all for your time and help in advance.

mandrav

QuoteIs there any way i can force a dependency so that when building a given.o file that includes VERSION.H it will actually check the creation dates and rebuild given.o if VERSION.H is more recent?

Yes, there is.

Quotei'm running codeblocks 1.0rc2 on linux with gcc 4.0.2

Try a recent version directly from SVN (or a nightly build).
Be patient!
This bug will be fixed soon...

AlexPaes

hi mandrav, thanks for your post.

To tell you the truth i'm still using 1.0rc2 because i believe i've read somewhere that the export Makefile option was removed(?!?). Can you please inform me if that's the case? The export Makefile makes all the sense to me... spares me a ton of time.

Cheers

Zlika


thomas

Export makefile is not working and it will probably not be working until the compiler redesign is finished.
Since it does not work, the UI control for it is greyed out (saves a lot of complaints).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

AlexPaes

 :(

Well so it seems my main question is still pending. In the 1.0RC2 version isn't there somekind of way to force dependency on a header file? Apparently there is a way in more recent svn versions but i can't afford to loose export Makefile as i'm using that to deploy my stuff  :(

Any help is much appreciated  :)