summaryrefslogtreecommitdiff
path: root/mk/install
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2009-09-18 10:11:48 +0000
committerjoerg <joerg@pkgsrc.org>2009-09-18 10:11:48 +0000
commite940f6e2415133836f70b83195d63e82db9cb5b3 (patch)
treefd1d3357c0cf75609efad06a20a1ce66a6967858 /mk/install
parent94ce4b1532310152347bee2944e552b8aea1ec14 (diff)
downloadpkgsrc-e940f6e2415133836f70b83195d63e82db9cb5b3.tar.gz
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.
Diffstat (limited to 'mk/install')
-rw-r--r--mk/install/install.mk12
1 files 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)