[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Optimize func_ltwrapper_scriptname to assume a cwrapper.
From: |
Ralf Wildenhues |
Subject: |
Optimize func_ltwrapper_scriptname to assume a cwrapper. |
Date: |
Tue, 15 Jun 2010 21:28:34 +0200 |
User-agent: |
Mutt/1.5.20 (2010-04-22) |
The function func_ltwrapper_executable_p is used right before
func_ltwrapper_scriptname a couple of times in ltmain; the latter again
calls the former. This costs an extra grep. The only time we don't
call func_ltwrapper_executable_p first is on a just-created wrapper
executable.
So this should be safe. And the documentation is there already before
the function, too.
Any reasons against committing this?
Thanks,
Ralf
Optimize func_ltwrapper_scriptname to assume a cwrapper.
* libltdl/config/ltmain.m4sh (func_ltwrapper_scriptname): Do not
call func_ltwrapper_executable_p again here, this function is
documented to allow being called with wrapper executables.
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index b764ab7..cf15ebc 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -519,12 +519,9 @@ func_ltwrapper_executable_p ()
# temporary ltwrapper_script.
func_ltwrapper_scriptname ()
{
- func_ltwrapper_scriptname_result=""
- if func_ltwrapper_executable_p "$1"; then
- func_dirname_and_basename "$1" "" "."
- func_stripname '' '.exe' "$func_basename_result"
-
func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
- fi
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+
func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
}
# func_ltwrapper_p file
- Optimize func_ltwrapper_scriptname to assume a cwrapper.,
Ralf Wildenhues <=