Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160579793
D57683.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
8 KB
Referenced Files
None
Subscribers
None
D57683.diff
View Options
diff --git a/share/mk/dirdeps.mk b/share/mk/dirdeps.mk
--- a/share/mk/dirdeps.mk
+++ b/share/mk/dirdeps.mk
@@ -1,8 +1,8 @@
-# $Id: dirdeps.mk,v 1.175 2025/01/05 01:16:19 sjg Exp $
+# $Id: dirdeps.mk,v 1.178 2026/05/09 20:33:46 sjg Exp $
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2010-2023, Simon J. Gerraty
+# Copyright (c) 2010-2026, Simon J. Gerraty
# Copyright (c) 2010-2018, Juniper Networks, Inc.
# All rights reserved.
#
@@ -322,6 +322,12 @@
.else
_debug_search = 0
.endif
+.if ${DEBUG_DIRDEPS:Mno*recurse} != ""
+BUILD_DIRDEPS_RECURSE = no
+.endif
+.if ${DEBUG_DIRDEPS:M-V} != ""
+_V_READ_DIRDEPS = yes
+.endif
# First off, we want to know what ${MACHINE} to build for.
# This can be complicated if we are using a mixture of ${MACHINE} specific
@@ -585,6 +591,11 @@
BUILD_DIRDEPS_OVERRIDES ?=
BUILD_DIRDEPS_TARGETS ?= ${.TARGETS}
+# sometimes we temporarily want to block updating of DIRDEPS_CACHE
+.if ${MK_UPDATE_DIRDEPS_CACHE:Uyes} == "no" && exists(${DIRDEPS_CACHE})
+STATIC_DIRDEPS_CACHE ?= ${DIRDEPS_CACHE}
+.endif
+
.if ${DIRDEPS_CACHE} != ${STATIC_DIRDEPS_CACHE:Uno} && ${DIRDEPS_CACHE:M${SRCTOP}/*} == ""
# export this for dirdeps-cache-update.mk
DYNAMIC_DIRDEPS_CACHE := ${DIRDEPS_CACHE}
@@ -715,12 +726,12 @@
.endif
# this is what we start with
-__depdirs := ${DIRDEPS:${NSkipDir}:${DEP_DIRDEPS_FILTER:ts:}:C,//+,/,g:O:u:@d@${SRCTOP}/$d@}
+__depdirs := ${DIRDEPS:${NSkipDir}:${DEP_DIRDEPS_FILTER:ts:}:C,//+,/,g:S,/$,,:O:u:@d@${SRCTOP}/$d@}
# some entries may be qualified with .<machine> or .<target_spec>
# we can tell the unqualified ones easily - because they exist
__unqual_depdirs := ${__depdirs:@d@${exists($d):?$d:}@}
-__qual_depdirs := ${__depdirs:${__unqual_depdirs:Uno:${M_ListToSkip}}}
+__qual_depdirs := ${__depdirs:${__unqual_depdirs:Uno:${M_ListToSkip}}:C,/(\.[^.]*)$,\1,}
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# if it was called out - we likely need it.
@@ -745,16 +756,13 @@
${_machines:Nhost*:@m@${__unqual_depdirs:@d@$d.$m@}@}
# qualify everything now
-.if ${_debug_reldir}
-.info _build_dirs=${_build_dirs:${DEBUG_DIRDEPS_LIST_FILTER:U:N/:ts:}}
-.endif
# make sure we do not mess with qualifying "host" entries
_build_dirs := ${_build_dirs:M*.host*:${M_dep_qual_fixes.host:ts:}} \
${_build_dirs:N*.host*:${M_dep_qual_fixes:ts:}}
# some filters can only be applied now
_build_dirs := ${_build_dirs:${DEP_DIRDEPS_BUILD_DIR_FILTER:ts:}:O:u}
.if ${_debug_reldir}
-.info _build_dirs=${_build_dirs:${DEBUG_DIRDEPS_LIST_FILTER:U:N/:ts:}}
+.info _build_dirs=${_build_dirs:S,^${SRCTOP}/,,:${DEBUG_DIRDEPS_LIST_FILTER:U:N/:ts:}}
.endif
.endif # empty DIRDEPS
@@ -791,7 +799,7 @@
${_build_all_dirs}: _DIRDEP_USE
.if ${_debug_reldir}
-.info ${DEP_RELDIR}.${DEP_TARGET_SPEC}: needs: ${_build_dirs:S,^${SRCTOP}/,,:${DEBUG_DIRDEPS_LIST_FILTER:U:N/:ts:}}
+.info ${DEP_RELDIR}.${DEP_TARGET_SPEC}: needs: ${_build_all_dirs:S,^${SRCTOP}/,,:${DEBUG_DIRDEPS_LIST_FILTER:U:N/:ts:}}
.endif
# this builds the dependency graph
@@ -858,6 +866,7 @@
DEP_EXPORT_VARS =
.endif
+.if ${BUILD_DIRDEPS_RECURSE:Uyes} != "no"
# Now find more dependencies - and recurse.
.for d in ${_build_all_dirs}
.if !target(_dirdeps_checked.$d)
@@ -909,6 +918,7 @@
.endif
.endif
.endfor
+.endif
.endif # -V
.endif # BUILD_DIRDEPS
diff --git a/share/mk/gendirdeps.mk b/share/mk/gendirdeps.mk
--- a/share/mk/gendirdeps.mk
+++ b/share/mk/gendirdeps.mk
@@ -1,8 +1,8 @@
-# $Id: gendirdeps.mk,v 1.54 2025/08/12 21:36:43 sjg Exp $
+# $Id: gendirdeps.mk,v 1.56 2026/06/19 18:57:57 sjg Exp $
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2011-2025, Simon J. Gerraty
+# Copyright (c) 2011-2026, Simon J. Gerraty
# Copyright (c) 2010-2018, Juniper Networks, Inc.
# All rights reserved.
#
@@ -87,6 +87,12 @@
all:
+.if ${_debug.gendirdeps}
+.if ${DEBUG_GENDIRDEPS:M-d*}
+.MAKEFLAGS: ${DEBUG_GENDIRDEPS:M-d*}
+.endif
+.endif
+
_CURDIR ?= ${.CURDIR}
_OBJDIR ?= ${.OBJDIR}
_OBJTOP ?= ${OBJTOP}
@@ -331,7 +337,7 @@
# what modifiers do we allow in GENDIRDEPS_FILTER
GENDIRDEPS_FILTER_MASK += @CMNS
-DIRDEPS := ${DIRDEPS:${GENDIRDEPS_FILTER:UNno:M[${GENDIRDEPS_FILTER_MASK:O:u:ts}]*:ts:}:C,//+,/,g:O:u}
+DIRDEPS := ${DIRDEPS:${GENDIRDEPS_FILTER:UNno:M[${GENDIRDEPS_FILTER_MASK:O:u:ts}]*:ts:}:C,//+,/,g:S,/$,,:C,/(\.[^.]+)$,\1,:O:u}
.if ${_debug.gendirdeps}
.info ${RELDIR}: M2D_OBJROOTS=${M2D_OBJROOTS}
@@ -353,7 +359,7 @@
SRC_DIRDEPS = \
${src_dirdep_list:N${RELDIR}:N${RELDIR}/*:C,(/h)/.*,,}
-SRC_DIRDEPS := ${SRC_DIRDEPS:${GENDIRDEPS_SRC_FILTER:UN/*:ts:}:C,//+,/,g:O:u}
+SRC_DIRDEPS := ${SRC_DIRDEPS:${GENDIRDEPS_SRC_FILTER:UN/*:ts:}:C,//+,/,g:S,/$,,:C,/(\.[^.]+)$,\1,:O:u}
# if you want to capture SRC_DIRDEPS in .MAKE.DEPENDFILE put
# SRC_DIRDEPS_FILE = ${_DEPENDFILE}
diff --git a/share/mk/install-new.mk b/share/mk/install-new.mk
--- a/share/mk/install-new.mk
+++ b/share/mk/install-new.mk
@@ -1,4 +1,4 @@
-# $Id: install-new.mk,v 1.9 2025/11/19 17:44:15 sjg Exp $
+# $Id: install-new.mk,v 1.10 2026/06/19 19:47:03 sjg Exp $
#
# @(#) Copyright (c) 2009, Simon J. Gerraty
#
@@ -47,7 +47,7 @@
for new in "$$@"; do \
if test $$_t $$new; then \
if ${isPOSIX_SHELL:Ufalse}; then \
- target=$${new%.new}; \
+ target=$${new%.new*}; \
else \
target=`expr $$new : '\(.*\).new'`; \
fi; \
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.54 2025/07/24 16:05:48 sjg Exp $
+ $Id: meta2deps.py,v 1.56 2026/05/22 00:33:26 sjg Exp $
Copyright (c) 2011-2025, Simon J. Gerraty
Copyright (c) 2011-2017, Juniper Networks, Inc.
@@ -446,7 +446,7 @@
version = 0 # unknown
if name:
- self.name = name;
+ self.name = name
if file:
f = file
cwd = self.last_dir = self.cwd
@@ -515,6 +515,12 @@
if self.debug > 2:
print('op={} elen={} wlen={} line="{}"'.format(w[0], elen, wlen, line.strip()), file=self.debug_out)
if wlen != elen:
+ if wlen > elen and w[0] in 'CELMRW':
+ # It could just be spaces in pathname.
+ # More trouble than its worth, just skip it.
+ if self.debug > 0:
+ print('Skipping: wrong number of words: expected {} got {} in: {}'.format(elen, wlen, line), file=self.debug_out)
+ continue
raise AssertionError('corrupted filemon data: wrong number of words: expected {} got {} in: {}'.format(elen, wlen, line))
pid = int(w[1])
@@ -669,7 +675,7 @@
return
if os.path.isdir(path):
if op in 'RW':
- self.last_dir = path;
+ self.last_dir = path
if self.debug > 1:
print("ldir=", self.last_dir, file=self.debug_out)
return
@@ -703,7 +709,7 @@
self.seenit(dir)
-def main(argv, klass=MetaFile, xopts='', xoptf=None):
+def main(argv, klass=MetaFile, xopts='', xoptf=None, conf=None):
"""Simple driver for class MetaFile.
Usage:
@@ -743,11 +749,12 @@
except:
pass
- conf = {
- 'SRCTOPS': [],
- 'OBJROOTS': [],
- 'EXCLUDES': [],
- }
+ if not conf:
+ conf = {}
+
+ for k in ['EXCLUDES', 'OBJROOTS', 'SRCTOPS']:
+ if k not in conf:
+ conf[k] = []
conf['SB'] = os.getenv('SB', '')
diff --git a/share/mk/meta2deps.sh b/share/mk/meta2deps.sh
--- a/share/mk/meta2deps.sh
+++ b/share/mk/meta2deps.sh
@@ -77,7 +77,7 @@
# RCSid:
-# $Id: meta2deps.sh,v 1.26 2025/12/08 17:34:02 sjg Exp $
+# $Id: meta2deps.sh,v 1.27 2026/05/22 00:33:26 sjg Exp $
# SPDX-License-Identifier: BSD-2-Clause
#
@@ -162,6 +162,10 @@
exit 1
}
+warning() {
+ echo "WARNING: $@" >&2
+}
+
meta2deps() {
DPDEPS=
SRCTOPS=$SRCTOP
@@ -273,8 +277,15 @@
;;
\#*) ;; # ok
[LM],) error "missing path2 in: '$op $pid $path'";;
- [LMX],*" "*) error "wrong number of words in: '$op $pid $path $path2'";;
+ [LMX],*" "*)
+ warning "wrong number of words in: '$op $pid $path $path2'"
+ continue
+ ;;
*,|[LMX],*) ;; # ok
+ [CELMRW],*)
+ warning "wrong number of words in: '$op $pid $path $path2'"
+ continue
+ ;;
*) error "wrong number of words in: '$op $pid $path $path2'";;
esac
# we track cwd and ldir (of interest) per pid
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 26, 9:17 PM (13 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34350913
Default Alt Text
D57683.diff (8 KB)
Attached To
Mode
D57683: Update dirdpes.mk et al
Attached
Detach File
Event Timeline
Log In to Comment