* Re: removing compile directive
[not found] ` <002c01c8a56b$da5ed1b0$2708a8c0@CAM.ARTIMI.COM>
@ 2008-04-25 16:32 ` grischka
2008-04-25 18:02 ` Dave Korn
0 siblings, 1 reply; 2+ messages in thread
From: grischka @ 2008-04-25 16:32 UTC (permalink / raw)
To: Dave Korn; +Cc: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: removing compile directive
2008-04-25 16:32 ` removing compile directive grischka
@ 2008-04-25 18:02 ` Dave Korn
0 siblings, 0 replies; 2+ messages in thread
From: Dave Korn @ 2008-04-25 18:02 UTC (permalink / raw)
To: 'grischka'; +Cc: help-gnu-emacs
grischka wrote on 25 April 2008 17:32:
> From: "Dave Korn":
>
>> From: grischka
>>>
>>> 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.
No it isn't: in fact, that's the very reason why the += syntax exists; it
allows you to append something yet still retain deferred evaluation.
Your assumption that 'CFLAGS += -Dxxx' is the same statement as 'CFLAGS =
$(CFLAGS) -Dxxx' is not quite right; although your assumption that it's not
the same as 'CFLAGS := $(CFLAGS) -Dxxx' is correct, it's a fallacy of the
excluded middle to assume that the only other possibility is the deferred
assignment.
In fact, += is not an operation that can be translated into a plain-old
assignment and still retain the same semantics.
> 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).
You have, of course, identified a good reason for adding a '-=' operator to
make, by analogy to why '+=' exists.
cheers,
DaveK
--
Can't think of a witty .sigline today....
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-25 18:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <00c701c8a4c8$d96134e0$a01a90d4@j4f3n1>
[not found] ` <002c01c8a56b$da5ed1b0$2708a8c0@CAM.ARTIMI.COM>
2008-04-25 16:32 ` removing compile directive grischka
2008-04-25 18:02 ` Dave Korn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).