On Sep 8, 2021, at 9:53 AM, Paul Smith via austin-group-l at The Open Group <austin-group-l@opengroup.org> wrote: > No, that's not right. In issue 7 there is no way to have any sort of > immediate expansion in standard make. That's clearly something that > users wanted (for the record note that I was not the one who wanted > this standardized: I didn't propose it or push for it in any way; it > was users who wanted this). > > The ::= operator added immediate expansion. That's certainly a useful > addition, and worthy of creating a new operator for. > > The only legitimate (IMO) reason to add ANOTHER operator :::= is, as > I've been trying to understand, there's some characteristic of that > behavior that people would find useful enough to change their makefiles > to use it, that they can't get by changing their makefiles to use ::= > which is already accepted. >
On Wed, 2021-09-08 at 09:29 +0100, Geoff Clare via austin-group-l: >> Just because the proposal for ::= was applied to an earlier Issue 8 >> draft than :::= doesn't mean it has any claim to be treated >> differently as part of the overall changes from Issue 7 to Issue 8. > > If we wanted to have that discussion we should have had it back before > ::= was accepted. > > At this point, ::= DOES have a claim to be treated differently because > there IS ample implementation precedent for it: as a result of the > previous decision back in 2011, GNU make has been providing the ::= > operator now for almost 8 years (released in GNU make 4.0 in October > 2013). It can't be changed now. > > We could remove ::= from the standard and instead add :::= but that > seems useless to me: there are real makefiles out there using ::= which > would be made NON-PORTABLE by removing ::= from the standard. I agree with Paul Smith. This was agreed on 8 years ago, and the widely-used GNU make has supported ::= as immediate expansion since 2013. That’s strong precedence. See the discussion here: https://www.austingroupbugs.net/view.php?id=330 The “::=“ operator was selected because “:=“ had *incompatible* semantics between BSD make and GNU make. I’m one of the people who pushed for ::= BTW, so you can blame me in part :-). Immediate expansion is *necessary* to practically support makefiles for large systems. As I explained in the original description, "Traditional make macros (defined with "=") cause exponential growth in execution time, inhibiting scalability as systems get bigger and more complex. That’s because instead of being expanded when they are defined, they are expanded on use. A widely-used alternative is ":=", which creates an 'immediate-expansion' macro (which are expanded immediately) instead of a traditional 'delayed-expansion' macro. The article "Recursive Make Considered Harmful" by Peter Miller (http://miller.emu.id.au/pmiller/books/rmch/ [^] and http://aegis.sourceforge.net/auug97.pdf) [^] notes this as a key problem when creating makefiles, and strongly recommends using := instead." And yes, “::=“ is in use. --- David A. Wheeler