From cd8e42e7992d251944f8aeb0783d6666d7c17f26 Mon Sep 17 00:00:00 2001 From: sjg Date: Fri, 9 Nov 2012 05:43:15 +0000 Subject: [PATCH] Add TIME_STAMP --- share/mk/local.sys.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk index d8c4898400a..ff8f20badf6 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 -- 2.45.2