🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by John Eldred Wed, 22 Jul 1992 06:21
gmake variables bugged?
#205
Author: 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.      |
+-----------------------+-----------------------------+----------------+
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads