A NOTE has been added to this issue. 
====================================================================== 
https://www.austingroupbugs.net/view.php?id=1471 
====================================================================== 
Reported By:                joerg
Assigned To:                
====================================================================== 
Project:                    Issue 8 drafts
Issue ID:                   1471
Category:                   Shell and Utilities
Type:                       Enhancement Request
Severity:                   Editorial
Priority:                   normal
Status:                     New
Name:                       Jörg Schilling 
Organization:                
User Reference:              
Section:                    make 
Page Number:                2888- 
Line Number:                97001- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2021-05-16 12:15 UTC
Last Modified:              2021-07-10 18:03 UTC
====================================================================== 
Summary:                    Add an orthogonal interface for immediate macro
expansion definitions to make
====================================================================== 

---------------------------------------------------------------------- 
 (0005404) psmith (developer) - 2021-07-10 18:03
 https://www.austingroupbugs.net/view.php?id=1471#c5404 
---------------------------------------------------------------------- 
I reject the assertion that GNU make's documentation doesn't clearly define
the behavior of "+=" in the context of immediately expanded variables. 
There's an entire section of the manual devoted to this, with examples:

  https://www.gnu.org/software/make/manual/html_node/Appending.html

I also don't agree that this behavior wasn't well-described by the request
to add ::= and += to the standard.  I can't speak to what was or wasn't
discussed in the teleconference but the change text is clear:

> The following form (the "append" form) modifies a macro by appending
additional text to it:
>   string1 += [string2]
>
> After the append form:
> ...
> * If the macro exists and is an immediately-expanded macro, it appends a
space and the
>   evaluation of string2 to the value currently assigned to string1.
> ...

and this text survived more or less intact through to the final wording. 
There was nothing hidden about this.


Regarding this proposal, I am ambivalent on +:=.  One reason I'm ambivalent
is that in 25+ years of maintaining GNU make I don't ever recall anyone
wanting the ability to add immediately expanded text to a deferred
expansion variable.  The other reason is that this same behavior can
already be had, although it requires using two variables:

This:

  D = a
  D +:= $(VAR)

can be written:

  D = a
  I ::= $(VAR)
  D += $I

If it's really the case that you always want this behavior then that's
annoying.  But as I said, no one has ever asked for this so I question
whether it's really something people need a lot.  If people use it only
occasionally then the two-variable version might even be preferred as more
clearly understandable.

Another reason for my ambivalence is that these do exactly the same thing:

  A ::= b
  A += $(VAR)

and

  A ::= b
  A +:= $(VAR)

which makes the latter seem redundant to me.

The :::= operator seems wholly unnecessary.  We have two types of variables
and we have two assignment operators for them, which is sufficient.  If
there is a case to be made that putting an already-expanded value into a
delayed expansion macro is useful then this:

  A :::= $(VAR)

can be replaced by:

  A =
  A +:= $(VAR)

or using the current POSIX standard with no changes:

  A =
  I ::= $(VAR)
  A += $I 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2021-05-16 12:15 joerg          New Issue                                    
2021-05-16 12:15 joerg          Name                      => Jörg Schilling 
2021-05-16 12:15 joerg          Section                   => make            
2021-05-16 12:15 joerg          Page Number               => 2888-           
2021-05-16 12:15 joerg          Line Number               => 97001-          
2021-05-16 14:35 shware_systems Note Added: 0005356                          
2021-05-16 17:18 psmith         Note Added: 0005357                          
2021-05-16 19:02 shware_systems Note Added: 0005358                          
2021-05-16 19:12 kre            Note Added: 0005359                          
2021-05-16 19:49 shware_systems Note Added: 0005360                          
2021-05-16 21:26 joerg          Note Added: 0005361                          
2021-05-16 21:27 joerg          Note Edited: 0005361                         
2021-05-22 19:02 psmith         Note Added: 0005363                          
2021-07-08 16:43 geoffclare     Note Added: 0005393                          
2021-07-08 16:57 hvd            Note Added: 0005394                          
2021-07-08 19:30 steffen        Note Added: 0005395                          
2021-07-08 19:32 steffen        Note Added: 0005396                          
2021-07-08 20:01 kre            Note Added: 0005397                          
2021-07-08 20:21 steffen        Note Added: 0005398                          
2021-07-08 20:34 steffen        Note Added: 0005399                          
2021-07-08 21:15 kre            Note Added: 0005400                          
2021-07-08 22:33 steffen        Note Added: 0005401                          
2021-07-08 22:33 steffen        Note Added: 0005402                          
2021-07-10 12:30 joerg          Note Added: 0005403                          
2021-07-10 18:03 psmith         Note Added: 0005404                          
======================================================================


  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to