From fb338f26c39b6e4d1461f9c0b43c603cdb0f14cd Mon Sep 17 00:00:00 2001 From: espie Date: Sat, 28 Jul 2007 12:58:34 +0000 Subject: [PATCH] make mirror-maker sturdier: - pass an argument for the file into which we want to save the result, to avoid getting it polluted with error messages (defaults to /dev/stdout for debug). - create the makefile fragment as a temp file and only copy it when complete. - copy it in one chunk, so that one can read a partial mirror-maker file and have it be usable. This does allow for people to start a make mirror-maker in one shell, and start fetching stuff right away, before mirror-maker is finished. This also produces usable mirror-maker Makefiles even if the ports tree contains bogus entries. --- Makefile | 4 ++-- infrastructure/mk/bsd.port.mk | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e2f8b55e0d3..bc092e9fefb 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.54 2006/11/27 15:38:01 espie Exp $ +# $OpenBSD: Makefile,v 1.55 2007/07/28 12:58:34 espie Exp $ # $FreeBSD: Makefile,v 1.36 1997/10/04 15:54:31 jkh Exp $ # @@ -115,7 +115,7 @@ mirror-maker: trap "rm -f $${_DONE_FILES}" 0 1 2 3 13 15; \ ${MAKE} fetch-makefile \ ECHO_MSG='echo >&2' \ - >>${MIRROR_MK} + _FETCH_MAKEFILE=${MIRROR_MK} homepages.html: @echo '