Page MenuHomeFreeBSD

D28467.diff
No OneTemporary

D28467.diff

diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -192,6 +192,17 @@
# avoid collisions.
DEPEND_FILTER= C,/,_,g
.if !empty(OBJS)
+.if !defined(_ALLOW_ABSOLUTE_OBJ_PATH) && ${OBJS:M/*}
+# Absolute paths to OBJS should be an error inside ${SRCTOP}, but some users
+# might be relying on this feature, so add an opt-out mechanism.
+.if defined(SRCTOP) && ${OBJS:M${SRCTOP}*}
+.error "$$OBJS inside $$SRCTOP not allowed: ${OBJS:M${SRCTOP}*}"
+.elif ${OBJS:N${_ABSOLUTE_PATH_OBJS}:M/*}
+.error "$$OBJS absolute path not allowed: ${OBJS:N${_ABSOLUTE_PATH_OBJS}:M/*}. \
+ If this is intended, add them to _ABSOLUTE_PATH_OBJS to silence this error\
+ or define _ALLOW_ABSOLUTE_OBJ_PATH to disable this diagnostic."
+.endif
+.endif
DEPENDOBJS+= ${OBJS}
.else
DEPENDSRCS+= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc}

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 13, 7:06 PM (19 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15785944
Default Alt Text
D28467.diff (896 B)

Event Timeline