summaryrefslogtreecommitdiff
path: root/mk/wrapper
diff options
context:
space:
mode:
authorjlam <jlam>2005-01-26 05:03:11 +0000
committerjlam <jlam>2005-01-26 05:03:11 +0000
commit9f0ceec702a332f61a0bae0655eee0c911607ece (patch)
tree2a92b302b9c34aaf2e961a0168405ff30c1bfabc /mk/wrapper
parent4f315de393bcb2233d60f8be161425de58954c27 (diff)
downloadpkgsrc-9f0ceec702a332f61a0bae0655eee0c911607ece.tar.gz
Fix so that we preserve /usr/lib/foo.so on the command line.
Diffstat (limited to 'mk/wrapper')
-rw-r--r--mk/wrapper/arg-pp-main44
1 files changed, 28 insertions, 16 deletions
diff --git a/mk/wrapper/arg-pp-main b/mk/wrapper/arg-pp-main
index a03dc578be0..47e89d508e4 100644
--- a/mk/wrapper/arg-pp-main
+++ b/mk/wrapper/arg-pp-main
@@ -1,4 +1,4 @@
-# $NetBSD: arg-pp-main,v 1.2 2005/01/25 23:27:34 cube Exp $
+# $NetBSD: arg-pp-main,v 1.3 2005/01/26 05:03:11 jlam Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -47,11 +47,15 @@ case $arg in
*.so) lib="${lib%.so}" ;;
*.so.[0-9]*) lib="${lib%.so.[0-9]*}" ;;
esac
- prepend_queue argbuf "-l$lib"
- $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib"
- prepend_queue argbuf "-L$dir"
- $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir"
- argmatch=yes
+ case $argmatch in
+ yes) ;;
+ *) prepend_queue argbuf "-l$lib"
+ $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib"
+ prepend_queue argbuf "-L$dir"
+ $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir"
+ argmatch=yes
+ ;;
+ esac
;;
/*/lib*.sl|/*/lib*.sl.[0-9]*) # HP-UX
dir="${arg%/lib*}"
@@ -61,11 +65,15 @@ case $arg in
*.sl) lib="${lib%.sl}" ;;
*.sl.[0-9]*) lib="${lib%.sl.[0-9]*}" ;;
esac
- prepend_queue argbuf "-l$lib"
- $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib"
- prepend_queue argbuf "-L$dir"
- $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir"
- argmatch=yes
+ case $argmatch in
+ yes) ;;
+ *) prepend_queue argbuf "-l$lib"
+ $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib"
+ prepend_queue argbuf "-L$dir"
+ $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir"
+ argmatch=yes
+ ;;
+ esac
;;
/*/lib*.dylib) # Darwin
dir="${arg%/lib*.dylib}"
@@ -74,11 +82,15 @@ case $arg in
*/*) argok=yes; argmatch=yes ;;
*.dylib) lib="${lib%.dylib}" ;;
esac
- prepend_queue argbuf "-l$lib"
- $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib"
- prepend_queue argbuf "-L$dir"
- $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir"
- argmatch=yes
+ case $argmatch in
+ yes) ;;
+ *) prepend_queue argbuf "-l$lib"
+ $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib"
+ prepend_queue argbuf "-L$dir"
+ $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir"
+ argmatch=yes
+ ;;
+ esac
;;
######################################################################
# Remove extraneous comma in "-Wl,-R,/dir" and in "-Wl,-L,/dir".