summaryrefslogtreecommitdiff
path: root/install-sh
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2008-04-09 22:42:49 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2008-04-09 22:42:49 +0000
commit839a51c83c61febe8d4c9ba56f6a05fce3d03710 (patch)
treef4a78140580870e06a5d95257d979990e12155ab /install-sh
parent50fe720154d2af59cdeeaecf05cc868530e16248 (diff)
downloadcups-839a51c83c61febe8d4c9ba56f6a05fce3d03710.tar.gz
Merge changes from CUPS 1.4svn-r7394.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@702 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'install-sh')
-rwxr-xr-xinstall-sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/install-sh b/install-sh
index 398a88e14..2c4a67c2d 100755
--- a/install-sh
+++ b/install-sh
@@ -3,6 +3,7 @@
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
+# Library stripping changes Copyright 2008 by Apple Inc.
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
@@ -181,7 +182,9 @@ while [ $# -ne 0 ] ; do
if [ ! -d "${pathcomp}" ] ;
then
- $mkdirprog "${pathcomp}"
+ $mkdirprog "${pathcomp}" &&
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$pathcomp"; else : ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$pathcomp"; else : ; fi
else
:
fi
@@ -196,7 +199,6 @@ then
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
else
@@ -219,6 +221,16 @@ else
:
fi
+# Check the destination file - for libraries just use the "-x" option to strip
+ case "$dstfile" in
+ *.a | *.dylib | *.sl | *.sl.* | *.so | *.so.*)
+ stripopt="-x"
+ ;;
+ *)
+ stripopt=""
+ ;;
+ esac
+
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
@@ -237,7 +249,7 @@ else
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $stripopt $dsttmp; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
# Now rename the file to the real destination.