[FFmpeg-devel] [PATCH] Add versioning information to dlls

Ramiro Polla ramiro
Thu May 22 19:39:47 CEST 2008

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

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 =)

Ramiro Polla

More information about the ffmpeg-devel mailing list