diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-14 00:15:09 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-14 00:15:09 +0000 |
commit | 3b98fdf9f3967a455d101b2ff76ec62c089a3cbf (patch) | |
tree | 5d3e5bd225a0849bd79615330e0daff7351df7b8 /make | |
parent | 7e014c9b8c910e405518541135030b69e3db2914 (diff) |
Make the rpath() macro handle lines with multiple -L in them
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6309 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'make')
-rw-r--r-- | make/utilities.pm | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/make/utilities.pm b/make/utilities.pm index 2470e1b44..a4133de06 100644 --- a/make/utilities.pm +++ b/make/utilities.pm @@ -14,14 +14,20 @@ sub make_rpath($) { my ($executable) = @_; chomp($data = `$executable`); - $data =~ /-L(\S+)\s/; - $libpath = $1; - if (!exists $already_added{$libpath}) + my $output = ""; + while ($data =~ /-L(\S+)/) { - print "Adding extra library path \033[1;32m$libpath\033[0m ...\n"; - $already_added{$libpath} = 1; + $libpath = $1; + chomp($libpath); + if (!exists $already_added{$libpath}) + { + print "Adding extra library path \033[1;32m$libpath\033[0m ...\n"; + $already_added{$libpath} = 1; + } + $output .= "-Wl,--rpath -Wl,$libpath -L$libpath "; + $data =~ s/-L(\S+)//; } - return "-Wl,--rpath -Wl,$libpath -L$libpath"; + return $output; } sub extend_pkg_path() |