From nobody Thu Apr 27 20:42:05 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q6nj94Bsdz47wR0; Thu, 27 Apr 2023 20:42:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q6nj93Y1fz4Kvp; Thu, 27 Apr 2023 20:42:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682628125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=77pXcIAtuuqGILYfHD6WdZ6n02M+nm5GhJCvRovKK6o=; b=ocfkpq0us/IU1IKMHuYjJokc8QH5x1aYclzRWKZcw2dbnVLp/66GNgS1BMtUzr9DLBr3Ld BQT1g1m2u02NJlpu0pf3RD96TXm2suEVnoJcOhfxcdKEFG+1WQzpsCq5UyiSl2Q8I4TJZo 6+TkjpZpo9c28WLT0IlNDI7EKKr8bwU+PmHMtAphDG3X6B3p/rBacYk01GHKwJzMmGVce0 V0LHzkYmLHqJASYv7P+ng8zWMyW9SJKPMn+C1FUvQH9NK4HbkoxniJmCCRQ1k7fOdCcByz UTy56gP+X4oO1FThvBUpJpVKSo8qfpCncn3cN8Zm3yeP9QxK4ZJrqtOVRa2cOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682628125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=77pXcIAtuuqGILYfHD6WdZ6n02M+nm5GhJCvRovKK6o=; b=Z6l7zcZF6PvJGLYcctRPE0uj2/xltxnvezSpBSddTFWLSySFHKtCNoK6jW071aYfGVxW52 ro5q6iebT2Tupf/rXYltV3tMeEbpYJLqpwPtMaEVC8seJCfQpi8P1agkT7rGk+cKjDw6cz UarZiPw8uk+KqF08c7+Xk3kHPHTCT5wVXZqwsd34fgE8o8nhyg9mKJBv6+ReqgV/jRSyBO WZRrZiXka/s3mWIIJrhSI+f8EOhvxWsj9xhnF0lTZgGgLYacWOnaDkhPgSNxKp/aue8X/O uk1cImFltibhB543LptiD9qi2XGWSBtGgusXGRf79jQWr5Ag+L77N3Gfi5pgzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682628125; a=rsa-sha256; cv=none; b=OUoob25S2h+KDW7IYrJNlBXcKv3xUF2Ss2Zl3EfGaApnjiLgKxOcCq0wQ1M0zNRxq+MeWG iC8GWX06MUssiMWFWEjJAAvOv12++43nq5Lh3k+t1vOJNSzsO9RTVN6ii3rzYKmmS5VpGB VFAWY6QBa9ciFNfw12L8xUzBO3x9toaJZfTuonoV6teY33Yao27xx2RaNreg5hH0mzYkOf yp1IEhKE+5mgz3aB1pKl9qk3fyoq7nETejxUKX2nATbObLWVyqA/O1EHw2nN/o93LJUhT4 wO68JKHkiLfzG3Ub++ltuk1YE6XXxFnx85/NjPedbt5S/rt/dCE8Y8GliZfgdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q6nj92cRhzXmZ; Thu, 27 Apr 2023 20:42:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33RKg59F010993; Thu, 27 Apr 2023 20:42:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33RKg5Be010992; Thu, 27 Apr 2023 20:42:05 GMT (envelope-from git) Date: Thu, 27 Apr 2023 20:42:05 GMT Message-Id: <202304272042.33RKg5Be010992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: e020aa37b858 - main - jobs.mk report JOB_ARGS log and JOB_LOG_START List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e020aa37b85805eb9937f10a50ed5ec34eab35c4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e020aa37b85805eb9937f10a50ed5ec34eab35c4 commit e020aa37b85805eb9937f10a50ed5ec34eab35c4 Author: Simon J. Gerraty AuthorDate: 2023-04-27 20:40:44 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-27 20:40:44 +0000 jobs.mk report JOB_ARGS log and JOB_LOG_START At the start of a job include info such as JOB_ARGS the log location and anything in JOB_LOG_START (eg TARGET_SPEC=${TARGET_SPEC}) --- share/mk/jobs.mk | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/share/mk/jobs.mk b/share/mk/jobs.mk index f465ea06310b..62fe9eeae030 100644 --- a/share/mk/jobs.mk +++ b/share/mk/jobs.mk @@ -1,4 +1,4 @@ -# $Id: jobs.mk,v 1.7 2023/04/18 23:32:28 sjg Exp $ +# $Id: jobs.mk,v 1.9 2023/04/27 18:10:27 sjg Exp $ # # @(#) Copyright (c) 2012-2023, Simon J. Gerraty # @@ -38,21 +38,30 @@ now_utc ?= ${%s:L:gmtime} start_utc := ${now_utc} .endif -.info ${.newline}${TIME_STAMP} Start ${.TARGETS} - .if make(*-jobs) +.info ${.newline}${TIME_STAMP} Start ${.TARGETS} JOB_LOGDIR ?= ${SRCTOP:H} JOB_LOG = ${JOB_LOGDIR}/${.TARGET:S,-jobs,,:S,/,_,g}.log JOB_LOG_GENS ?= 4 # we like to rotate logs .if empty(NEWLOG_SH) +.for d in ${.SYSPATH:U${.PARSEDIR}:@x@$x $x/scripts@} +.if exists($d/newlog.sh) +NEWLOG_SH := $d/newlog.sh +.if ${MAKE_VERSION} > 20220924 +.break +.endif +.endif +.endfor +.if empty(NEWLOG_SH) .ifdef M_whence NEWLOG_SH := ${newlog.sh:L:${M_whence}} .else NEWLOG_SH := ${(type newlog.sh) 2> /dev/null:L:sh:M/*} .endif .endif +.endif .if !empty(NEWLOG_SH) && exists(${NEWLOG_SH}) NEWLOG := sh ${NEWLOG_SH} JOB_NEWLOG_ARGS ?= -S -n ${JOB_LOG_GENS} @@ -72,7 +81,7 @@ JOB_ARGS+= -j${JOB_MAX} # build orchestration works as expected (DIRDEPS_BUILD) ${.TARGETS:M*-jobs}: @${NEWLOG} ${JOB_NEWLOG_ARGS} ${JOB_LOG} - @echo Logging to ${JOB_LOG} + @echo "${TIME_STAMP} Start ${.TARGET:S,-jobs,,} ${JOB_ARGS} ${JOB_LOG_START} log=${JOB_LOG}" | tee ${JOB_LOG} @cd ${.CURDIR} && env MAKELEVEL=0 \ ${.MAKE} ${JOB_ARGS} _TARGETS=${.TARGET:S,-jobs,,} ${.TARGET:S,-jobs,,} >> ${JOB_LOG} 2>&1