Date: Tue, 25 Feb 1997 23:07:42 -0800 (PST) From: asami@vader.cs.berkeley.edu (Satoshi Asami) To: adam@veda.is Cc: imp@village.ORG, freebsd-ports@FreeBSD.ORG Subject: Re: make -k oddities Message-ID: <199702260707.XAA03996@silvia.HIP.Berkeley.EDU> In-Reply-To: <199702260432.EAA07601@veda.is> (message from Adam David on Wed, 26 Feb 1997 04:32:33 GMT)
next in thread | previous in thread | raw e-mail | index | archive | help
* >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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702260707.XAA03996>