KDevelop's QMake Manager
Steven T. Hatton
hattons at globalsymmetry.com
Sat Nov 25 23:15:57 UTC 2006
On Monday 20 November 2006 19:22, Andreas Pakulat wrote:
> On 20.11.06 16:56:23, Steven T. Hatton wrote:
> > On Sunday 19 November 2006 14:50, Andreas Pakulat wrote:
> > > On 19.11.06 14:09:22, Steven T. Hatton wrote:
> > > > But are there .h files that include those? If there are, the rpp is
> > > > probably picking them up that way.
> > >
> > > No, it's picking up the .h files that are "deeper" in the hierarchy.
> >
> > That's really what I meant. On my system those .h files #include the
> > standard headers. It appears I was wrong however. The rpp doesn't
> > appear to recurse through the #includes. Understandably. See
> > http://bugs.kde.org/show_bug.cgi?id=137644
>
> I don't think I fully understand. However creating a PCS database for
> /usr/include/c++/gcc4.x here works perfectly. Of course this might get
> some unwanted stuff like gcj-header in.
I agree that an effective PCS db can be created for GCC. It works because
most everything is in a file with a .h filename extension. With OSG, that is
not the case. In that situation all I have are the <osg/Geometry>,
<osg/Node> etc. There are no corresponding <osg/geomery.h> and the like.
I /can/ copy the entire OSG include directory to a pcs-include, giving the
extensionless filenames .h extensions, and then running the PCS tool against
that. That is a work-around, not a real solution.
What I thought might work, but didn't was to put all the extensionless file
names into a .h file as #include directives, and then point the PCS at that.
The proposition was that PCS would follow the #includes, but it doesn't.
For my own code - since all the grownups seem to be doing it - I decided to
start using extensionless header filenames. KDevelop doesn't recognize the
files, but that isn't too be of a problem since they only have a single
#include (in most cases). This is my script for creating these:
//--------------------------------------------------------------------
#!/bin/bash
recursive=""
files=""
while getopts ":r" opt; do
case $opt in
r ) recursive=true ;;
\? ) echo 'usage: $0 [-r] [directory]'
exit 1
esac
done
shift $(($OPTIND - 1))
if [ -n "$recursive" ]; then
files=$(find $1 -name "*.h");
else
files=$(find $1 -maxdepth 1 -name "*.h");
fi
for f in $files; do
ff=""
if ! [ -n "$(echo $f | grep \#)" ] && ! [ -e ${f%.h} ]; then
ff=${f#./}
echo -e "#include \"${ff##*/}\"\n" > ${f%.h} ;
echo ${f%.h};
fi;
done
//--------------------------------------------------------------------
More information about the KDevelop-devel
mailing list