Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144793268
D21468.id61466.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D21468.id61466.diff
View Options
Index: Mk/bsd.port.mk
===================================================================
--- Mk/bsd.port.mk
+++ Mk/bsd.port.mk
@@ -1029,6 +1029,7 @@
NOTPHONY?=
FLAVORS?=
FLAVOR?=
+OVERLAYS?=
# Disallow forced FLAVOR as make argument since we cannot change it to the
# proper default.
.if empty(FLAVOR) && !empty(.MAKEOVERRIDES:MFLAVOR)
@@ -1450,8 +1451,18 @@
.endif
.endfor
.for f in ${USES}
-.include "${USESDIR}/${f:C/\:.*//}.mk"
+.undef _usefound
+.for udir in ${OVERLAYS:C,$,/Mk/Uses,} ${USESDIR}
+_usefile= ${udir}/${f:C/\:.*//}.mk
+.if exists(${_usefile}) && !defined(_usefound)
+_usefound=
+.include "${_usefile}"
+.endif
.endfor
+.if !defined(_usefound)
+ERROR+= "Unkonwn USES=${f:C/\:.*//}"
+.endif
+.endfor
.if !empty(FLAVORS)
. if ${FLAVORS:Mall}
@@ -1962,8 +1973,18 @@
.endif
.endfor
.for f in ${_USES_POST}
-.include "${USESDIR}/${f:C/\:.*//}.mk"
+.undef _usefound
+.for udir in ${OVERLAYS:C,$,/Mk/Uses,} ${USESDIR}
+_usefile= ${udir}/${f:C/\:.*//}.mk
+.if exists(${_usefile}) && !defined(_usefound)
+_usefound=
+.include "${_usefile}"
+.endif
.endfor
+.if !defined(_usefound)
+ERROR+= "Unkonwn USES=${f:C/\:.*//}"
+.endif
+.endfor
.if defined(PORTNAME)
.include "${PORTSDIR}/Mk/bsd.sanity.mk"
@@ -3212,8 +3233,7 @@
.endif
# Build
-# XXX: ${MAKE_ARGS:N${DESTDIRNAME}=*} would be easier but it is not valid with the old fmake
-DO_MAKE_BUILD?= ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS:C,^${DESTDIRNAME}=.*,,g}
+DO_MAKE_BUILD?= ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS:N${DESTDIRNAME}=*}
.if !target(do-build)
do-build:
@(cd ${BUILD_WRKSRC}; if ! ${DO_MAKE_BUILD} ${ALL_TARGET}; then \
@@ -3333,7 +3353,7 @@
# Test
.if !target(do-test) && defined(TEST_TARGET)
-DO_MAKE_TEST?= ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${TEST_ARGS:C,^${DESTDIRNAME}=.*,,g}
+DO_MAKE_TEST?= ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${TEST_ARGS:N${DESTDIRNAME}=*}
do-test:
@(cd ${TEST_WRKSRC}; if ! ${DO_MAKE_TEST} ${TEST_TARGET}; then \
if [ -n "${TEST_FAIL_MESSAGE}" ] ; then \
@@ -3965,6 +3985,7 @@
dp_SH="${SH}" \
dp_SCRIPTSDIR="${SCRIPTSDIR}" \
PORTSDIR="${PORTSDIR}" \
+ dp_OVERLAYS="${OVERLAYS}" \
dp_MAKE="${MAKE}" \
dp_MAKEFLAGS='${.MAKEFLAGS}' \
${SH} ${SCRIPTSDIR}/do-depends.sh
@@ -4019,6 +4040,7 @@
dp_PKGNAME="${PKGNAME}" \
dp_PKG_INFO="${PKG_INFO}" \
dp_SCRIPTSDIR="${SCRIPTSDIR}" \
+ dp_OVERLAYS="${OVERLAYS}" \
${SH} ${SCRIPTSDIR}/depends-list.sh \
${DEPENDS_SHOW_FLAVOR:D-f}
Index: Mk/bsd.sanity.mk
===================================================================
--- Mk/bsd.sanity.mk
+++ Mk/bsd.sanity.mk
@@ -58,7 +58,7 @@
# Warnings only when DEVELOPER=yes
-.if exists(${.CURDIR}/../../Mk/bsd.port.mk)
+.if exists(${.CURDIR}/../../Mk/bsd.port.mk) || ${OVERLAYS:tA:M${.CURDIR:H:H}} == ${.CURDIR:H:H}
.if ${.CURDIR:H:T} != ${PKGCATEGORY}
DEV_ERROR+= "The first entry in CATEGORIES should be the directory where the port lives"
.endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 13, 4:24 PM (19 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28678452
Default Alt Text
D21468.id61466.diff (2 KB)
Attached To
Mode
D21468: Overlay support for the ports tree
Attached
Detach File
Event Timeline
Log In to Comment