On Thu Aug 07 06:20:51 2008, coke wrote:
> On Thu, Aug 7, 2008 at 8:21 AM, NotFound <[EMAIL PROTECTED]>
wrote:
> > On Thu, Aug 7, 2008 at 2:06 PM, Will Coleda <[EMAIL PROTECTED]> wrote:
> >
> >> make headerizer is trying to operate on files generated by make. Given
> >> that it's supposed to be updating the header files based on the C
> >> sources, this seems vaguely reasonable, so I would suggest that the
> >> problem is actually that you're not supposed to do things in that
> >> order.
> >
> > But make can fail if headerizer has not done his job before, because
> > an include'd file may be not updated and thus the file that include it
> > fails to compile. This is not theory, is failing now that way.
> 
> headerizer doesn't need the full build. It just needs to have the
> generated C files created that it's trying to modify. Those files
> don't need to have been compiled.

I think we're talking about two different errors now, and maybe we
should split this ticket up (how do we do that, if it's even possible?).
The original problem that I was trying to talk about, which still exists
although it has been masked, is that running "make headerizer" creates
problems in the IMCC-related header files. Function prototypes are being
included before the necessary data type definitions that are required by
them. So, for instance, the prototype for
compilers/imcc/symreg.c:add_namespace is included before the definition
of IMC_Unit.

This probably isn't headerizer's fault, it's more likely the fault of
IMCC for being so damn complicated. We could change all the function
definitions in the IMCC related files to use "struct _IMC_Unit" instead
of "IMC_Unit" which would resolve the problem. Alternatively, we could
rearrange the way the header files are ordered/created, and ensure all
function prototypes are included after all data type definitions.
Neither fix should be too difficult, but I don't know which we would
prefer to pursue.

--Andrew Whitworth

Reply via email to