🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1006

Variable redefinition using += in GNU Make...

#1006
From: Ted Lemon
Date: Mon, 05 Oct 1992 22:58
24 lines
1536 bytes
I'm trying to use GNU Make on some of our makefiles internally, but
I find that we use a feature present in 4.3-Tahoe and SunOS make,
which is that you can add stuff to the end of a variable definition by
using a += operator; e.g.,

FOO = bar
FOO += baz

Would result in foo being set to ``bar baz''.   I notice that this
functionality is implemented differently in GNU make - a := operator
has been introduced which evaluates the RHS before assigning to the
LHS (I'm not entirely clear on how this works, but I'm sure it will be
evident when I spend a little time playing with it).

The problem is this: I am now stuck with having to choose which
implementation to support - GNU Make doesn't support the += construct,
and SunOS/BSD Make doesn't support the := construct.   Does anybody
have any plans to do anything about this, or am I putting my foot in a
religious debate by bringing this up?

			       _MelloN_
--
[Dan Quayle is] my choice, my first choice, and my only choice.
                -- President George Bush
Technical Details
Message-ID: <9210052258.AA01624@pepper.ncd.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!pepper.UUCP!mellon

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!pepper.UUCP!mellon
From: mellon@pepper.UUCP (Ted Lemon)
Subject: Variable redefinition using += in GNU Make...
Message-ID: <9210052258.AA01624@pepper.ncd.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 5 Oct 1992 22:58:21 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 25