Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144506724
D48855.1775100413.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
D48855.1775100413.diff
View Options
diff --git a/share/mk/auto.obj.mk b/share/mk/auto.obj.mk
--- a/share/mk/auto.obj.mk
+++ b/share/mk/auto.obj.mk
@@ -1,14 +1,16 @@
-# $Id: auto.obj.mk,v 1.12 2015/12/16 01:57:06 sjg Exp $
+# SPDX-License-Identifier: BSD-2-Clause
+#
+# $Id: auto.obj.mk,v 1.17 2024/02/17 17:26:57 sjg Exp $
#
# @(#) Copyright (c) 2004, Simon J. Gerraty
#
# This file is provided in the hope that it will
# be of use. There is absolutely NO WARRANTY.
# Permission to copy, redistribute or otherwise
-# use this file is hereby granted provided that
+# use this file is hereby granted provided that
# the above copyright notice and this notice are
-# left intact.
-#
+# left intact.
+#
# Please send copies of changes and bug-fixes to:
# sjg@crufty.net
#
@@ -16,7 +18,7 @@
ECHO_TRACE ?= echo
.ifndef Mkdirs
-# A race condition in some versions of mkdir, means that it can bail
+# A race condition in some versions of mkdir, means that it can bail
# if another process made a dir that mkdir expected to.
# We repeat the mkdir -p a number of times to try and work around this.
# We stop looping as soon as the dir exists.
@@ -53,7 +55,7 @@
# We need to chdir, make the directory if needed
.if !exists(${__objdir}/) && \
(${.TARGETS} == "" || ${.TARGETS:Nclean*:N*clean:Ndestroy*} != "")
-# This will actually make it...
+# This will actually make it...
__objdir_made != echo ${__objdir}/; umask ${OBJDIR_UMASK:U002}; \
${ECHO_TRACE} "[Creating objdir ${__objdir}...]" >&2; \
${Mkdirs}; Mkdirs ${__objdir}
diff --git a/share/mk/dirdeps-targets.mk b/share/mk/dirdeps-targets.mk
--- a/share/mk/dirdeps-targets.mk
+++ b/share/mk/dirdeps-targets.mk
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-2-Clause
#
# RCSid:
-# $Id: dirdeps-targets.mk,v 1.27 2024/02/25 19:12:13 sjg Exp $
+# $Id: dirdeps-targets.mk,v 1.28 2024/10/19 00:47:38 sjg Exp $
#
# @(#) Copyright (c) 2019-2020 Simon J. Gerraty
#
@@ -160,6 +160,9 @@
.endfor
.if defined(STATIC_DIRDEPS_CACHE)
.export STATIC_DIRDEPS_CACHE
+.if !empty(DEBUG_DIRDEPS_TARGETS)
+.info STATIC_DIRDEPS_CACHE=${STATIC_DIRDEPS_CACHE:S,${SRCTOP}/,,}
+.endif
.endif
.endif
diff --git a/share/mk/dirdeps.mk b/share/mk/dirdeps.mk
--- a/share/mk/dirdeps.mk
+++ b/share/mk/dirdeps.mk
@@ -1,4 +1,4 @@
-# $Id: dirdeps.mk,v 1.171 2024/09/30 21:21:25 sjg Exp $
+# $Id: dirdeps.mk,v 1.175 2025/01/05 01:16:19 sjg Exp $
# SPDX-License-Identifier: BSD-2-Clause
#
@@ -152,7 +152,7 @@
# any other DIRDEP.
#
# This allows for adding TESTS to the build, such that the build
-# if any test fails, but without the risk of introducing
+# will fail if any test fails, but without the risk of introducing
# circular dependencies.
now_utc ?= ${%s:L:localtime}
@@ -445,6 +445,7 @@
TARGET_SPEC=${.TARGET:E} \
MACHINE=${.TARGET:E} \
${DIRDEP_MAKE} -C ${DIRDEP_DIR} ${DIRDEP_TARGETS} || exit 1; \
+ ${DIRDEP_USE_EPILOGUE} \
break; \
done
@@ -568,7 +569,7 @@
dirdeps: dirdeps-cached
dirdeps-cached: ${DIRDEPS_CACHE} .MAKE
@echo "${TRACER}Using ${DIRDEPS_CACHE}"
- @MAKELEVEL=${.MAKE.LEVEL} \
+ @${DIRDEPS_CACHED_ENV} MAKELEVEL=${.MAKE.LEVEL} \
TARGET_SPEC=${TARGET_SPEC} \
${TARGET_SPEC_VARS:@v@$v=${$v}@} \
${.MAKE} -C ${_CURDIR} -f ${DIRDEPS_CACHE} \
@@ -606,10 +607,10 @@
BUILD_DIRDEPS_CACHE=yes \
.MAKE.DEPENDFILE=.none \
${"${DEBUG_DIRDEPS:Nno}":?DEBUG_DIRDEPS='${DEBUG_DIRDEPS}':} \
- ${.MAKEFLAGS:tW:S,-D ,-D,g:tw:M*WITH*} \
- ${.MAKEFLAGS:tW:S,-d ,-d,g:tw:M-d*} \
+ ${.MAKEFLAGS:S,-D ,-D,gW:M*WITH*} \
+ ${.MAKEFLAGS:S,-d ,-d,gW:M-d*} \
3>&1 1>&2 | sed 's,${SRCTOP},_{SRCTOP},g;s,_{SRCTOP}/_{SRCTOP},_{SRCTOP},g;s,_{,$${,g' >> ${.TARGET}.new && \
- mv ${.TARGET}.new ${.TARGET}
+ { ${BUILD_DIRDEPS_EPILOGUE} mv ${.TARGET}.new ${.TARGET}; }
.endif
.endif
diff --git a/share/mk/gendirdeps.mk b/share/mk/gendirdeps.mk
--- a/share/mk/gendirdeps.mk
+++ b/share/mk/gendirdeps.mk
@@ -1,4 +1,4 @@
-# $Id: gendirdeps.mk,v 1.50 2023/11/04 16:47:34 sjg Exp $
+# $Id: gendirdeps.mk,v 1.51 2025/01/05 01:16:19 sjg Exp $
# SPDX-License-Identifier: BSD-2-Clause
#
@@ -237,7 +237,7 @@
sed ${GENDIRDEPS_SEDCMDS}
.if ${dir_list:M*ERROR\:*} != ""
-.warning ${dir_list:tW:C,.*(ERROR),\1,}
+.warning ${dir_list:C,.*(ERROR),\1,W}
.warning Skipping ${_DEPENDFILE:S,${SRCTOP}/,,}
# we are not going to update anything
.else
diff --git a/share/mk/meta.sys.mk b/share/mk/meta.sys.mk
--- a/share/mk/meta.sys.mk
+++ b/share/mk/meta.sys.mk
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: BSD-2-Clause
#
-# $Id: meta.sys.mk,v 1.54 2024/03/10 15:53:51 sjg Exp $
+# $Id: meta.sys.mk,v 1.56 2024/11/22 23:51:48 sjg Exp $
#
# @(#) Copyright (c) 2010-2023, Simon J. Gerraty
@@ -40,6 +40,11 @@
MKDEP_MK ?= auto.dep.mk
.endif
+# META_MODE_XTRAS makes it easier to add things like 'env'
+# from the command line when debugging
+# :U avoids problems from := below
+META_MODE += ${META_MODE_XTRAS:U}
+
.MAKE.MODE ?= ${META_MODE}
_filemon := ${.MAKE.PATH_FILEMON:U/dev/filemon}
@@ -101,6 +106,12 @@
ERROR_LOGDIR ?= ${SB}/error
meta_error_log = ${ERROR_LOGDIR}/meta-${.MAKE.PID}.log
+.if ${.MAKE.LEVEL} == 0 && !empty(NEWLOG_SH) && exists(${ERROR_LOGDIR})
+.BEGIN: _rotateErrorLog
+_rotateErrorLog: .NOMETA .NOTMAIN
+ @${NEWLOG_SH} -d -S -n ${ERROR_LOG_GENS:U4} ${ERROR_LOGDIR}
+.endif
+
.ERROR: _metaError
# We are interested here in the target(s) that caused the build to fail.
# We want to ignore targets that were "aborted" due to failure
diff --git a/share/mk/meta2deps.py b/share/mk/meta2deps.py
--- a/share/mk/meta2deps.py
+++ b/share/mk/meta2deps.py
@@ -39,7 +39,7 @@
SPDX-License-Identifier: BSD-2-Clause
RCSid:
- $Id: meta2deps.py,v 1.47 2024/02/17 17:26:57 sjg Exp $
+ $Id: meta2deps.py,v 1.50 2024/09/27 00:08:36 sjg Exp $
Copyright (c) 2011-2020, Simon J. Gerraty
Copyright (c) 2011-2017, Juniper Networks, Inc.
@@ -294,6 +294,7 @@
if not _objroot in self.objroots:
self.objroots.append(_objroot)
+ self.sb = conf.get('SB', '')
# we want the longest match
self.srctops.sort(reverse=True)
self.objroots.sort(reverse=True)
@@ -461,6 +462,10 @@
if self.curdir:
self.seenit(self.curdir) # we ignore this
+ if self.sb and self.name.startswith(self.sb):
+ error_name = self.name.replace(self.sb+'/','')
+ else:
+ error_name = self.name
interesting = '#CEFLRVX'
for line in f:
self.line += 1
@@ -550,9 +555,9 @@
self.parse_path(path, cwd, w[0], w)
if version == 0:
- raise AssertionError('missing filemon data')
+ raise AssertionError('missing filemon data: {}'.format(error_name))
if not eof_token:
- raise AssertionError('truncated filemon data')
+ raise AssertionError('truncated filemon data: {}'.format(error_name))
setid_pids = []
# self.pids should be empty!
@@ -570,7 +575,8 @@
print("ERROR: missing eXit for {} pid {}".format(path, pid))
for pid in setid_pids:
del self.pids[pid]
- assert(len(self.pids) == 0)
+ if len(self.pids) > 0:
+ raise AssertionError('bad filemon data - missing eXits: {}'.format(error_name))
if not file:
f.close()
@@ -714,6 +720,8 @@
'EXCLUDES': [],
}
+ conf['SB'] = os.getenv('SB', '')
+
try:
machine = os.environ['MACHINE']
if machine:
diff --git a/share/mk/sys.dependfile.mk b/share/mk/sys.dependfile.mk
--- a/share/mk/sys.dependfile.mk
+++ b/share/mk/sys.dependfile.mk
@@ -1,4 +1,6 @@
-# $Id: sys.dependfile.mk,v 1.10 2023/05/10 19:23:26 sjg Exp $
+# SPDX-License-Identifier: BSD-2-Clause
+#
+# $Id: sys.dependfile.mk,v 1.11 2024/02/17 17:26:57 sjg Exp $
#
# @(#) Copyright (c) 2012-2023, Simon J. Gerraty
#
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 2, 3:26 AM (8 m, 34 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28241717
Default Alt Text
D48855.1775100413.diff (7 KB)
Attached To
Mode
D48855: Update dirdeps.mk et al
Attached
Detach File
Event Timeline
Log In to Comment