libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Libtool head: Fix for -mode=clean on Cygwin/MinGW


From: Ralf Wildenhues
Subject: Re: Libtool head: Fix for -mode=clean on Cygwin/MinGW
Date: Wed, 21 Sep 2005 13:43:44 +0200
User-agent: Mutt/1.4.1i

Hi Peter,

* Peter Ekberg wrote on Wed, Sep 21, 2005 at 11:36:33AM CEST:
> * Peter Ekberg wrote on Wednesday, September 21, 2005 11:14 CEST:
> > If you use libtool -mode=clean on an uninstalled .la lib on
> > Cygwin (or MinGW I assume), not all associated files are
> > cleaned out. The reason is as follows; an uninstalled .la
> > typically looks like this on Cygwin:

*snip*
> > # The name that we can dlopen(3).
> > dlname='cyga-0.dll'
> > 
> > # Names of this library.
> > library_names='liba.dll.a'
> > 
> > # The name of the static archive.
> > old_library='liba.a'

> > Clean only removes files in $library_names and $old_library, so
> > cyga-0.dll is left behind.

OK, but on systems other than cygwin/mingw this is removed in clean mode
because the name is in library_names as well.  Since clean mode also
supports `rm' without `-f', we mustn't mention files more than once.  So
please make sure $dlname is not part of $library_names (as in: case "
$library_names " in *" $dlname "* ...).  This is better than introducing
yet another system-dependence here.

FYI (reminder for the archives): this patch will likely conflict with 
the forward port of Keith Packard's SONAME patch.

> > Ok to apply?

Another nit below.

> >     * libltdl/config/ltmain.m4sh (func_mode_uninstall): Clean
> >     up $dlname as well when cleaning a libtool library. Fixes
> >     -mode=clean on Cygwin and MinGW to actually remove the dll
> >     when cleaning up an uninstalled library.
> > 
> > Ps. For -mode=uninstall, the dll is zapped by a custom
> > $postuninstall_cmds.

Could you then make this dependent on mode=clean only?

> Oops, the patch was wrong and needed s/dlopen/dlname/g

OK, with above changes.  Could you backport to branch-1-5 as well?

By the way, the .exp and .ver files are not removed in all cases either.
Haven't checked though, exactly _when_ they should be removed (e.g., at
the end of link mode); it may very well be the case that users rely on
their presence after the link command is finished.  In any case, this
issue is not very pressing.

Cheers, and thank you!
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]