use a trap to remove the tmp file, thus helping making sure it does not

stay around
This commit is contained in:
espie 2008-05-04 12:58:03 +00:00
parent 58b1418be0
commit 7ede32a06c

View File

@ -1,6 +1,6 @@
#-*- mode: Makefile; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make:
# $OpenBSD: bsd.port.mk,v 1.927 2008/05/04 12:53:14 espie Exp $
# $OpenBSD: bsd.port.mk,v 1.928 2008/05/04 12:58:03 espie Exp $
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
#
@ -2371,12 +2371,12 @@ _internal-clean:
# mirroring utilities
fetch-makefile:
@mk=`mktemp ${TMPDIR}/mk.XXXXXXX`; \
trap "rm -f $$mk" 0 1 2 3 13 15; \
if ${MAKE} __FETCH_ALL=Yes __ARCH_OK=Yes NO_IGNORE=Yes _fetch-makefile >$$mk; then \
cat $$mk >>${_FETCH_MAKEFILE}; \
else \
echo >&2 "Problem in ${PKGPATH}"; \
fi; \
rm -f $$mk
fi
mirror-maker-fetch:
@mk=`mktemp ${TMPDIR}/mk.XXXXXXXX`; ${MAKE} fetch-makefile >$$mk; \