Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Mar 1997 21:17:56 -0700
From:      Warner Losh <imp@village.org>
To:        asami@vader.cs.berkeley.edu (Satoshi Asami)
Cc:        adam@veda.is, freebsd-ports@freebsd.org
Subject:   Re: make -k oddities 
Message-ID:  <E0w9k9t-0004U5-00@rover.village.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>  

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E0w9k9t-0004U5-00>