diff options
author | jlam <jlam@pkgsrc.org> | 2005-01-26 05:03:11 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2005-01-26 05:03:11 +0000 |
commit | 7409c95091de3ba1805f1e93aef4386c0f6be68f (patch) | |
tree | 2a92b302b9c34aaf2e961a0168405ff30c1bfabc /mk | |
parent | 945857d92e9a8e0314bfad189442bea19f452cf6 (diff) | |
download | pkgsrc-7409c95091de3ba1805f1e93aef4386c0f6be68f.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-main | 44 |
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". |