summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-11-14 21:45:21 +0000
committerjlam <jlam@pkgsrc.org>2002-11-14 21:45:21 +0000
commit9d0681cbce494aab896aa11ab763f764d76ac1bc (patch)
tree0730924ef1c5c9cfb46da68135a6a69560bd8990 /mk
parenta07bbb4ba79a28331ec4727c4c2a8762f3627af7 (diff)
downloadpkgsrc-9d0681cbce494aab896aa11ab763f764d76ac1bc.tar.gz
Allow for common case where --mode=install is not specified when using
libtool to install libraries or programs.
Diffstat (limited to 'mk')
-rw-r--r--mk/buildlink2/libtool.sh106
1 files changed, 59 insertions, 47 deletions
diff --git a/mk/buildlink2/libtool.sh b/mk/buildlink2/libtool.sh
index 8ec230dc11c..4ad3b6094bf 100644
--- a/mk/buildlink2/libtool.sh
+++ b/mk/buildlink2/libtool.sh
@@ -1,6 +1,6 @@
#!@BUILDLINK_SHELL@
#
-# $NetBSD: libtool.sh,v 1.5 2002/09/28 23:46:42 jlam Exp $
+# $NetBSD: libtool.sh,v 1.6 2002/11/14 21:45:21 jlam Exp $
Xsed='@SED@ -e 1s/^X//'
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
@@ -16,57 +16,69 @@ updatecache=${BUILDLINK_UPDATE_CACHE-yes}
cmd="@WRAPPEE@"
lafile=
-while [ $# -gt 0 ]; do
+doinstall=
+case "$1" in
+*install|*cp|*install-sh|*install.sh)
arg="$1"; shift
- case $arg in
- --fix-la)
- case "$1" in
- *.la)
- lafile="$1"
- . $libtool_fix_la
- exit
+ doinstall=yes
+ ;;
+*)
+ while [ $# -gt 0 ]; do
+ arg="$1"; shift
+ case $arg in
+ --fix-la)
+ case "$1" in
+ *.la)
+ lafile="$1"
+ . $libtool_fix_la
+ exit
+ ;;
+ esac
+ ;;
+ --mode|--mode=install)
+ if [ "$arg" = "--mode=install" ] || \
+ [ "$arg" = "--mode" -a "$1" = "install" ]; then
+ doinstall=yes
+ break
+ fi
+ ;;
+ -o)
+ case "$1" in
+ *.la) lafile="$1" ;;
+ esac
+ ;;
+ *)
+ cacheupdated=
+ . $logic
+ case "$cacheupdated" in
+ yes) @CAT@ $pre_cache $cache $post_cache > $logic ;;
+ esac
;;
esac
- ;;
- --mode|--mode=install)
- if [ "$arg" = "--mode=install" ] || \
- [ "$arg" = "--mode" -a "$1" = "install" ]; then
- args="$args $arg"
- while [ $# -gt 0 ]; do
- arg="$1"; shift
- case $arg in
- *[\`\"\$\\]*)
- arg=`@ECHO@ X$arg | \
- $Xsed -e "$sed_quote_subst" \
- `
- ;;
- esac
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- args="$args $arg"
- done
- break
- fi
- ;;
- -o)
- case "$1" in
- *.la) lafile="$1" ;;
+ . $specificlogic
+ args="$args $arg"
+ done
+ ;;
+esac
+if [ -n "$doinstall" ]; then
+ args="$args $arg"
+ while [ $# -gt 0 ]; do
+ arg="$1"; shift
+ case $arg in
+ *[\`\"\$\\]*)
+ arg=`@ECHO@ X$arg | \
+ $Xsed -e "$sed_quote_subst" \
+ `
+ ;;
esac
- ;;
- *)
- cacheupdated=
- . $logic
- case "$cacheupdated" in
- yes) @CAT@ $pre_cache $cache $post_cache > $logic ;;
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
esac
- ;;
- esac
- . $specificlogic
- args="$args $arg"
-done
+ args="$args $arg"
+ done
+fi
cmd="$cmd $args"
@_BLNK_WRAP_ENV@