Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F176879579
D799.1793549252.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D799.1793549252.diff
View Options
Index: share/mk/bsd.port.mk
===================================================================
--- share/mk/bsd.port.mk
+++ share/mk/bsd.port.mk
@@ -1,6 +1,20 @@
# $FreeBSD$
-PORTSDIR?= /usr/ports
+.if !defined(PORTSDIR)
+PORTSDIR!= while :; do \
+ curdir=`pwd`; \
+ if [ -f "Mk/bsd.port.mk" ]; then \
+ echo $$curdir; \
+ break; \
+ fi; \
+ if [ "$$curdir" = "/" ]; then \
+ echo "/usr/ports"; \
+ break; \
+ fi; \
+ cd ..; \
+ done
+.endif
+
BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk
# Needed to keep bsd.own.mk from reading in /etc/src.conf
Index: share/mk/bsd.port.subdir.mk
===================================================================
--- share/mk/bsd.port.subdir.mk
+++ share/mk/bsd.port.subdir.mk
@@ -1,6 +1,20 @@
# $FreeBSD$
-PORTSDIR?= /usr/ports
+.if !defined(PORTSDIR)
+PORTSDIR!= while :; do \
+ curdir=`pwd`; \
+ if [ -f "Mk/bsd.port.mk" ]; then \
+ echo $$curdir; \
+ break; \
+ fi; \
+ if [ "$$curdir" = "/" ]; then \
+ echo "/usr/ports"; \
+ break; \
+ fi; \
+ cd ..; \
+ done
+.endif
+
BSDPORTSUBDIRMK?= ${PORTSDIR}/Mk/bsd.port.subdir.mk
.include "${BSDPORTSUBDIRMK}"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 1, 4:07 PM (20 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41290099
Default Alt Text
D799.1793549252.diff (1 KB)
Attached To
Mode
D799: Incorporate a search mechanism for PORTSDIR.
Attached
Detach File
Event Timeline