Move cpp options handling to front ends?

Neil Booth neil@daikokuya.co.uk
Fri Jul 26 05:14:00 GMT 2002


Zack Weinberg wrote:-

> This seems like a good move, except for one thing: when we finally get
> cpplib shifted to its own directory, I want that dir to provide a
> 'makedepend' program which we can then use to generate dependencies
> for the build over in the gcc directory.  This program will probably
> need to understand at least -I and -D switches.

OK.  It's easy to get the client program to recognize the leading 'D'
or 'I' or 'U' (might as well).  cpp_define and cpp_undef are already
provided, just pass them the following argument (or next byte if
not NUL) so that's trivial.

If we export an interface that does the equivalent of taking an
argument to "-I" will that do it?  If we really need to support
the equivalent of -iwhatever, then we might be able to do it
with an extra argument or two in the future.  But only if necessary.

I imagine this is enough for fix-header too, but I'll check.

Sound OK?

Neil.



More information about the Gcc mailing list