help-make
[Top][All Lists]
Advanced

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

RE: C compiler include file searching (was: per-target vpathalternatives


From: Dave Korn
Subject: RE: C compiler include file searching (was: per-target vpathalternatives)
Date: Tue, 11 Sep 2007 10:31:04 +0100

On 10 September 2007 21:05, Philip Guenther wrote:


> Note that the first place looked is *NOT* the current directory but
> rather the directory containing the source file.  That distinction is
> important to many makefiles that build source from multiple
> directories and should not be overlooked.

  Heh, sometimes it is, sometimes it isn't... see the changing behaviour of
gcc's '-I-' option down the years...

"     In addition, `-I-' inhibits the use of the directory of the current
     file directory as the first search directory for `#include "FILE"'. "

  That little clause left me stuck in a deep dark hole which I could only get
out of by putting a #include_next in my project's debug/debug.h so that it
didn't get in the way of the STL's debug/debug.h, which various STL headers
#include and rely on the current file directory as being first in the include
search path....  Yuck.  Horrible problem, horrible solution.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....





reply via email to

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