🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #205

gmake variables bugged?

#205
From: John Eldred
Date: Wed, 22 Jul 1992 06:21
31 lines
1314 bytes
Can anyone explain why recursively expanded variables are expanded in the
command part of a rule, but not in the target or dependency part, e.g.

x=      X
xxx:    $(x)
        echo $(x)

gmake (vers 3.59) says "No way to make target X", but

xxx:    $(x)
        echo $(x)
x=      X

echos 'X', i.e. x is expanded in the command, but not the dependency. Also,

x=      X
$(x):;  echo $(x)

echos 'X', but

$(x):;  echo $(x)
x=      X

gmake says "missing target name", i.e. x is expanded in the command, but not the
target.
-- 
+-----------------------+-----------------------------+----------------+
| John Eldred           | Telectronics Pacing Systems |                |
| Software Person       | 7 Sirius Rd Lane Cove 2066  | No disclaimer. |
| johne@tplrd.tpl.oz.au | NSW Australia               | No quote.      |
+-----------------------+-----------------------------+----------------+
Technical Details
Message-ID: <9207220624.AA17200@tpl68k0>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!tplrd.tpl.oz.AU!johne

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!tplrd.tpl.oz.AU!johne
From: johne@tplrd.tpl.oz.AU (John Eldred)
Subject: gmake variables bugged?
Message-ID: <9207220624.AA17200@tpl68k0>
Sender: gnulists@ai.mit.edu
Organization: Telectronics Pacing Systems
Distribution: gnu
Date: Wed, 22 Jul 1992 06:21:59 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 32