Re: IDL dependency tracking
- From: Maciej Stachowiak <mjs noisehavoc org>
- To: Mark McLoughlin <mark skynet ie>
- Cc: Maciej Stachowiak <mjs noisehavoc org>, orbit-list gnome org,gnome-2-0-list gnome org
- Subject: Re: IDL dependency tracking
- Date: Tue, 14 Aug 2001 14:51:24 -0700
On 14Aug2001 10:52AM (+0100), Mark McLoughlin wrote:
> Hi Maciej,
>
> On Tue, 14 Aug 2001, Maciej Stachowiak wrote:
>
> > Here's a patch that adds dependency tracking support to the ORBit2 IDL
> > compiler, and uses the new feature throughout the build. I also
> > sanitized the IDL build in other ways while I was at it. No more
> > infinite loops of error output when you make a mistake in an IDL
> > file. :-)
> >
> > ORBit2 passes `make distcheck' with this, for me anyway. gmake-isms
> > are properly restricted to maintainer-mode.
> >
> > Does anyone object to this? Once I get this in I'd like to fix IDL
> > compilation for the rest of GNOME 2.
>
> This looks great to me. Very useful.. I do have one concern,
> though...
>
> > +static void
> > +output_deps(IDL_tree tree,
> > + OIDL_Run_Info *rinfo,
> > + OIDL_C_Info *ci)
> > +{
> > + if(!tree) return;
> > +
> > + switch(IDL_NODE_TYPE(tree)) {
> > + case IDLN_SRCFILE:
> > + {
> > + char *idlfn = IDL_SRCFILE(tree).filename;
> > + fprintf (ci->fh, " \\\n\t%s", idlfn);
> > + }
> > + break;
> > + case IDLN_MODULE:
> > + output_deps(IDL_MODULE(tree).definition_list, rinfo, ci);
> > + break;
> > + case IDLN_LIST:
> > + {
> > + IDL_tree sub;
> > +
> > + for(sub = tree; sub; sub = IDL_LIST(sub).next) {
> > + output_deps(IDL_LIST(sub).data, rinfo, ci);
> > + }
> > + }
> > + break;
> > + case IDLN_INTERFACE:
> > + output_deps(IDL_INTERFACE(tree).body, rinfo, ci);
> > + break;
> > + default:
> > + break;
> > + }
> > +}
>
> Why do you keep traversing the tree past IDLN_SRCFILE? Am I
> being stupid or are the IDLN_MODULE, IDLN_LIST, and IDLN_INTERFACE
> cases not needed ?
I'm sure the IDLN_LIST case is needed, because I think the top level
of the parse is an IDLN_LIST. I am not sure about IDLN_MODULE and
IDL_INTERFACE; these I copied
It really depends on just where a #include is OK in the parse.
>
> Also, since the rest of ORBit2's source doesn't have copyright
> headers, maybe this shouldn't either?
>
> Actually, Elliot, why are there no copyright headers?
I'm willing to remove the GPL notice part of it, but not my copyright
notice. I think including the latter is definitely legally required.
I actually copied this copyright header from another file in the same
directory to match the style, so I think it's not 100% correct to
state that the rest of the ORBit2 sources don't use it.
IMO, every file should have at least a copyright notice and ideally
the full GPL notice. The GPL strongly recommends doing so. But I'm
happy to cut it down to just the copyright notice.
Anyway, I'll commit it without the full license notice and we can take
it from there.
- Maciej
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]