summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-01-26 05:03:11 +0000
committerjlam <jlam@pkgsrc.org>2005-01-26 05:03:11 +0000
commita2a889c638465a4a10561543197904f862fd9d21 (patch)
tree2a92b302b9c34aaf2e961a0168405ff30c1bfabc /mk
parentdf8049aef7112511a023a74a5531ab1ecb8f82cb (diff)
downloadpkgsrc-a2a889c638465a4a10561543197904f862fd9d21.tar.gz
Fix so that we preserve /usr/lib/foo.so on the command line.
Diffstat (limited to 'mk')
-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".