bugmake - Bugs: bug #13954, New function requested: $(time)

 
 

bug #13954: New function requested: $(time)

Submitted by:  Reid Madsen <srmadsen>
Submitted on:  Wed 27 Jul 2005 03:44:44 PM UTC  
 
Severity: 3 - NormalItem Group: Enhancement
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 3.80Operating System: MS-DOS
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.

 

Fri 28 Oct 2005 09:14:41 AM UTC, comment #1:

In any case this results in a spawned shell.
I think that a better solution would be a special set target which set the verbosity on a specific set of the targets. While stating It could be:

.VERBOSE: $(TARGETS)

make --target_verbose [0,1,2,3]
(e.g level 1 will prin out the date)

Or a set verbosity targets:

.DATE_VERBOSE: $(TARGETS)

DATE_FORMAT=%H:%M:%S

The user may turn this 'on' by a user variable or a dedicated 'make' option.

Alon Blayer-Gat <alonbg>
Wed 27 Jul 2005 03:44:44 PM UTC, original submission:

One of the more common functions in Makefiles is to do something like:

$(TARGETS):
@echo "`date %H:%M:%S` -- Building $@"

This requires make to launch a sub-process every time any of $(TARGETS) is built. That's a heavy-weight solution for such a light-weight task.

GNUmake could be enhanced to support this intrinsically, without having to call an external function. For example:

$(TARGETS):
@echo "$(time) -- Building $@"

Which might yield:

14:23:07 - Building foo

The possibilities are:
1. $(time) - returns the time formatted with a default time string (perhaps %T).
2. $(time format) - returns time formatted using the format provided. Formats would be as per the strftime(3C) documentation.

srmadsen

Reid Madsen <srmadsen>

 

(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):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup1