[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird flags set by configure

From: Tim Van Holder
Subject: Re: weird flags set by configure
Date: 06 Nov 2002 11:47:38 +0100

On Wed, 2002-11-06 at 11:11, address@hidden wrote:

> DEFAULT_INCLUDES =  -I. -I$(srcdir) -I.
> This raises 2 questions in itself:
>       a. what's wrong with "DEFAULT_INCLUDES =  -I. -I$(srcdir)"

Don't know that,

> or, since
> my project's sources all lie in the root  (as much as I'd have liked it to
> be otherwise :-(..... ) "DEFAULT_INCLUDES =  -I." ?

Because automake is supposed to support building projects outside of
their source directory.  Using -I . -I <srcdir> supports this cleanly
(allowing both generated and 'real' headers to be found).

> How do I get automake to make it so?

Why would you want to?  There's no harm in -I . -I . -I . as far as I

>       b. I have a bunch of headers (also part of my project, but not ALL
> the header files) that are #included using doublequotes, and that I would
> like to seperate to an include/ subdirectory in my project. can I do that
> without touching the #include precompiler directives in the sources
> (without adding "include/") by using -I ? If so, how would that be done?

-I $(srcdir)/include
Note that using "" merely searches '.' first, then searches along the
include path normally.  Once you start relying on the include path, you
should really be using <> instead of quotes for your #include.
For one thing, using "" will cause any header of the same name in the
current dir to be used in preference of one in the include path.

Tim Van Holder <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]