Re: #include's and Quoting
Steven Knight <[email protected]> Thu, 6 Nov 2003 22:04:42 -0600 (CST)
| Newsgroups | gmane.comp.gnu.cons.general |
|---|---|
| Message-ID | <Pine.LNX.4.44.0311062158300.29517-100000@theopera.home.baldmt.com> |
> > | [snip]
> > | > I'm referring to the requirement that I change all my:
> > | >
> > | > #include "blah.h"
> > | >
> > | > lines to be
> > | >
> > | > #include <blah.h>
> > | >
> > | > in order to use repository trees.
> >
> > I believe the only place where this matters is if you use cons
> > repositories (the -R option). We use "" and <> freely and do not use
> > repositories, and it's worked like a champ.
> [snip]
>
> I believe the original question was how to work around this if they *do*
> want to use cons repositories.
The issue is that most (many?) C compilers *always* first search the
local directory to a source file for any #include "..." files. The
repository support in Cons relies on putting the right -I options on
the compilation command lines so that the repository directories are
searched in the correct order. The always-search-local-first behavior
breaks that searching.
The way to work around this would be if the compiler in question
supports an option to disable the always-search-local-first behavior.
If so, you can set that option in CFLAGS and it should find the right
files regardless of whether you use #include "..." or #include <...>.
Without such an option, I don't know of how you'd support a Cons-like
repository feature in any build tool, because it's the underlying
compiler behavior that's at odds with how repository is designed to
work...
--SK
_______________________________________________
[email protected]
http://mail.gnu.org/mailman/listinfo/cons-discuss
Cons URL: http://www.dsmit.com/cons/