all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Dave Korn" <dave.korn@artimi.com>
To: "'grischka'" <grishka@gmx.de>
Cc: help-gnu-emacs@gnu.org
Subject: RE: removing compile directive
Date: Fri, 25 Apr 2008 19:02:05 +0100	[thread overview]
Message-ID: <023a01c8a6fe$7853f010$2708a8c0@CAM.ARTIMI.COM> (raw)
In-Reply-To: <040901c8a6f2$1a209ae0$5e45fe91@j4f3n1>

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....





      reply	other threads:[~2008-04-25 18:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='023a01c8a6fe$7853f010$2708a8c0@CAM.ARTIMI.COM' \
    --to=dave.korn@artimi.com \
    --cc=grishka@gmx.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.