help-make
[Top][All Lists]
Advanced

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

Re: Reading makefile 'xxx' -> problem


From: Paul D. Smith
Subject: Re: Reading makefile 'xxx' -> problem
Date: Wed, 9 Jul 2003 17:16:04 -0400

%% "Guillaume Dupuis" <address@hidden> writes:

  gd> I am having a hard time to understand why gmake would search a
  gd> Makeconf in '../../nucleus' when he has a Makefile in '.'. I can
  gd> see this when using the '-d' debug switch in
  gd> gmake. ../../nucleus/Makeconf (which is a totally different
  gd> project) must absolutely not be used because it will conflict with
  gd> the building of targets in the local project.

You mean, you ran "include Makeconf" and it found the wrong one?
 
  gd> Is there a way to:
  gd> 1- know why it would search in a totally innapropriate directory for a
  gd> Makeconf
  gd> 2- exclude this path (../../nucleus) from the Makefile search path

GNU make's algorithm for include processing is very trivial:

 a) First it looks at the current work directory where the GNU make
    program is running (_not_ where the current makefile lives, if those
    happen to be different).

 b) If it's not found from step (a), it checks each of the directories
    specified with -I on the GNU make invocation line in order.  These
    could be set through the environment as well.

That's all there is to it.

-- 
-------------------------------------------------------------------------------
 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]