1 |
commit: ecd9954d249956d09be0f4803b1b8766ae203adc |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 2 04:49:24 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 2 04:50:15 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecd9954d |
7 |
|
8 |
autotools.eclass: autotools_run_tool: allow full paths to tools #549268 |
9 |
|
10 |
In some cases we want to pass the full path to the autotool program. |
11 |
Since the wrapper doesn't really care about this part, normalize the |
12 |
program name to its basename when creating the stderr file. |
13 |
|
14 |
eclass/autotools.eclass | 5 +++-- |
15 |
1 file changed, 3 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass |
18 |
index 22f2f39..7c82efc 100644 |
19 |
--- a/eclass/autotools.eclass |
20 |
+++ b/eclass/autotools.eclass |
21 |
@@ -475,13 +475,14 @@ autotools_run_tool() { |
22 |
|
23 |
autotools_env_setup |
24 |
|
25 |
- local STDERR_TARGET="${T}/$1.out" |
26 |
+ # Allow people to pass in full paths. #549268 |
27 |
+ local STDERR_TARGET="${T}/${1##*/}.out" |
28 |
# most of the time, there will only be one run, but if there are |
29 |
# more, make sure we get unique log filenames |
30 |
if [[ -e ${STDERR_TARGET} ]] ; then |
31 |
local i=1 |
32 |
while :; do |
33 |
- STDERR_TARGET="${T}/$1-${i}.out" |
34 |
+ STDERR_TARGET="${T}/${1##*/}-${i}.out" |
35 |
[[ -e ${STDERR_TARGET} ]] || break |
36 |
: $(( i++ )) |
37 |
done |