Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147792657
D50655.1784386012.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
859 B
Referenced Files
None
Subscribers
None
D50655.1784386012.diff
View Options
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -376,13 +376,22 @@
kernel-toolchain: upgrade_checks
.endif
+# we need the system time(1) command, not from the shell
+time_cmd= /usr/bin/time
+
+# mktemp(1) is not portable
+mktemp_cmd= mktemp /tmp/_time-logging-XXXXXXXXX
+
#
# Handle the user-driven targets, using the source relative mk files.
#
tinderbox toolchains kernel-toolchains: .MAKE
${TGTS}: .PHONY .MAKE
- ${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET}
+ ${_+_}@cd ${.CURDIR}; _time_tmp=$$(${mktemp_cmd}); \
+ ${time_cmd} -o $${_time_tmp} -p env ${_MAKE} ${.TARGET}; \
+ echo ">>> Time spent on target ${.TARGET}: $$(tr '\n' ' ' < $${_time_tmp})"; \
+ rm -f $${_time_tmp}
# The historic default "all" target creates files which may cause stale
# or (in the cross build case) unlinkable results. Fail with an error
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 18, 2:46 PM (12 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29184962
Default Alt Text
D50655.1784386012.diff (859 B)
Attached To
Mode
D50655: user/system time logging for build targets in src/Makefile
Attached
Detach File
Event Timeline
Log In to Comment