Subject: misc/13547: display total build time
To: None <gnats-bugs@gnats.netbsd.org>
From: None <martti.kuparinen@iki.fi>
List: netbsd-bugs
Date: 07/24/2001 16:03:43
>Number:         13547
>Category:       misc
>Synopsis:       display total build time
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 24 07:02:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Martti Kuparinen
>Release:        1.5W (2001-07-24)
>Organization:
>Environment:
System: NetBSD dhcp39 1.5W NetBSD 1.5W (KAYAK) #2: Fri Jul 24 15:16:58 CEST 2001 root@dhcp39:/usr/src/sys/arch/i386/compile/KAYAK i386
Architecture: i386
Machine: i386

>Description:

Right now it's difficult to determine the total amount of
time used in "cd /usr/src && make build". Idea for the
following patch came from FreeBSD.

How many times you have typed "make build" instead of
"/usr/bin/time make build"?

>How-To-Repeat:
>Fix:

--- /usr/src/Makefile	Sun Jun 10 15:15:29 2001
+++ Makefile	Tue Jul 24 15:51:21 2001
@@ -56,7 +56,7 @@
 #   do-dependall: builds & install the entire system.
 #   do-domestic: build & install the domestic tree (deprecated.)
 #   do-whatisdb: build & install the `whatis.db' man database.
-#   buildendmsg: displays the end time of the build.
+#   buildendmsg: displays the start and finish time of the build.
 
 .include <bsd.own.mk>
 
@@ -101,11 +101,13 @@
 	@(cd ${.CURDIR}/regress && ${MAKE} ${_M} regress)
 .endif
 
+STARTTIME!= LC_ALL=C date
+
 buildstartmsg:
-	@echo -n "Build started at: "
-	@date
+	@echo -n "Build started at:  "
+	@echo ${STARTTIME}
 
-buildendmsg:
+buildendmsg: buildstartmsg
 	@echo -n "Build finished at: "
 	@date
 
>Release-Note:
>Audit-Trail:
>Unformatted: