Update - allow collecting stats when WITH_META_STATS is defined.

This commit is contained in:
Simon J. Gerraty 2014-05-07 23:50:44 +00:00
parent 3d4adb0524
commit f974b33f6e

View File

@ -176,7 +176,9 @@ _depend =
.info ${_DEPENDFILE:S,${SRCTOP}/,,} _depend=${_depend}
.endif
.if ${UPDATE_DEPENDFILE} == "yes"
gendirdeps: ${_DEPENDFILE}
.endif
.if !target(${_DEPENDFILE})
.if ${_bootstrap_dirdeps} == "yes"
@ -259,4 +261,28 @@ ${_DEPENDFILE}: .PRECIOUS
.endif
CLEANFILES += *.meta filemon.* *.db
# these make it easy to gather some stats
now_utc = ${%s:L:gmtime}
start_utc := ${now_utc}
meta_stats= meta=${.MAKE.META.FILES:[#]} \
created=${empty(.MAKE.META.CREATED):?0:${.MAKE.META.CREATED:[#]}}
#.END: _reldir_finish
.if target(gendirdeps)
_reldir_finish: gendirdeps
.endif
_reldir_finish: .NOMETA
@echo "${TIME_STAMP} Finished ${RELDIR}.${TARGET_SPEC} seconds=$$(( ${now_utc} - ${start_utc} )) ${meta_stats}"
#.ERROR: _reldir_failed
_reldir_failed: .NOMETA
@echo "${TIME_STAMP} Failed ${RELDIR}.${TARGET_SPEC} seconds=$$(( ${now_utc} - ${start_utc} )) ${meta_stats}"
.ifdef WITH_META_STATS
.END: _reldir_finish
.ERROR: _reldir_failed
.endif
.endif