summaryrefslogtreecommitdiffstats
path: root/share/mk/local.sys.mk
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2012-11-09 05:43:15 +0000
committersjg <sjg@FreeBSD.org>2012-11-09 05:43:15 +0000
commitcd8e42e7992d251944f8aeb0783d6666d7c17f26 (patch)
tree1d315910f6b99e108bb85b2f6d63978cb43c73d7 /share/mk/local.sys.mk
parent0672f433b52e31c72ca94c7ee11a6d84936123c9 (diff)
downloadFreeBSD-src-cd8e42e7992d251944f8aeb0783d6666d7c17f26.zip
FreeBSD-src-cd8e42e7992d251944f8aeb0783d6666d7c17f26.tar.gz
Add TIME_STAMP
Diffstat (limited to 'share/mk/local.sys.mk')
-rw-r--r--share/mk/local.sys.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk
index d8c4898..ff8f20b 100644
--- a/share/mk/local.sys.mk
+++ b/share/mk/local.sys.mk
@@ -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
OpenPOWER on IntegriCloud