[FFmpeg-devel] [PATCH] Re-add OS/2 support

Diego Biurrun diego
Wed Oct 24 10:20:51 CEST 2007


On Mon, Oct 22, 2007 at 10:49:14AM -0700, Dave Yeo wrote:
> On 10/22/07 09:55 am, Diego Biurrun wrote:
>> On Mon, Oct 22, 2007 at 09:46:05AM -0700, Dave Yeo wrote:
>>> --- configure	(revision 10822)
>>> +++ configure	(working copy)
>>> @@ -1212,6 +1214,26 @@
>>> +  os/2)
>>> +    SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
>>> +    SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)'
>>> +    SLIB_EXTRA_CMD='cmd /C dllar -o $(SLIBNAME) $(LIBNAME) -d 
>>> $(SLIBNAME_WITH_MAJOR) -omf -ord $(LDFLAGS) $(EXTRALIBS) $(EXTRAOBJS); cp 
>>> -f $(SLIBNAME) $(SLIBNAME_WITH_MAJOR)'
>>> +    SLIB_INSTALL_EXTRA_CMD='install -m 644 $(NAME).lib 
>>> $(LIBDIR)/$(LIBPREF)$(NAME)_dll.lib; install -m 644 $(NAME).a 
>>> $(LIBDIR)/$(LIBPREF)$(NAME)_dll.a'
>>> +    SLIB_UNINSTALL_EXTRA_CMD='rm -f $(LIBDIR)/$(LIBPREF)$(NAME)_dll.lib; 
>>> rm -f $(LIBDIR)/$(LIBPREF)$(NAME)_dll.a'
>> NAME needs to be FULLNAME to take BUILDSUF into account.
>
> Both NAME and FULLNAME work here. Updated patch attached
> --- configure	(revision 10837)
> +++ configure	(working copy)
> @@ -1212,6 +1214,26 @@
> +  os/2)
> +    ln_s="cp -f"
> +    LIBSUF="_s.lib"
> +    SLIBPREF=""
> +    SLIBSUF=".dll"
> +    SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
> +    SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
> +    SLIB_EXTRA_CMD='cmd /C dllar -o $(SLIBNAME) $(LIBNAME) -d $(SLIBNAME_WITH_MAJOR) -omf -ord $(LDFLAGS) $(EXTRALIBS) $(EXTRAOBJS); cp -f $(SLIBNAME) $(SLIBNAME_WITH_MAJOR)'

The 'cp -f' is redundant, compare common.mak:

install-lib-shared: $(SLIBNAME)
	install -d "$(SHLIBDIR)"
	install -m 755 $(SLIBNAME) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
	$(STRIP) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
	cd "$(SHLIBDIR)" && \
		$(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR)
	cd "$(SHLIBDIR)" && \
		$(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME)
	$(SLIB_INSTALL_EXTRA_CMD)

On your system this amounts to

install -m 755 $(SLIBNAME) $(SLIBNAME_WITH_VERSION)
cp -f $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR)
cp -f $(SLIBNAME_WITH_VERSION) $(SLIBNAME)

and then you add

cp -f $(SLIBNAME) $(SLIBNAME_WITH_MAJOR)'

Clearly, this is redundant.

> +    SLIB_INSTALL_EXTRA_CMD='install -m 644 $(FULLNAME).lib $(LIBDIR)/$(LIBPREF)$(FULLNAME)_dll.lib; install -m 644 $(FULLNAME).a $(LIBDIR)/$(LIBPREF)$(FULLNAME)_dll.a'

The second command is for the static lib, right?  Then it should be in
LIB_INSTALL_EXTRA_CMD.

Diego




More information about the ffmpeg-devel mailing list