Re: small fix of libtool.m4

Christian <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <[email protected]>
i’ve had a look again at libtool.m4 and don’t really get why RM is set wrong. obviously the _LT_CONFIG macro literally requires _LT_FILEUTILS_DEFAULT, which should set RM to ‘rm -f’. I also found several uses of $RM with different options, sometimes even ‘-f’. So actually i am not sure what would be the best solution here.

right now i could change the patch like proposed by Eric Blake to the one i attached. It will at least fix the direct problem i encountered. But maybe for the long term, someone should check and maintain the whole libtool.m4 file?!

kind regards
christian




> On May 9, 2016, at 1:59 PM, Roumen Petrov <[email protected]> wrote:
> 
> Christian wrote:
>> so today i gave it a shot again and put a debug output right before the ‘$RM “$cfgfile”’. For some reason RM is set to ‘/bin/rm’ only. no ‘-f’. i’ll try to figure out where that might come from.
> Perhaps build package is libxslt .
> Issue is already reported many times. Project use AC_PATH_PROG to find rm command.
> 
> May be change variable name to lt_RM is solution
> 
> Regards,
> Roumen
>
cfgfile.patch (application/octet-stream, 318 B)
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index ee292af..49cb9cf 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -723,7 +723,7 @@ _LT_CONFIG_SAVE_COMMANDS([
 
     cfgfile=${ofile}T
     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
-    $RM "$cfgfile"
+    $RM -f "$cfgfile"
 
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.