[Top][All Lists]

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

Re: Multiple invocations of GnuMake

From: Paul D. Smith
Subject: Re: Multiple invocations of GnuMake
Date: Fri, 30 Jun 2006 15:14:01 -0400

%% "Tobias Contreras" <address@hidden> writes:

  tc> I need to generate both product.mak and later, a dependency file.
  tc> The dependency file requires GnuMake to have included the defines
  tc> from product.mak (these affect dependencies).  GnuMake's behaviour
  tc> for handling self-generated include files is to realize the file
  tc> is required, execute the rule to create it, and then restart the
  tc> script from scratch.  If I use one pass, product.mak is generated
  tc> and then the dependency file is generated, satisfying their
  tc> interdependence.  Only then does GnuMake restart from scratch, at
  tc> which point it has created both files.  The problem is that the
  tc> dependencies were created before product.mak was included.  Hence,
  tc> the platform-specific defines weren't in place.  To get the job
  tc> done in a single GnuMake call, we'd need a way to instruct GnuMake
  tc> to restart after creating any one given include file.

  tc> So how can I make something like this work in one pass instead of
  tc> two?  Using 3.79.1

Erhm... you can't, as far as I can think, without using
recursion/multiple calls to make.

But, you could do it in one pass with 3.80 or 3.81, using $(eval ...)

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "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]