[Cook] g++ and cook

Jerry Pendergraft jerry at endocardial.com
Mon Jan 20 02:39:23 EST 2003


I tried your example code and c_incl spit out both includes.h and a.h,
just as it should.

However, I would suggest you change your cook recipes to use cascades
anyway. That method is both faster and easier. I can send recipe examples
for both the object dependency and the dep file generation, if you would
like.

-- 
Jerry Pendergraft                        jerry.pendergraft at endocardial.com
Endocardial Solutions                    voice: 651-523-6935
1350 Energy Lane, Suite 110                fax: 651-644-7897
St Paul, MN 55108-5254

On Sun, 19 Jan 2003, Aryeh M. Friedman wrote:

> 
> This may be more of a Peter issue then anything else.
> 
> If I create a new virtual member function in C++ (GCC) the entire source tree
> that depends on that class needs to be recompiled (this is because the 
> virtual func table is created in a per instance and saved directly into
> the object file for that instance).  If it is not you often have "1 off"
> type bugs (i.e. calls to old methods that are declared after the new
> method in the class definition actually call the function befor them
> [in order of decleration] and calls the the new function [if it was not
> declared as virtual befor] call one after the new function).   I can't think
> of a good simple example for this but will work on making one and will post
> it a follow up.
> 
> Yes I know c_incl should see this but for some reason it doesn't if you
> have cascade includes such as:
> 
> in main.cpp
> 
> #include "includes.h"
> 
> main()
> {
> 	A *a;
> 
> 	...
> }
> 
> in includes.h:
> 
> #include "a.h"
> 
> in a.h:
> 
> class A {
> ....
> };
> 
> c_incl will not see that main.cpp depends on a.h.  If you need to know the
> reason why my project HAS to use this style of includes see GCC Bug report
> #8907 at gcc.gnu.org.
> 
> In short is there any way for cook to scan the *.cpp file to see if it
> depends on any classes that have change (assume that they are defined as
> class.h).
> 
> 	--Aryeh
> _______________________________________________
> Cook-users mailing list
> Cook-users at auug.org.au
> http://www.auug.org.au/mailman/listinfo/cook-users
> 




More information about the Cook-users mailing list