[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: removing compile directive
From: |
grischka |
Subject: |
Re: removing compile directive |
Date: |
Fri, 25 Apr 2008 18:32:11 +0200 |
From: "Dave Korn":
> >> On Mon, 2008-04-21 at 10:43 -0700, Brian Dessent wrote:
> >>> CFLAGS = $(filter-out -D_REMOVE_THIS_,$(CFLAGS))
> >>
> >> You can't do this: recursive variables cannot reference themselves.
> >
> > I'm actually curious whether this is considered as a feature or a
> > limitation, or maybe just tradition with GNU make?
>
> It's a limitation in the nature of the universe: the universe is finite, and
> therefore the entropic limits on computability that follow from its finite
> nature mean we can never run an infinite loop to recursion.
>
> > I mean, basically it is very clear what the writer of above line
> > has in mind, so the program could as well support it.
>
> I assume the "very clear" intention that you perceive the writer to have had
> in mind is this:
>
> CFLAGS := $(filter-out -D_REMOVE_THIS_,$(CFLAGS))
>
> i.e. a non-recursive operation; and that you are suggesting that make could
> overlook the fact that what they actually wrote was an operation that recurses
> infinitely because it has no termination condition.
What I mean is that it is not obvious that it has no termination condition,
anyway less obvious than that it could have one.
Just as you could see 'CFLAGS += -Dxxx' also as an impossibility with
no termination condition, but it is more useful if you don't.
Similar in the general case the more obvious model incidentally also
seems to be the more useful one, because (if supported) it allows
you to emulate 'CFLAGS -= -Dxxx' by other facitilities that GNU make
already has, quite easily.
Btw, could be I saw '-=' in jam (or maybe some other make program).
--- grischka
- Re: removing compile directive,
grischka <=