bugmake - Bugs: bug #17529, Variable set with $(shell date...

 
 

bug #17529: Variable set with $(shell date '+%Y%m%d-%H%M%S') changes mid-make

Submitted by:  Terry Jones <terrycojones>
Submitted on:  Fri 25 Aug 2006 08:32:30 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.81Operating 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.

 

Mon 28 Aug 2006 02:28:22 AM UTC, comment #1:

Please see the GNU make manual, section "The Two Flavors of Variables", for a discussion of how recursively expanded variables (ones created with "=") work.

Paul D. Smith <psmith>
Project Administrator
Fri 25 Aug 2006 08:32:30 PM UTC, original submission:

I have a simple Makefile:

base = xxx-$(shell date '+%Y%m%d-%H%M%S')

t:
@echo $(base)
@echo $(base)
@echo $(base)
@echo $(base)
@echo $(base)
@echo $(base)

Sometimes when I 'make t' from the shell, the value of $(base) changes:

$ make t
xxx-20060825-222523
xxx-20060825-222523
xxx-20060825-222523
xxx-20060825-222523
xxx-20060825-222524
xxx-20060825-222524

This only happens rarely, perhaps once every 20 runs. I'm on Mac OS X 10.3.9 running a freshly built make 3.81. I can put some @sleep 5 lines into the above t target and still see the same thing happen.

Terry

Terry Jones <terrycojones>

 

(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 28 Aug 2006 02:28:22 AM UTCpsmithStatusNone=>Not A Bug
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1