bug-make
[Top][All Lists]
Advanced

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

[bug #30381] Don't avoid implicit rule recursion quite so soon.


From: Reinier Post
Subject: [bug #30381] Don't avoid implicit rule recursion quite so soon.
Date: Fri, 09 Jul 2010 20:24:11 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4

Follow-up Comment #3, bug #30381 (project make):

Sorry to have been so cryptic, but I really wanted to express the need and
various ideas for how to approach a solution, rather than present a detailed
proposal - for that, I would need more input from other users and more
knowledge about the details of GNU make's operation.

Safeguarding against infinite recursion is clearly useful - although GNU make
has other ways of getting into infinite loops - but the rules can be relaxed
in many different ways.  A straightforward way to address your concern is to
allow multiple iterations only when the newly considered targets are shorter
than the ones considered in previous iterations of the rule in question. 
Personally, I'd be happy to see the check dropped completely, I know how to
use make -d.

The use cases I have for it arise when I use utilities that produce files of
the same type as their input files; for instance, text processing utilities
such as grep, sort, rev, uniq, join, cut, or image processing utilities like
those of netpbm or ImageMagick.  Complex processing chains can be built up
with such utilities, and in such chains, it is sometimes useful to call the
same rule multiple times.  I'd rather just write rules that make sense and
debug cases of infinite regress with make -d than use make -d to discover
cases of make's built-in prevention and hack around it in my Makefile by
artificially duplicating the rules and renaming some of the dependencies in
question, as I'm doing now:



%.sorted: %
  @sort $? > $@

%.sorted2: %
  @sort $?  $@



I'm not saying that this use is typical (although I've personally run into
this limitation a few times in the past and only now realize what is going
on), I'm just saying that it would be a lot easier to write such rule systems
if GNU make didn't make it difficult.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?30381>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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