From owner-freebsd-ports Tue Feb 25 23:09:03 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id XAA22535 for ports-outgoing; Tue, 25 Feb 1997 23:09:03 -0800 (PST) Received: from dfw-ix2.ix.netcom.com (dfw-ix2.ix.netcom.com [206.214.98.2]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA22530 for ; Tue, 25 Feb 1997 23:09:01 -0800 (PST) Received: (from smap@localhost) by dfw-ix2.ix.netcom.com (8.8.4/8.8.4) id BAA13258; Wed, 26 Feb 1997 01:08:15 -0600 (CST) Received: from wck-ca5-07.ix.netcom.com(199.35.213.167) by dfw-ix2.ix.netcom.com via smap (V1.3) id sma013249; Wed Feb 26 01:07:47 1997 Received: (from asami@localhost) by silvia.HIP.Berkeley.EDU (8.8.5/8.6.9) id XAA03996; Tue, 25 Feb 1997 23:07:42 -0800 (PST) Date: Tue, 25 Feb 1997 23:07:42 -0800 (PST) Message-Id: <199702260707.XAA03996@silvia.HIP.Berkeley.EDU> To: adam@veda.is CC: imp@village.ORG, freebsd-ports@FreeBSD.ORG In-reply-to: <199702260432.EAA07601@veda.is> (message from Adam David on Wed, 26 Feb 1997 04:32:33 GMT) Subject: Re: make -k oddities From: asami@vader.cs.berkeley.edu (Satoshi Asami) Sender: owner-ports@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk * >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