svn commit: r242817 - projects/bmake/share/mk
Simon J. Gerraty
sjg at FreeBSD.org
Fri Nov 9 05:43:15 UTC 2012
Author: sjg
Date: Fri Nov 9 05:43:15 2012
New Revision: 242817
URL: http://svnweb.freebsd.org/changeset/base/242817
Log:
Add TIME_STAMP
Modified:
projects/bmake/share/mk/local.sys.mk
Modified: projects/bmake/share/mk/local.sys.mk
==============================================================================
--- projects/bmake/share/mk/local.sys.mk Fri Nov 9 04:52:15 2012 (r242816)
+++ projects/bmake/share/mk/local.sys.mk Fri Nov 9 05:43:15 2012 (r242817)
@@ -196,4 +196,13 @@ MAKE_PRINT_VAR_ON_ERROR+= \
OBJTOP \
${MAKE_PRINT_VAR_ON_ERROR_XTRAS}
+# these are handy
+# we can use this for a cheap timestamp at the start of a target's script,
+# but not at the end - since make will expand both at the same time.
+TIME_STAMP_FMT = @ %s [%Y-%m-%d %T]
+TIME_STAMP = ${TIME_STAMP_FMT:localtime}
+# this will produce the same output but as of when date(1) is run.
+TIME_STAMP_DATE = `date '+${TIME_STAMP_FMT}'`
+TIME_STAMP_END?= ${TIME_STAMP_DATE}
+
.endif # bmake
More information about the svn-src-projects
mailing list