[FFmpeg-devel] [PATCH] Alternative OS/2 patch

Dave Yeo daveryeo
Tue Nov 27 03:11:54 CET 2007


On 11/26/07 04:53 pm, Diego Biurrun wrote:
> On Fri, Nov 23, 2007 at 09:58:42PM -0800, Dave Yeo wrote:
>> On 11/08/07 09:16 pm, Dave Yeo wrote:
>>> On 11/05/07 04:11 pm, Diego Biurrun wrote:
>>>> On Mon, Nov 05, 2007 at 08:04:12AM -0800, Dave Yeo wrote:
>>>>> On 11/04/07 04:29 pm, Diego Biurrun wrote:
>>>>>> On Sun, Nov 04, 2007 at 02:07:54PM -0800, Dave Yeo wrote:
>>>>>>> ...
>>> ...
>>>>>>> --- configure    (revision 10924)
>>>>>>> +++ configure    (working copy)
>>>>>>> @@ -1210,6 +1212,33 @@
>>>>>>> +  os/2)
>>>>>>> +    SLIB_CREATE_DEF_CMD="echo LIBRARY \$(FULLNAME) INITINSTANCE 
>>>>>>> TERMINSTANCE > \$(FULLNAME).def; \
>>>>>>> +        echo DESCRIPTION '\"\$(SLIBNAME_WITH_VERSION)\"' >> 
>>>>>>> \$(FULLNAME).def; \
>>>>>>> +        echo PROTMODE >> \$(FULLNAME).def; \
>>>>>>> +        echo CODE PRELOAD MOVEABLE DISCARDABLE >> \$(FULLNAME).def; \
>>>>>>> +        echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> 
>>>>>>> \$(FULLNAME).def; \
>>>>>>> +        echo EXPORTS >> \$(FULLNAME).def; \
>>>>>>> +        emxexp -o \$(OBJS) >> \$(FULLNAME).def"
>>>>>> Try using 'cat << EOF', that should simplify things a lot.
>>>>> I've never seen cat used this way and not sure how that would work.
>>>> Then it's high time :)
>>>>
>>>> Something like
>>>>
>>>> cat << EOF > filename
>>>> some
>>>> stuff
>>>> EOF
>>>>
>>>> should accomplish the above without all the nasty escaping.
>>>>
>>> While now having more understanding of here-documents it seems to only
>>> be applicable to shell scripts and I can't see anyway to easily use it
>>> in a makefile. The command does have to be run by the makefile to expand
>>> the variables and we need the objects already built to extract the
>>> exports from them.
> 
> Yes, running a multiline command from a Makefile is nontrivial.  Some
> define stuff might do the trick.  Mans?
> 
>>> Attached patch cleans up some of the nasty escaping by putting the 
>>> DESCRIPTION field into a separate variable. This has the extra advantage 
>>> that it makes it simpler to change the description. (adding things like 
>>> vendor or bldlevel info).
>>> Also makes config.mak more readable :)
> 
> The DESCRIPTION variable is only used once.  How does that make things
> simpler?

The DESCRIPTION needs to be quoted (according to the docs with single 
quotes though double quotes do work) so we need more escaping for the 
quotes to be written to the DEF file. Separating it allows only the 
DESCRIPTION variable to contain escapes. It also makes it simpler to 
expand the DESCRIPTION to be expanded by anyone who is distributing 
FFmpeg. One example is adding bldlevel info. See 
http://www.edm2.com/0506/buildlevel.html for overview of bldlevel.
http://cyberkinetica.homeunix.net/os2tk45/toolsref/ has a better version 
of the OS/2 toolsref documentation with Module Definition File Basics 
about 30~40% down the right frame.

> 
>> Here is the patch updated for various configure updates. See new message 
>> about other minor fixes needed for OS/2
> 
>> --- configure	(revision 11085)
>> +++ configure	(working copy)
>> @@ -1933,6 +1967,7 @@
>>      echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak
>> +    echo "SLIB_CREATE_DEF_CMD=${SLIB_CREATE_DEF_CMD}" >> config.mak
> 
> This is not used in any Makefile and thus has no effect.

The common.mak part of the patch seems to of got dropped or forgotten. 
Attached find the whole patch.
> 
> Diego

Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alt_os2.diff
Type: text/x-patch
Size: 3696 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071126/9a9c8a1d/attachment.bin>



More information about the ffmpeg-devel mailing list