From 3b62c8ab19d5268b4a151546b9768e00b3b668fd Mon Sep 17 00:00:00 2001 From: joerg Date: Fri, 18 Sep 2009 10:11:48 +0000 Subject: Deal with strip idiosyncracies: - sometimes creates the temporary file, but fails - sometimes it is successful, but still keeps the temporary file - sometimes it crashes when called with more than one argument Bite the bullet and call it individually with explicit output file and clean up after it. --- mk/install/install.mk | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mk/install/install.mk b/mk/install/install.mk index 18a54a1c5f0..0d3b1e78dfe 100644 --- a/mk/install/install.mk +++ b/mk/install/install.mk @@ -1,4 +1,4 @@ -# $NetBSD: install.mk,v 1.54 2009/09/02 22:05:42 joerg Exp $ +# $NetBSD: install.mk,v 1.55 2009/09/18 10:11:48 joerg Exp $ # # This file provides the code for the "install" phase. # @@ -343,7 +343,15 @@ install-strip-debug: plist @${STEP_MSG} "Automatic stripping of debug information" ${RUN}${CAT} ${_PLIST_NOKEYWORDS} \ | ${SED} -e 's|^|${DESTDIR}${PREFIX}/|' \ - | ${XARGS} ${STRIP} -g 2>/dev/null || ${TRUE} + | while read f; do \ + tmp_f="$${fname}.XXX" + if ${STRIP} -g -o "$${tmp_f}" "$${f}" 2> /dev/null; then \ + [ ! -f "$${f}.tmpXXX" ] || \ + ${MV} "$${tmp_f}" "$${f}"; \ + else \ + ${RM} -f $${tmp_f}; \ + fi \ + done ###################################################################### ### install-doc-handling (PRIVATE) -- cgit v1.2.3