projects
/
platform
/
upstream
/
automake.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d3b980
)
depcomp: avoid an extra fork when possible
author
Stefano Lattarini
<stefano.lattarini@gmail.com>
Thu, 18 Oct 2012 12:45:21 +0000
(14:45 +0200)
committer
Stefano Lattarini
<stefano.lattarini@gmail.com>
Sat, 24 Nov 2012 14:52:42 +0000
(15:52 +0100)
* lib/depcomp (set_dir_from): Here.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
lib/depcomp
patch
|
blob
|
history
diff --git
a/lib/depcomp
b/lib/depcomp
index
1707586
..
23a9fcb
100755
(executable)
--- a/
lib/depcomp
+++ b/
lib/depcomp
@@
-61,8
+61,10
@@
esac
# be either empty or ending with a '/' character. This is deliberate.
set_dir_from ()
{
- dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$1" && dir=
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
}
# Get the suffix-stripped basename of the given path, and save it the