[FFmpeg-devel] [PATCH] Add versioning information to dlls
Ramiro Polla
ramiro
Sun May 25 15:14:16 CEST 2008
Jeremy Kolb wrote:
>
>
> Ramiro Polla wrote:
>> Jeremy Kolb wrote:
>>
>>> Ramiro Polla wrote:
>>>
>>>>>>>> You can also let the dependency files (.d) check for version.h
>>>>>>>> and av*.h. Just add a rule for %.d: %.rc, add the extra objs to
>>>>>>>> DEPS, and make a DEPEND_CMD for .rc files that treats them as C
>>>>>>>> files (-xc flag for gcc). That way you can avoid SLIB_EXTRA_DEP.
>>>>>>>>
>>>>>>> Can you elaborate?
>>>>>>>
>>>>> I'll try:
>>>>> Currently you set SLIB_EXTRA_DEP to version.h manually. That means:
>>>>> if version.h is changed, recreate whatever files depended on them
>>>>> (in this case SLIB_EXTRA_OBJS). When I wrote the first patch, there
>>>>> was no good file dependency control like there is now. We can let
>>>>> the current dependency control check for whatever files
>>>>> SLIB_EXTRA_OBJS depends on. It automatically scans the file for
>>>>> includes or whatever.
>>>>> To get that for .rc files, add a rule that creates .d files for .rc
>>>>> files (just look at all the "%.d: %.*" rules in common.mak).
>>>>> One problem that arises is that gcc doesn't know .rc files are
>>>>> actually .c-like files that can be preprocessed correctly, so you
>>>>> have to find a way for DEPEND_CMD (for the "%.d: %.rc" rule) to add
>>>>> the "-xc" flag to the gcc invocation.
>>>>> After that is done, add $(SLIB_EXTRA_OBJS:.o=.d) to DEPS in
>>>>> common.mak so that dllinfo.d files are created. Then it should be
>>>>> safe to remove SLIB_EXTRA_DEP.
>>>>>
>>>>>
>>>> Hmm... It's not as easy as I thought it'd be. -MM assumes missing
>>>> files are on the same directory, but version.h is on the src
>>>> directory. Maybe create version.h before making the .d files, or
>>>> drop the whole product information. After all, FFmpeg is a project,
>>>> not a product, and maybe just the version information is enough for
>>>> the dllinfo, and the revision number could be dropped. Or better
>>>> yet just leave the patch the way it is =)
>>>>
>>> I REALLY like having the svn revision number in there. It makes it
>>> much easier to track.
>>>
>>
>> Then send an updated patch with the simpler license_str and no
>> trailing whitespaces and I'll apply it on the weekend if noone objects.
>>
>>
>
> This should take care of the trailing whitespaces.
Applied.
More information about the ffmpeg-devel
mailing list