[2/3] mingw: Don't install import libraries with the major version number

Message ID 1310021290-77683-2-git-send-email-martin@martin.st
State Superseded
Headers show

Commit Message

Martin Storsjö July 7, 2011, 6:48 a.m.
Users of these files normally use the unversioned file anyway,
I think. That's what our documentation recommends at least.
---
 configure |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Diego Biurrun July 7, 2011, 7:31 a.m. | #1
On Thu, Jul 07, 2011 at 09:48:09AM +0300, Martin Storsjö wrote:
> Users of these files normally use the unversioned file anyway,
> I think. That's what our documentation recommends at least.

Is there a problem with installing both?

Also, a log message should not sound quite as unsure, so I assume
this is an RFC patch .. :)

> --- a/configure
> +++ b/configure
> @@ -2421,7 +2421,6 @@ case $target_os in
>          SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \
> -            install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"; \
>              install -d "$(LIBDIR)"; \
>              install -m 644 $(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) "$(LIBDIR)/lib$(SLIBNAME:$(SLIBSUF)=.dll.a)"; \

unrelated: I wonder why the first install command is prefixed with '-'
while the others are not.  I suspect this is an oversight.

Diego
Martin Storsjö July 7, 2011, 7:46 a.m. | #2
On Thu, 7 Jul 2011, Diego Biurrun wrote:

> On Thu, Jul 07, 2011 at 09:48:09AM +0300, Martin Storsjö wrote:
> > Users of these files normally use the unversioned file anyway,
> > I think. That's what our documentation recommends at least.
> 
> Is there a problem with installing both?

Not really, except for cluttering the output directory.

> Also, a log message should not sound quite as unsure, so I assume
> this is an RFC patch .. :)

You can regard it as a RFC patch yes :-)

> > --- a/configure
> > +++ b/configure
> > @@ -2421,7 +2421,6 @@ case $target_os in
> >          SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \
> > -            install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"; \
> >              install -d "$(LIBDIR)"; \
> >              install -m 644 $(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) "$(LIBDIR)/lib$(SLIBNAME:$(SLIBSUF)=.dll.a)"; \
> 
> unrelated: I wonder why the first install command is prefixed with '-'
> while the others are not.  I suspect this is an oversight.

Since all of this is executed as one single line in make, the '-' char for 
ignoring errors can only be at the start of the line. If you add it at the 
start of a later command after a semicolon, the shell will actually try to 
execute it. So I think this aspect of it is all right.

// Martin

Patch

diff --git a/configure b/configure
index 0508508..0fa2db5 100755
--- a/configure
+++ b/configure
@@ -2421,7 +2421,6 @@  case $target_os in
         SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
         SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
         SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \
-            install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"; \
             install -d "$(LIBDIR)"; \
             install -m 644 $(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) "$(LIBDIR)/lib$(SLIBNAME:$(SLIBSUF)=.dll.a)"; \
             install $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def) "$(LIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)"'