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

Diego Biurrun diego
Tue Nov 27 01:53:31 CET 2007


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?

> 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.

Diego




More information about the ffmpeg-devel mailing list