bugmake - Bugs: bug #1869, $@ is not updated it the target...

 
 

bug #1869: $@ is not updated it the target consists of target specific variables

Submitted by:  Invalid User ID <Invalid User ID>
Submitted on:  Tue 03 Dec 2002 01:24:41 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 3.79.1Operating System: POSIX-Based
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 03 Dec 2002 02:27:23 PM UTC, comment #1:

You are misunderstanding what's happening. $@ is not being set incorrectly; $@ is set to the name of the target, just as it should be. The target name IS just "/foo", just as $@ reports.

That's because target-specific variables are not in scope except for within a command script (see the GNU make manual): outside of a command script (say, for example, in the target or prerequisite list) the global value is always used. In this case, there is no global value for $(DIR) so it's empty... and so the target is just "/foo".

The second echo works because $(DIR) is set to the target specific value in the command script.

If you set the global value of DIR to something you'll see that this value is what $@ reports.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 03 Dec 2002 02:27:23 PM UTCpsmithStatusNone=>(Error - Not Found)
  Assigned toNone=>NA
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1