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 - Normal Item Group:  Enhancement
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  3.80 Operating System:  MS-DOS
Fixed Release:  None Triage 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:


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

Or a set verbosity targets:



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:

@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:

@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.


Reid Madsen <srmadsen>


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

Attach Files:

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 add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.




No changes have been made to this item

Back to the top

Powered by Savane 3.3