bug-make
[Top][All Lists]
Advanced

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

Re: Possible GNU Make bug(?)


From: Paul D. Smith
Subject: Re: Possible GNU Make bug(?)
Date: Wed, 6 Feb 2002 17:45:03 -0500

%% Tim Noell <address@hidden> writes:

  tn> Attached please find gnumakebug.tar.gz, containing my minimum
  tn> example.

Offhand I'd prefer the files to be attached outside of a compressed tar
file, unless they're large; it's much simpler to read them in your email
than it is to save off the .tar.gz, uncompress, then read them.  Thx!

  tn> The Makeifle has a simple target "echoit" that echoes a string
  tn> that is built up by two included makefiles (inclfile[12].mk) that
  tn> are made from their "sources" (inclfilep[12].stub).  At the time
  tn> of invocation of make, the files inclfile[12].mk do not exist.
  tn> The twist here is that the rule that is used to make the *.mk
  tn> files ( the %.mk : rule), makes BOTH *.mk files.

In that case, your makefile is written incorrectly.

  tn> However, subsequently, make decides it needs to make the second
  tn> one again.

Yes.

  tn> Subsequently, on line 37, make says that inclfile1.mk does not exist!

As far as make knows, it doesn't.  Make knows what was in the directory
before it ran, and it knows what it asked you to build, and in that
world this file is non-existent.  Make keeps an internal directory
cache, which significantly speeds up its processing.  If your rules
build targets that your makefile doesn't tell make about, then it
doesn't know they're there.

  tn> I would really like to get a fix and/or work around for this
  tn> problem, as it is causing me a non-scalable performance hit with a
  tn> growing re-usable component build environment.

You need to rewrite your makefile so that it doesn't build multiple make
targets (in this instance, each included makefile is considered a
separate target so it can be rebuilt for re-exec) with a single rule.

Either create the individual files individually, or compact them all to
be built by a single target.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "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]