From owner-freebsd-ports Tue Mar 25 20:18:46 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id UAA12844 for ports-outgoing; Tue, 25 Mar 1997 20:18:46 -0800 (PST) Received: from rover.village.org (rover.village.org [204.144.255.49]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id UAA12839 for ; Tue, 25 Mar 1997 20:18:42 -0800 (PST) Received: from rover.village.org [127.0.0.1] by rover.village.org with esmtp (Exim 1.60 #1) id 0w9k9t-0004U5-00; Tue, 25 Mar 1997 21:17:57 -0700 To: asami@vader.cs.berkeley.edu (Satoshi Asami) Subject: Re: make -k oddities Cc: adam@veda.is, freebsd-ports@freebsd.org In-reply-to: Your message of "Tue, 25 Feb 1997 23:07:42 PST." <199702260707.XAA03996@silvia.HIP.Berkeley.EDU> References: <199702260707.XAA03996@silvia.HIP.Berkeley.EDU> Date: Tue, 25 Mar 1997 21:17:56 -0700 From: Warner Losh Message-Id: Sender: owner-ports@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In message <199702260707.XAA03996@silvia.HIP.Berkeley.EDU> Satoshi Asami writes: : * >When I do a make -k for a port that I don't have (and can't get) the : * >dist file for, then it will try to fetch and fail. Once it fails it : * >will then try to patch, which it shouldn't do. : * : * make -k means "ignore error return from command" but bsd.port.mk uses the : * error return to bail out at that point. : : That's not the problem. The real problem is that "make -k" always : returns 0. By changing the way chaining is done (see attached patch) : some cases can be caught (like fetch) but not all because bsd.port.mk : often calles sub-makes as a shell command to do certain things (try to : read _PORT_USE if you have a strong stomach). : : Do people think "make -k" always returning 0 is correct? I tend to : think it's a bug, and it should return the status of the last command : executed. Otherwise it is useless for chaining calls of make. : : Satoshi : ------- : Index: bsd.port.mk : =================================================================== : RCS file: /usr/cvs/src/share/mk/bsd.port.mk,v : retrieving revision 1.253 : diff -u -r1.253 bsd.port.mk : --- bsd.port.mk 1997/02/23 13:24:45 1.253 : +++ bsd.port.mk 1997/02/26 07:04:28 : @@ -1101,40 +1101,41 @@ : .endif : : .if !target(extract) : -extract: checksum ${EXTRACT_COOKIE} : +extract: ${EXTRACT_COOKIE} : .endif : : .if !target(patch) : -patch: extract ${PATCH_COOKIE} : +patch: ${PATCH_COOKIE} : .endif : : .if !target(configure) : -configure: patch ${CONFIGURE_COOKIE} : +configure: ${CONFIGURE_COOKIE} : .endif : : .if !target(build) : -build: configure ${BUILD_COOKIE} : +build: ${BUILD_COOKIE} : .endif : : .if !target(install) : -install: build ${INSTALL_COOKIE} : +install: ${INSTALL_COOKIE} : .endif : : .if !target(package) : -package: install ${PACKAGE_COOKIE} : +package: ${PACKAGE_COOKIE} : .endif : : -${EXTRACT_COOKIE}: : +# note that checksum depends on fetch (see below) : +${EXTRACT_COOKIE}: checksum : @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} real-extract : -${PATCH_COOKIE}: : +${PATCH_COOKIE}: extract : @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} real-patch : -${CONFIGURE_COOKIE}: : +${CONFIGURE_COOKIE}: patch : @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} real-configure : -${BUILD_COOKIE}: : +${BUILD_COOKIE}: configure : @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} real-build : -${INSTALL_COOKIE}: : +${INSTALL_COOKIE}: build : @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} real-install : -${PACKAGE_COOKIE}: : +${PACKAGE_COOKIE}: install : @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} real-package : : # And call the macros : Sorry to include so much code, but it has been about a month since you sent this out and I'm just now getting back to it. This change appears to be bad. It seems forces a complete rebuild every time, at least on OpenBSD. :-( Warner