[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: #include's and Quoting
From: |
Steven Knight |
Subject: |
Re: #include's and Quoting |
Date: |
Thu, 6 Nov 2003 22:04:42 -0600 (CST) |
> > | [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
RE: #include's and Quoting, Steve Jones, 2003/11/07
RE: #include's and Quoting, Steve Jones, 2003/11/07