Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Apr 1999 21:08:52 -0700 (PDT)
From:      asami@cs.berkeley.edu (Satoshi Asami)
To:        ports@freebsd.org
Cc:        nik@freebsd.org
Subject:   always build dependencies
Message-ID:  <199904060408.VAA06613@bubble.didi.com>

next in thread | raw e-mail | index | archive | help
What do people think about the following patch?  Basically you define
"ALWAYS_BUILD_DEPENDS" and the dependencies will be built regardless
of what the dependency checks turn out.  Sort of the opposite of
NO_DEPENDS.  It should help people like Nik.

It will not skip .install_done cookies and stuff so the recommended
sequence will be

(make sure NOCLEANDEPENDS is not defined)
cd port1
make clean
cd port2
make clean
 :
cd port1
make install
cd port2
make install
 :

That way the dependencies will be built and installed exactly once.

-PW
-------
Index: bsd.port.mk
===================================================================
RCS file: /usr/cvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.308
diff -u -r1.308 bsd.port.mk
--- bsd.port.mk	1999/03/29 07:07:59	1.308
+++ bsd.port.mk	1999/04/06 03:56:21
@@ -608,7 +608,9 @@
 .endif
 .endif
 
-.if defined(USE_XLIB)
+# Don't try to build XFree86 even if ALWAYS_BUILD_DEPENDS is defined --
+# it's just too big....
+.if defined(USE_XLIB) && !defined(ALWAYS_BUILD_DEPENDS)
 LIB_DEPENDS+=	X11.6:${PORTSDIR}/x11/XFree86
 .endif
 
@@ -1988,6 +1990,12 @@
 DEPENDS_TMP+=	${RUN_DEPENDS}
 .endif
 
+.if defined(ALWAYS_BUILD_DEPENDS)
+_DEPEND_ALWAYS=	1
+.else
+_DEPEND_ALWAYS=	0
+.endif
+
 _DEPENDS_USE:	.USE
 .if defined(DEPENDS_TMP)
 .if !defined(NO_DEPENDS)
@@ -2003,7 +2011,12 @@
 		if ${EXPR} "$$prog" : \\/ >/dev/null; then \
 			if [ -e "$$prog" ]; then \
 				${ECHO_MSG} "===>   ${PKGNAME} depends on file: $$prog - found"; \
-				notfound=0; \
+				if [ ${_DEPEND_ALWAYS} = 1 ]; then \
+					${ECHO_MSG} "       (but building it anyway)"; \
+					notfound=1; \
+				else \
+					notfound=0; \
+				fi; \
 			else \
 				${ECHO_MSG} "===>   ${PKGNAME} depends on file: $$prog - not found"; \
 				notfound=1; \
@@ -2011,7 +2024,12 @@
 		else \
 			if which "$$prog" > /dev/null 2>&1 ; then \
 				${ECHO_MSG} "===>   ${PKGNAME} depends on executable: $$prog - found"; \
-				notfound=0; \
+				if [ ${_DEPEND_ALWAYS} = 1 ]; then \
+					${ECHO_MSG} "       (but building it anyway)"; \
+					notfound=1; \
+				else \
+					notfound=0; \
+				fi; \
 			else \
 				${ECHO_MSG} "===>   ${PKGNAME} depends on executable: $$prog - not found"; \
 				notfound=1; \
@@ -2050,8 +2068,17 @@
 		fi; \
 		if ${LDCONFIG} -r | ${GREP} -qwF -e "-l$$lib"; then \
 			${ECHO_MSG} "===>   ${PKGNAME} depends on shared library: $$lib - found"; \
+			if [ ${_DEPEND_ALWAYS} = 1 ]; then \
+				${ECHO_MSG} "       (but building it anyway)"; \
+				notfound=1; \
+			else \
+				notfound=0; \
+			fi; \
 		else \
 			${ECHO_MSG} "===>   ${PKGNAME} depends on shared library: $$lib - not found"; \
+			notfound=1; \
+		fi; \
+		if [ $$notfound != 0 ]; then \
 			${ECHO_MSG} "===>    Verifying $$target for $$lib in $$dir"; \
 			if [ ! -d "$$dir" ]; then \
 				${ECHO_MSG} "     >> No directory for $$lib.  Skipping.."; \


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904060408.VAA06613>