pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk/install



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Mon Nov 12 13:42:16 UTC 2018

Modified Files:
        pkgsrc/mk/install: install.mk

Log Message:
mk/install: Improve the strip-debug target.

Use the new strip-dbg tool, ensuring that we don't fail when the native strip
doesn't support -g.  Actually check for the existence of the output file
before trying to move it into place.  Add support for STRIP_FILES_SKIP for
certain files which should not be stripped.  And finally, improve performance
slightly by skipping symlinks.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 pkgsrc/mk/install/install.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/install/install.mk
diff -u pkgsrc/mk/install/install.mk:1.72 pkgsrc/mk/install/install.mk:1.73
--- pkgsrc/mk/install/install.mk:1.72   Tue Aug  8 17:17:25 2017
+++ pkgsrc/mk/install/install.mk        Mon Nov 12 13:42:16 2018
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.72 2017/08/08 17:17:25 jlam Exp $
+# $NetBSD: install.mk,v 1.73 2018/11/12 13:42:16 jperkin Exp $
 #
 # This file provides the code for the "install" phase.
 #
@@ -338,16 +338,20 @@ post-install:
 .PHONY: install-strip-debug
 install-strip-debug: plist
        @${STEP_MSG} "Automatic stripping of debug information"
-       ${RUN}${CAT} ${_PLIST_NOKEYWORDS} \
-       | ${SED} -e 's|^|${DESTDIR}${PREFIX}/|' \
-       | while read f; do \
-               tmp_f="$${f}.XXX"; \
-               if ${STRIP} -g -o "$${tmp_f}" "$${f}" 2> /dev/null; then \
-                       [ ! -f "$${f}" ] || \
-                           ${MV} "$${tmp_f}" "$${f}"; \
-               else \
-                       ${RM} -f "$${tmp_f}"; \
-               fi \
+       ${RUN}cd ${DESTDIR:Q}${PREFIX:Q};                               \
+       ${CAT} ${_PLIST_NOKEYWORDS} | while read f; do                  \
+               [ ! -h "$${f}" ] || continue;                           \
+               case "$${f}" in                                         \
+               ${STRIP_FILES_SKIP:@p@${p}) continue;;@}                \
+               *) ;;                                                   \
+               esac;                                                   \
+               tmp_f="$${f}.XXX";                                      \
+               if ${STRIP_DBG} -o "$${tmp_f}" "$${f}" 2>/dev/null; then \
+                       if [ -f "$${tmp_f}" -a -f "$${f}" ]; then       \
+                               ${MV} "$${tmp_f}" "$${f}";              \
+                       fi;                                             \
+               fi;                                                     \
+               ${RM} -f "$${tmp_f}";                                   \
        done
 
 ######################################################################



Home | Main Index | Thread Index | Old Index