Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - auto dependencies: (10 Items)
   
auto dependencies  
Our makefile use makedepend to implement auto dependencies but makedepend is getting old and it has trouble parsing some
 modern source code ( boost ).

I have tested with using gcc as a replacement and it's working fine so far.  However currently it's a two step process

qcc -c -E -Wp,MM ..   To generated dependencies files
qcc -c ... to compile

I'd like to use -MMD to do it in one stop, but I can't find the right combination of options to use with qcc.  I think 
this has been answer before but I can't find any reference to it.
Re: auto dependencies  
Mario Charest wrote:
> Our makefile use makedepend to implement auto dependencies but makedepend is getting old and it has trouble parsing 
some modern source code ( boost ).
> 
> I have tested with using gcc as a replacement and it's working fine so far.  However currently it's a two step process

> 
> qcc -c -E -Wp,MM ..   To generated dependencies files
> qcc -c ... to compile
> 
> I'd like to use -MMD to do it in one stop, but I can't find the right combination of options to use with qcc.  I think
 this has been answer before but I can't find any reference to it.

If you're passing -W,-MMD you need to specify the file for cc1/cc1plus 
to write out the dependencies to.

e.g qcc -Wp,-MMD,hw.d hw.c

Regards,

Ryan Mansfield
RE: auto dependencies  

> -----Original Message-----
> From: Ryan Mansfield [mailto:community-noreply@qnx.com]
> Sent: July-03-09 1:09 PM
> To: general-toolchain
> Subject: Re: auto dependencies
> 
> Mario Charest wrote:
> > Our makefile use makedepend to implement auto dependencies but
> makedepend is getting old and it has trouble parsing some modern source
> code ( boost ).
> >
> > I have tested with using gcc as a replacement and it's working fine
> so far.  However currently it's a two step process
> >
> > qcc -c -E -Wp,MM ..   To generated dependencies files
> > qcc -c ... to compile
> >
> > I'd like to use -MMD to do it in one stop, but I can't find the right
> combination of options to use with qcc.  I think this has been answer
> before but I can't find any reference to it.
> 
> If you're passing -W,-MMD you need to specify the file for cc1/cc1plus
> to write out the dependencies to.
> 
> e.g qcc -Wp,-MMD,hw.d hw.c

Ah! Didn`t try that because the gcc doc says : 

    -MD is equivalent to -M -MF file, except that -E is not implied. The driver determines file based on whether an -o 
option is given. If it is, the driver uses its argument but with a suffix of .d, otherwise it take the basename of the 
input file and applies a .d suffix.

> 
> Regards,
> 
> Ryan Mansfield
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post33059
> 
Re: auto dependencies  
Hi, Ryan,

That's exactly what the IDE's "Check Dependencies On/Off" setting
does.  :-)

Cheers,

Christian


On Fri, 2009-07-03 at 13:08 -0400, Ryan Mansfield wrote:

> Mario Charest wrote:
> > Our makefile use makedepend to implement auto dependencies but makedepend is getting old and it has trouble parsing 
some modern source code ( boost ).
> > 
> > I have tested with using gcc as a replacement and it's working fine so far.  However currently it's a two step 
process
> > 
> > qcc -c -E -Wp,MM ..   To generated dependencies files
> > qcc -c ... to compile
> > 
> > I'd like to use -MMD to do it in one stop, but I can't find the right combination of options to use with qcc.  I 
think this has been answer before but I can't find any reference to it.
> 
> If you're passing -W,-MMD you need to specify the file for cc1/cc1plus 
> to write out the dependencies to.
> 
> e.g qcc -Wp,-MMD,hw.d hw.c
> 
> Regards,
> 
> Ryan Mansfield
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post33059
> 


Re: auto dependencies  
Christian Damus wrote:
> Hi, Ryan,
> 
> That's exactly what the IDE's "Check Dependencies On/Off" setting
> does.  :-)

Yes I remember Alex asking about the options. :) The feature will be 
helpful for people using the new IDE.  But not everyone posting in 
core-dev-tools uses the IDE and/or QNX recursive mkfiles. ;)

Regards,

Ryan Mansfield
Re: auto dependencies  
On Fri, 2009-07-03 at 14:03 -0400, Ryan Mansfield wrote:

> Christian Damus wrote:
> > Hi, Ryan,
> > 
> > That's exactly what the IDE's "Check Dependencies On/Off" setting
> > does.  :-)
> 
> Yes I remember Alex asking about the options. :) The feature will be 
> helpful for people using the new IDE.  But not everyone posting in 
> core-dev-tools uses the IDE and/or QNX recursive mkfiles. ;)


Wot's all this, then?!?  Not using the IDE?  :-P

One trick that I often use when trying to figure out how to do stuff at
a "low level" is to see what some more abstract tool like the IDE does
to accomplish the same.  In a case like this, enable the IDE option on a
test project and see what kind of make magic it perpetrates.  :-)

cW


> 
> Regards,
> 
> Ryan Mansfield
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post33087
> 


________________________________________________________________________

Christian W. Damus
Software Developer, IDE Team
QNX Software Systems
Re: auto dependencies  
Hi, Mario,

Have you tried using the "Check Dependencies On/Off" context menu action
on your projects?  The latest maintenance build on IDE 4.6 (available on
the Foundry27 downloads) supports this additionally on multiple project
selection and an container projects.  When you change these settings,
you will be prompted to clean the project.  Thereafter, the IDE should
take care of all of the details for you.

HTH,

Christian


On Fri, 2009-07-03 at 13:04 -0400, Mario Charest wrote:

> Our makefile use makedepend to implement auto dependencies but makedepend is getting old and it has trouble parsing 
some modern source code ( boost ).
> 
> I have tested with using gcc as a replacement and it's working fine so far.  However currently it's a two step process

> 
> qcc -c -E -Wp,MM ..   To generated dependencies files
> qcc -c ... to compile
> 
> I'd like to use -MMD to do it in one stop, but I can't find the right combination of options to use with qcc.  I think
 this has been answer before but I can't find any reference to it.
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post33057
> 


________________________________________________________________________

Christian W. Damus
Software Developer, IDE Team
QNX Software Systems
RE: auto dependencies  

> -----Original Message-----
> From: Christian Damus [mailto:community-noreply@qnx.com]
> Sent: July-03-09 1:14 PM
> To: general-toolchain
> Subject: Re: auto dependencies
> 
> Hi, Mario,
> 
> Have you tried using the "Check Dependencies On/Off" context menu
> action
> on your projects? 

It`s not a QNX project but a C Project with our own makefile.

> The latest maintenance build on IDE 4.6 (available
> on
> the Foundry27 downloads) supports this additionally on multiple project
> selection and an container projects.  When you change these settings,
> you will be prompted to clean the project.  Thereafter, the IDE should
> take care of all of the details for you.
> 
> HTH,
> 
> Christian
> 
> 
> On Fri, 2009-07-03 at 13:04 -0400, Mario Charest wrote:
> 
> > Our makefile use makedepend to implement auto dependencies but
> makedepend is getting old and it has trouble parsing some modern source
> code ( boost ).
> >
> > I have tested with using gcc as a replacement and it's working fine
> so far.  However currently it's a two step process
> >
> > qcc -c -E -Wp,MM ..   To generated dependencies files
> > qcc -c ... to compile
> >
> > I'd like to use -MMD to do it in one stop, but I can't find the right
> combination of options to use with qcc.  I think this has been answer
> before but I can't find any reference to it.
> >
> > _______________________________________________
> > General
> > http://community.qnx.com/sf/go/post33057
> >
> 
> 
> _______________________________________________________________________
> _
> 
> Christian W. Damus
> Software Developer, IDE Team
> QNX Software Systems
> 
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post33062
> 
Re: auto dependencies  
I think the "semi-official" answer is that you can in principle include
qdepend.mk from your $QCONF_OVERRIDES.  That being said, I personally
use a one step process of my own (see the attachment from the .PHONY
onward).  It currently relies on a couple of as-yet uncommitted changes
to qmacros.mk in order to simplify things, but it can fairly easily be
made to work with a stock qmacros.mk.

On Fri, 2009-07-03 at 13:04 -0400, Mario Charest wrote:
> Our makefile use makedepend to implement auto dependencies but makedepend is getting old and it has trouble parsing 
some modern source code ( boost ).
> 
> I have tested with using gcc as a replacement and it's working fine so far.  However currently it's a two step process

> 
> qcc -c -E -Wp,MM ..   To generated dependencies files
> qcc -c ... to compile
> 
> I'd like to use -MMD to do it in one stop, but I can't find the right combination of options to use with qcc.  I think
 this has been answer before but I can't find any reference to it.
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post33057
> 
Attachment: Text qconf-override.mk 3.53 KB Text qmacros.mk 15.27 KB
Re: auto dependencies  
Oops: I should have said qdepfile.mk not qdepend.