bugmake - Bugs: bug #9254, target specific variables do not...

 
 

bug #9254: target specific variables do not work well with stem value

Submitted by:  Alon Blayer-Gat <alonbg>
Submitted on:  Tue 08 Jun 2004 09:25:36 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.80Operating System: Any
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.

 

Mon 29 Nov 2004 01:41:32 AM UTC, comment #3:

You're misunderstanding how pattern-specific variables work. They are not associated with pattern rules in any way. The value of automatic variables like $* are always, and only, computed with respect to the pattern rule; they are never computed relevant to pattern-specific variable settings: the latter are not rules at all.

In your example the target pattern is %.suff, so $* will always be set to the entire target name without the .suff text, just as you see there, irrespective of where the variable ABC was set.

Paul D. Smith <psmith>
Project Administrator
Fri 13 Aug 2004 06:29:20 PM UTC, comment #2:

You cannot use automatic variables ($* in your case) in pattern-specific variable assignment. The only place where automatic variables are available is in rule's command.

Anonymous
Tue 08 Jun 2004 11:04:10 AM UTC, comment #1:

small correction:
ABC should be 'aaa.bar'

Workaround:
%_bar.suff: ABC=$(patsubst %_bar,%.bar,$*)

Alon Blayer-Gat <alonbg>
Tue 08 Jun 2004 09:25:36 AM UTC, original submission:

foo.suff: ABC=foo

%_bar.suff: ABC=$*.bar

%.suff: ; echo $(ABC)

===================
make foo.bar
hello

make aaa_bar.suff
aaa_bar.suff

Either the assignment to ABC should be ignored, because %_bar.suff wasn't chosen to be made or it should correctly be "aaa". But here we have both assignment is made because target matches pattern but not according to the specified assign-target

Alon Blayer-Gat <alonbg>

 

(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 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 29 Nov 2004 01:41:32 AM UTCpsmithStatusNone=>Not A Bug
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1