bug-make
[Top][All Lists]
Advanced

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

Re: Question


From: Paul D. Smith
Subject: Re: Question
Date: Thu, 29 Aug 2002 12:23:44 -0400

%% "Kowalski, Dennis M" <address@hidden> writes:

  kdm> I am using GNU make 3.79.1 on a Sun Solaris box.

I think there is some confusion here.

  kdm> I have a dot h file that has includes in it.
  kdm> i.e.

  kdm>   a.h
  kdm>    #include b.h

  kdm> I have a new b.h in the NODE1 include directory
  kdm> The a.h and older b.h are in the NODE2 include directory

  kdm> NODE1/include
  kdm> b.h

  kdm> NODE2/include
  kdm> a.h
  kdm> b.h

  kdm> I use the following -I parameters

  kdm>   -INODE1/include  -INODE2/include

You mean, you use those parameters in your _compiler_ invocation?  Or
you use them when you invoke make?

  kdm> The make uses the b.h that is in the NODE2/include directory with
  kdm> the a.h

  kdm> If I copy a.h to the NODE1/include directory, the make uses the
  kdm> NODE2/include/b.h

  kdm> So, it looks like embedded includes do not use the -I directives
  kdm> if the target .h is in the same directory as the parent.

  kdm> Is this the normal operation or is it a bug that may be fixed in
  kdm> a newer version?

I think you're confusing operations that make performs with operations
your compiler performs.

Make doesn't tell your compiler where to find header files.  All make
does is start your compiler with the parameters you've specified,
exactly as if you'd typed them yourself on the command line.

If your compiler is finding the wrong .h file when it compiles your
source code, that's an issue you will have to take up with the compiler
documentation, etc.  There's absolutely nothing make can do about this.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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