[PATCH] Add versioning information to dlls
This patch adds support for generating .rc files and then linking them with the dlls created by ffmpeg. This information can be used to identify the product version by the user and is also available to installer programs for ease of updating etc. Jeremy
Jeremy Kolb wrote:
This patch adds support for generating .rc files and then linking them with the dlls created by ffmpeg. This information can be used to identify the product version by the user and is also available to installer programs for ease of updating etc.
Jeremy
Oops, should I have split the files up? Couldn't find the patch etiquette on the website. Jeremy
On Fri, May 16, 2008 at 01:18:36PM -0400, Jeremy Kolb wrote:
Jeremy Kolb wrote:
This patch adds support for generating .rc files and then linking them with the dlls created by ffmpeg. This information can be used to identify the product version by the user and is also available to installer programs for ease of updating etc.
Oops, should I have split the files up?
If you mean split as in split one logically connected patch into several pieces, by file for example, then the answer is NOOOOOO!!!!
Couldn't find the patch etiquette on the website.
Diego Biurrun wrote:
On Fri, May 16, 2008 at 01:18:36PM -0400, Jeremy Kolb wrote:
Jeremy Kolb wrote:
This patch adds support for generating .rc files and then linking them with the dlls created by ffmpeg. This information can be used to identify the product version by the user and is also available to installer programs for ease of updating etc.
Oops, should I have split the files up?
If you mean split as in split one logically connected patch into several pieces, by file for example, then the answer is NOOOOOO!!!!
Couldn't find the patch etiquette on the website.
http://ffmpeg.mplayerhq.hu/general.html#SEC25
Diego _______________________________________________
OK. Then how does the above patch look?
Jeremy Kolb wrote:
This patch adds support for generating .rc files and then linking them with the dlls created by ffmpeg. This information can be used to identify the product version by the user and is also available to installer programs for ease of updating etc.
Diego, Mans, ping? [...]
+dllinfo_generate() { + name=$1 + description=$2 + version=$3 + major=${version%%.*} + version_commas=`echo $version | tr . ,`,0 + dllname=`echo $name | sed s/lib//` + + cat <<EOF >$TMPRC +#include <WinVer.h> +#include "version.h" +VS_VERSION_INFO VERSIONINFO + FILEVERSION $version_commas + PRODUCTVERSION $version_commas + FILEFLAGSMASK 0x17L + FILEFLAGS 0x0L + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "FFmpeg is distributed under the terms " + "of the GNU $license.\r\n"
"FFmpeg is distributed under the terms of the GNU unredistributable." That doesn't look right =)
+ "Source code is available at " + "http://ffmpeg.mplayerhq.hu"
I was hoping Diego would comment on this, but I think http://ffmpeg.org or something similar is preferred.
+ VALUE "CompanyName", "FFmpeg" + VALUE "FileDescription", "$description" + VALUE "FileVersion", "$version" + VALUE "InternalName", "$name" + VALUE "LegalCopyright", "(C) 2000-2006 Fabrice Bellard, et al."
2006?
+ VALUE "LegalTrademarks", "FFmpeg" + VALUE "OriginalFilename", "$dllname-$major.dll"
Could you check if there's no way to get the correct lib name instead of trying to recreate the name? If this is ever used for cygwin, it has the cyg prefix in it...
On Wed, May 21, 2008 at 06:24:02PM +0100, Ramiro Polla wrote:
+ VALUE "Comments", "FFmpeg is distributed under the terms " + "of the GNU $license.\r\n"
"FFmpeg is distributed under the terms of the GNU unredistributable."
That doesn't look right =)
Please, make them release the "GNU unredistributable" license, I'm sure that would be a whole lot of fun to read ;-) Also I think it would be better to say "This FFmpeg build" and in that special case "may not be distributed publicly" or so. Greetings, Reimar D?ffinger
Ramiro Polla wrote:
Jeremy Kolb wrote:
This patch adds support for generating .rc files and then linking them with the dlls created by ffmpeg. This information can be used to identify the product version by the user and is also available to installer programs for ease of updating etc.
Diego, Mans, ping?
[...]
+dllinfo_generate() { + name=$1 + description=$2 + version=$3 + major=${version%%.*} + version_commas=`echo $version | tr . ,`,0 + dllname=`echo $name | sed s/lib//` + + cat <<EOF >$TMPRC +#include <WinVer.h> +#include "version.h" +VS_VERSION_INFO VERSIONINFO + FILEVERSION $version_commas + PRODUCTVERSION $version_commas + FILEFLAGSMASK 0x17L + FILEFLAGS 0x0L + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "FFmpeg is distributed under the terms " + "of the GNU $license.\r\n"
"FFmpeg is distributed under the terms of the GNU unredistributable."
That doesn't look right =)
Oops. Try this next one instead.
+ "Source code is available at " + "http://ffmpeg.mplayerhq.hu"
I was hoping Diego would comment on this, but I think http://ffmpeg.org or something similar is preferred.
+ VALUE "CompanyName", "FFmpeg" + VALUE "FileDescription", "$description" + VALUE "FileVersion", "$version" + VALUE "InternalName", "$name" + VALUE "LegalCopyright", "(C) 2000-2006 Fabrice Bellard, et al."
2006?
Fixed.
+ VALUE "LegalTrademarks", "FFmpeg" + VALUE "OriginalFilename", "$dllname-$major.dll"
Could you check if there's no way to get the correct lib name instead of trying to recreate the name? If this is ever used for cygwin, it has the cyg prefix in it...
I'm not sure how to accomplish that. If anyone has any ideas... Here's the new version. Jeremy
This patch adds support for generating .rc files and then linking them with the dlls created by ffmpeg. This information can be used to identify the product version by the user and is also available to installer programs for ease of updating etc.
Diego, Mans, ping?
[...]
+# build dll configuration for windows. + +dllinfo_generate() { + name=$1 + description=$2 + version=$3 + major=${version%%.*} + version_commas=`echo $version | tr . ,`,0 + dllname=`echo $name | sed s/lib//` + + case "$license" in + 'GPL' | 'LGPL') + license_str="This FFmpeg build is distributed under the terms of the GNU $license.\r\n" + ;; + 'unredistributable') + license_str="This FFmpeg build may not be distributed publicly.\r\n" + ;; + esac
I'm pretty sure this can be simplified. Something like: license_str="This FFmpeg build is distributed under the terms of the GNU $license.\r\n" test "$license" = "unredistributable" && license_str="This FFmpeg build may not be distributed publicly.\r\n"
+ + cat <<EOF >$TMPRC +#include <WinVer.h> +#include "version.h" +VS_VERSION_INFO VERSIONINFO + FILEVERSION $version_commas + PRODUCTVERSION $version_commas + FILEFLAGSMASK 0x17L + FILEFLAGS 0x0L + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "$license_str" + "Source code is available at http://ffmpeg.org" + VALUE "CompanyName", "FFmpeg" + VALUE "FileDescription", "$description" + VALUE "FileVersion", "$version" + VALUE "InternalName", "$name" + VALUE "LegalCopyright", "(C) 2000-2008 Fabrice Bellard, et al." + VALUE "LegalTrademarks", "FFmpeg" + VALUE "OriginalFilename", "$dllname-$major.dll"
Get the version information from av*.h [...]
Index: subdir.mak =================================================================== --- subdir.mak (revision 13216) +++ subdir.mak (working copy) @@ -27,7 +27,9 @@ $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR) cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
-$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) +$(SUBDIR)$(SLIB_EXTRA_OBJS): $(SLIB_EXTRA_DEP) ^ + +$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)$(SLIB_EXTRA_OBJS) $(SLIB_CREATE_DEF_CMD) $(CC) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$^ $(FFEXTRALIBS) $(EXTRAOBJS) $(SLIB_EXTRA_CMD) Index: common.mak =================================================================== --- common.mak (revision 13216) +++ common.mak (working copy) @@ -32,6 +32,9 @@ %.d: %.cpp $(DEPEND_CMD) > $@
+%.rco: %.rc + windres -I$(BUILD_ROOT) $< $@ + %$(EXESUF): %.c
install: install-libs install-headers @@ -66,9 +69,9 @@ DEPS := $(OBJS:.o=.d) depend dep: $(DEPS)
-CLEANSUFFIXES = *.o *~ *.ho +CLEANSUFFIXES = *.o *~ *.ho *.rco LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp *.map -DISTCLEANSUFFIXES = *.d +DISTCLEANSUFFIXES = *.d *.rc ^
There are a few trailing whitespaces in your patch. It's an item on the patch submission checklist Diego pointed out. 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. Ramiro Polla
Ramiro Polla wrote:
This patch adds support for generating .rc files and then linking them with the dlls created by ffmpeg. This information can be used to identify the product version by the user and is also available to installer programs for ease of updating etc.
Diego, Mans, ping?
[...]
+# build dll configuration for windows. + +dllinfo_generate() { + name=$1 + description=$2 + version=$3 + major=${version%%.*} + version_commas=`echo $version | tr . ,`,0 + dllname=`echo $name | sed s/lib//` + + case "$license" in + 'GPL' | 'LGPL') + license_str="This FFmpeg build is distributed under the terms of the GNU $license.\r\n" + ;; + 'unredistributable') + license_str="This FFmpeg build may not be distributed publicly.\r\n" + ;; + esac
I'm pretty sure this can be simplified. Something like:
license_str="This FFmpeg build is distributed under the terms of the GNU $license.\r\n" test "$license" = "unredistributable" && license_str="This FFmpeg build may not be distributed publicly.\r\n"
Ah that is cleaner. My bash skills leave something to be desired.
+ + cat <<EOF >$TMPRC +#include <WinVer.h> +#include "version.h" +VS_VERSION_INFO VERSIONINFO + FILEVERSION $version_commas + PRODUCTVERSION $version_commas + FILEFLAGSMASK 0x17L + FILEFLAGS 0x0L + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "$license_str" + "Source code is available at http://ffmpeg.org" + VALUE "CompanyName", "FFmpeg" + VALUE "FileDescription", "$description" + VALUE "FileVersion", "$version" + VALUE "InternalName", "$name" + VALUE "LegalCopyright", "(C) 2000-2008 Fabrice Bellard, et al." + VALUE "LegalTrademarks", "FFmpeg" + VALUE "OriginalFilename", "$dllname-$major.dll"
Get the version information from av*.h
that would be for $version, $major and $version_commas correct?
[...]
Index: subdir.mak =================================================================== --- subdir.mak (revision 13216) +++ subdir.mak (working copy) @@ -27,7 +27,9 @@ $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR) cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
-$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) +$(SUBDIR)$(SLIB_EXTRA_OBJS): $(SLIB_EXTRA_DEP)
^
+ +$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)$(SLIB_EXTRA_OBJS) $(SLIB_CREATE_DEF_CMD) $(CC) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$^ $(FFEXTRALIBS) $(EXTRAOBJS) $(SLIB_EXTRA_CMD) Index: common.mak =================================================================== --- common.mak (revision 13216) +++ common.mak (working copy) @@ -32,6 +32,9 @@ %.d: %.cpp $(DEPEND_CMD) > $@
+%.rco: %.rc + windres -I$(BUILD_ROOT) $< $@ + %$(EXESUF): %.c
install: install-libs install-headers @@ -66,9 +69,9 @@ DEPS := $(OBJS:.o=.d) depend dep: $(DEPS)
-CLEANSUFFIXES = *.o *~ *.ho +CLEANSUFFIXES = *.o *~ *.ho *.rco LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp *.map -DISTCLEANSUFFIXES = *.d +DISTCLEANSUFFIXES = *.d *.rc
^
There are a few trailing whitespaces in your patch. It's an item on the patch submission checklist Diego pointed out.
Thought I had got all of those. Good catch.
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.
Ramiro Polla
Can you elaborate? Jeremy
Jeremy Kolb wrote:
Ramiro Polla wrote:
This patch adds support for generating .rc files and then linking them with the dlls created by ffmpeg. This information can be used to identify the product version by the user and is also available to installer programs for ease of updating etc.
Diego, Mans, ping?
[...]
+# build dll configuration for windows. + +dllinfo_generate() { + name=$1 + description=$2 + version=$3 + major=${version%%.*} + version_commas=`echo $version | tr . ,`,0 + dllname=`echo $name | sed s/lib//` + + case "$license" in + 'GPL' | 'LGPL') + license_str="This FFmpeg build is distributed under the terms of the GNU $license.\r\n" + ;; + 'unredistributable') + license_str="This FFmpeg build may not be distributed publicly.\r\n" + ;; + esac
I'm pretty sure this can be simplified. Something like:
license_str="This FFmpeg build is distributed under the terms of the GNU $license.\r\n" test "$license" = "unredistributable" && license_str="This FFmpeg build may not be distributed publicly.\r\n"
Ah that is cleaner. My bash skills leave something to be desired.
+ + cat <<EOF >$TMPRC +#include <WinVer.h> +#include "version.h" +VS_VERSION_INFO VERSIONINFO + FILEVERSION $version_commas + PRODUCTVERSION $version_commas + FILEFLAGSMASK 0x17L + FILEFLAGS 0x0L + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "$license_str" + "Source code is available at http://ffmpeg.org" + VALUE "CompanyName", "FFmpeg" + VALUE "FileDescription", "$description" + VALUE "FileVersion", "$version" + VALUE "InternalName", "$name" + VALUE "LegalCopyright", "(C) 2000-2008 Fabrice Bellard, et al." + VALUE "LegalTrademarks", "FFmpeg" + VALUE "OriginalFilename", "$dllname-$major.dll"
Get the version information from av*.h
that would be for $version, $major and $version_commas correct?
Actually the versions come from those files, see get_version.
[...]
Index: subdir.mak =================================================================== --- subdir.mak (revision 13216) +++ subdir.mak (working copy) @@ -27,7 +27,9 @@ $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR) cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
-$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) +$(SUBDIR)$(SLIB_EXTRA_OBJS): $(SLIB_EXTRA_DEP)
^
+ +$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)$(SLIB_EXTRA_OBJS) $(SLIB_CREATE_DEF_CMD) $(CC) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$^ $(FFEXTRALIBS) $(EXTRAOBJS) $(SLIB_EXTRA_CMD) Index: common.mak =================================================================== --- common.mak (revision 13216) +++ common.mak (working copy) @@ -32,6 +32,9 @@ %.d: %.cpp $(DEPEND_CMD) > $@
+%.rco: %.rc + windres -I$(BUILD_ROOT) $< $@ + %$(EXESUF): %.c
install: install-libs install-headers @@ -66,9 +69,9 @@ DEPS := $(OBJS:.o=.d) depend dep: $(DEPS)
-CLEANSUFFIXES = *.o *~ *.ho +CLEANSUFFIXES = *.o *~ *.ho *.rco LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp *.map -DISTCLEANSUFFIXES = *.d +DISTCLEANSUFFIXES = *.d *.rc
^
There are a few trailing whitespaces in your patch. It's an item on the patch submission checklist Diego pointed out.
Thought I had got all of those. Good catch.
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.
Ramiro Polla
Can you elaborate?
Jeremy
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
Hello,
+ + cat <<EOF >$TMPRC +#include <WinVer.h> +#include "version.h" +VS_VERSION_INFO VERSIONINFO + FILEVERSION $version_commas + PRODUCTVERSION $version_commas + FILEFLAGSMASK 0x17L + FILEFLAGS 0x0L + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "$license_str" + "Source code is available at http://ffmpeg.org" + VALUE "CompanyName", "FFmpeg" + VALUE "FileDescription", "$description" + VALUE "FileVersion", "$version" + VALUE "InternalName", "$name" + VALUE "LegalCopyright", "(C) 2000-2008 Fabrice Bellard, et al." + VALUE "LegalTrademarks", "FFmpeg" + VALUE "OriginalFilename", "$dllname-$major.dll"
Get the version information from av*.h
that would be for $version, $major and $version_commas correct?
Actually the versions come from those files, see get_version.
At configure time rather than compile time. If the version is updated but configure is not run again, the old version information will persist. *** Oh, it seems the build system is not ready at all for this kind of change. It hardcodes the filenames to the version found at configure time. So I guess this is not a problem for now.
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. Ramiro Polla
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 =) Ramiro Polla
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 =)
Ramiro Polla _______________________________________________
I REALLY like having the svn revision number in there. It makes it much easier to track. Jeremy
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. Ramiro Polla
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.
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.
On Sun, 25 May 2008, Ramiro Polla wrote:- <snip>
Applied.
There's a problem with this patch. It's broken the building shared libraries on Linux. Revision 13379 built okay, but after the forgotten subdir.mak was committed in revision 13380, it fails when trying to create the shared library libavutil.so.49 because an entry is passed that points to the libavutil directory rather than a file within the directory: davjam at donnas:/usr/src/packages/SOURCES> rpmbuild -ta ffmpeg-0.4.9.13380.tar.bz2 --clean --target $(uname -m) Building target platforms: x86_64 Building for target x86_64 ... + archflags= + archflags=' -fPIC' + CFLAGS='-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fPIC' + CFLAGS='-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/gsm' + export archflags + export CFLAGS + ./configure --shlibdir=/usr/lib64 --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --cpu=athlon64 --enable-pthreads -- enable-shared --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libfaad --enable-libfaac --enable-libxvid --enable-liba52 -- enable-swscale --enable-postproc --enable-gpl --enable-vhook --enable-x11grab --enable-libgsm --enable-libx264 install prefix /usr source path /usr/src/packages/BUILD/ffmpeg C compiler gcc .align is power-of-two no ARCH x86_64 (athlon64) big-endian no MMX enabled yes CMOV enabled yes CMOV is fast yes EBX available yes EBP available yes gprof enabled no debug symbols yes strip symbols yes optimizations yes static yes shared yes postprocessing support yes software scaler enabled yes new filter support no filters using lavformat no video hooking yes Imlib2 support yes FreeType support yes network support yes IPv6 support yes threading support pthreads SDL support yes Sun medialib support no AVISynth enabled no liba52 support yes liba52 dlopened no libamr-nb support no libamr-wb support no libdc1394 support no libdirac enabled no libfaac enabled yes libfaad enabled yes libfaad dlopened no libgsm enabled yes libmp3lame enabled yes libnut enabled no libschroedinger enabled no libtheora enabled yes libvorbis enabled yes x264 enabled yes XviD enabled yes zlib enabled yes bzlib enabled yes ... gcc -shared -Wl,-soname,libavutil.so.49 -rdynamic -export-dynamic -Wl,--warn-common -Wl,--as-needed -Wl,-rpath-link,"/usr/src/packages/BUILD/ff mpeg"/libavcodec -Wl,-rpath-link,"/usr/src/packages/BUILD/ffmpeg"/libavformat -Wl,-rpath-link,"/usr/src/packages/BUILD/ffmpeg"/libavutil - Wl,-Bsymbolic -o libavutil/libavutil.so.49 libavutil/adler32.o libavutil/aes.o libavutil/base64.o libavutil/crc.o libavutil/des.o libavutil/fifo.o libavutil/intfloat_readwrite.o libavutil/lls.o libavutil/log.o libavutil/lzo.o libavutil/mathematics.o libavutil/md5.o libavutil/mem.o libavutil/random.o libavutil/rational.o libavutil/rc4.o libavutil/sha1.o libavutil/string.o libavutil/tree.o libavutil/ -lz - lbz2 -pthread -lm -la52 -lfaac -lfaad -lgsm -lmp3lame -lm -ltheora -logg -lvorbisenc -lvorbis -logg -lx264 -lm -lxvidcore -ldl -ldl -lX11 - lXext libavutil/: file not recognized: Is a directory collect2: ld returned 1 exit status make: *** [libavutil/libavutil.so.49] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.87707 (%build) Regards, David Bolt -- Team Acorn: http://www.distributed.net/ OGR-P2 @ ~100Mnodes RC5-72 @ ~15Mkeys SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit | openSUSE 11.0b3 SUSE 10.1 64bit | openSUSE 10.2 64bit | openSUSE 10.3 64bit RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC | RISC OS 3.11
On 05/25/08 07:47 pm, David Bolt wrote:
On Sun, 25 May 2008, Ramiro Polla wrote:-
<snip>
Applied.
There's a problem with this patch. It's broken the building shared libraries on Linux. Revision 13379 built okay, but after the forgotten subdir.mak was committed in revision 13380, it fails when trying to create the shared library libavutil.so.49 because an entry is passed that points to the libavutil directory rather than a file within the directory: [...] libavutil/: file not recognized: Is a directory collect2: ld returned 1 exit status make: *** [libavutil/libavutil.so.49] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.87707 (%build)
Same with OS/2, emxomf: Input file `I:\usr\src\ffmpeg\libavutil' is not seekable emxomfld: a.out to omf conversion failed for 'I:\usr\src\ffmpeg\libavutil'. make: *** [libavutil/avutil49.dll] Error 1 Note also that the DLLs are not built in libavformat, libavcodec, and libavdevice either though make does not issue any errors. Dave
Dave Yeo wrote:
On 05/25/08 07:47 pm, David Bolt wrote:
On Sun, 25 May 2008, Ramiro Polla wrote:-
<snip>
Applied.
There's a problem with this patch. It's broken the building shared libraries on Linux. Revision 13379 built okay, but after the forgotten subdir.mak was committed in revision 13380, it fails when trying to create the shared library libavutil.so.49 because an entry is passed that points to the libavutil directory rather than a file within the directory:
[...]
libavutil/: file not recognized: Is a directory collect2: ld returned 1 exit status make: *** [libavutil/libavutil.so.49] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.87707 (%build)
Same with OS/2, emxomf: Input file `I:\usr\src\ffmpeg\libavutil' is not seekable emxomfld: a.out to omf conversion failed for 'I:\usr\src\ffmpeg\libavutil'. make: *** [libavutil/avutil49.dll] Error 1
Note also that the DLLs are not built in libavformat, libavcodec, and libavdevice either though make does not issue any errors. Dave
Sorry about that. I think the problem lies in the subdir.mak change. I'm not sure how to fix this (my make-fu isn't that great). Does anyone have suggestions? Jeremy
David Bolt <7c6ebd986448736acd2250be77d2cc38 at davjam.org> writes:
On Sun, 25 May 2008, Ramiro Polla wrote:-
<snip>
Applied.
There's a problem with this patch. It's broken the building shared libraries on Linux. Revision 13379 built okay, but after the forgotten subdir.mak was committed in revision 13380, it fails when trying to create the shared library libavutil.so.49 because an entry is passed that points to the libavutil directory rather than a file within the directory:
I never approved this change. I have reverted it until it can get fixed properly. Both I and Ramiro will be at Linuxtag this week, so it's doubtful whether we'll be able to fix it just yet. -- M?ns Rullg?rd mans at mansr.com
M?ns Rullg?rd wrote:
I never approved this change.
Of course not. You ignored it, like you always do if the patch isn't something trivial or if you can't spark a flame out of it. You even ignored the message when I said I would apply it. Now don't you come with this "I never approved it" thing to try and clean your hands... You're just as responsible for ignoring it. Please stop ignoring such patches. We know you have some personal grudge against many patches, but you could help us out instead of making us ping them many times and have Diego post an IRC log with some words that you could have sent yourself. Ramiro Polla
Ramiro Polla <ramiro at lisha.ufsc.br> writes:
M?ns Rullg?rd wrote:
I never approved this change.
Of course not. You ignored it, like you always do if the patch isn't something trivial or if you can't spark a flame out of it. You even ignored the message when I said I would apply it. Now don't you come with this "I never approved it" thing to try and clean your hands... You're just as responsible for ignoring it.
Now who's sparking flames? As for "ignoring" the patch, please allow more than a few hours before committing major changes (and this was a major change) to areas you do not maintain. I don't receive email by a direct satellite link into my brain. -- M?ns Rullg?rd mans at mansr.com
M?ns Rullg?rd wrote:
Ramiro Polla <ramiro at lisha.ufsc.br> writes:
M?ns Rullg?rd wrote:
I never approved this change. Of course not. You ignored it, like you always do if the patch isn't something trivial or if you can't spark a flame out of it. You even ignored the message when I said I would apply it. Now don't you come with this "I never approved it" thing to try and clean your hands... You're just as responsible for ignoring it. Now who's sparking flames? As for "ignoring" the patch, please allow more than a few hours before committing major changes (and this was a major change) to areas you do not maintain. I don't receive email by a direct satellite link into my brain.
---------------------------------------- [FFmpeg-devel] [PATCH] Add versioning information to dlls Ramiro Polla ramiro at lisha.ufsc.br Thu May 22 20:56:09 CEST 2008 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. ---------- [FFmpeg-devel] [PATCH] Add versioning information to dlls Jeremy Kolb jkolb at wsi.com Thu May 22 21:27:19 CEST 2008 This should take care of the trailing whitespaces. ---------- [FFmpeg-devel] [PATCH] Fix decoding of ffv1 when compiling with icc M?ns Rullg?rd mans at mansr.com Fri May 23 23:01:25 CEST 2008 ---------- [FFmpeg-devel] [PATCH] Some IWMMXT functions for libavcodec #2 M?ns Rullg?rd mans at mansr.com Sat May 24 18:53:47 CEST 2008 ---------- [FFmpeg-devel] [PATCH] Add versioning information to dlls Ramiro Polla ramiro at lisha.ufsc.br Sun May 25 15:14:16 CEST 2008 Applied. ---------------------------------------- Sorry, but I consider this ignoring... And from the development policy: # Do NOT commit to code actively maintained by others without permission. Send a patch to ffmpeg-devel instead. If no one answers within a reasonable timeframe (12h for build failures and security fixes, 3 days small changes, 1 week for big patches) then commit your patch if you think it is OK. Also note, the maintainer can simply ask for more time to review! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Ramiro Polla
Ramiro Polla wrote:
M?ns Rullg?rd wrote:
Ramiro Polla <ramiro at lisha.ufsc.br> writes:
M?ns Rullg?rd wrote:
I never approved this change. Of course not. You ignored it, like you always do if the patch isn't something trivial or if you can't spark a flame out of it. You even ignored the message when I said I would apply it. Now don't you come with this "I never approved it" thing to try and clean your hands... You're just as responsible for ignoring it. Now who's sparking flames? As for "ignoring" the patch, please allow more than a few hours before committing major changes (and this was a major change) to areas you do not maintain. I don't receive email by a direct satellite link into my brain.
---------------------------------------- [FFmpeg-devel] [PATCH] Add versioning information to dlls Ramiro Polla ramiro at lisha.ufsc.br Thu May 22 20:56:09 CEST 2008
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. ---------- [FFmpeg-devel] [PATCH] Add versioning information to dlls Jeremy Kolb jkolb at wsi.com Thu May 22 21:27:19 CEST 2008
This should take care of the trailing whitespaces. ---------- [FFmpeg-devel] [PATCH] Fix decoding of ffv1 when compiling with icc M?ns Rullg?rd mans at mansr.com Fri May 23 23:01:25 CEST 2008 ---------- [FFmpeg-devel] [PATCH] Some IWMMXT functions for libavcodec #2 M?ns Rullg?rd mans at mansr.com Sat May 24 18:53:47 CEST 2008 ---------- [FFmpeg-devel] [PATCH] Add versioning information to dlls Ramiro Polla ramiro at lisha.ufsc.br Sun May 25 15:14:16 CEST 2008
Applied. ----------------------------------------
Sorry, but I consider this ignoring...
And from the development policy: # Do NOT commit to code actively maintained by others without permission. Send a patch to ffmpeg-devel instead. If no one answers within a reasonable timeframe (12h for build failures and security fixes, 3 days small changes, 1 week for big patches) then commit your patch if you think it is OK.
This patch seems big to me. You should have wait at least 1 week, and ping several times before commiting, it's not like Mans is inactive. Furthermore I'd like to note, that you broke something, and you should have reverted it if you couldn't figure how to fix it quickly. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA Smartjog USA Inc. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
On Fri, Jun 06, 2008 at 10:13:48PM +0100, Ramiro Polla wrote:
Please stop ignoring such patches. We know you have some personal grudge against many patches, but you could help us out instead of making us ping them many times and have Diego post an IRC log with some words that you could have sent yourself.
Easy, Ramiro. I posted the IRC log entirely out of my own free will ;-) Anyway, there is a clear roadmap to get this merged now. First let's get a patch that generates version.h even from subdirectories, then we can proceed from there. Diego
Diego Biurrun wrote:
On Fri, Jun 06, 2008 at 10:13:48PM +0100, Ramiro Polla wrote:
Please stop ignoring such patches. We know you have some personal grudge against many patches, but you could help us out instead of making us ping them many times and have Diego post an IRC log with some words that you could have sent yourself.
Easy, Ramiro. I posted the IRC log entirely out of my own free will ;-)
Anyway, there is a clear roadmap to get this merged now. First let's get a patch that generates version.h even from subdirectories, then we can proceed from there.
Diego
Just FYI I don't think I'll be able to work on this particular problem, but once someone fixes version.h I can rework the rest. Jeremy
On Mon, Jun 09, 2008 at 09:45:29AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Fri, Jun 06, 2008 at 10:13:48PM +0100, Ramiro Polla wrote:
Please stop ignoring such patches. We know you have some personal grudge against many patches, but you could help us out instead of making us ping them many times and have Diego post an IRC log with some words that you could have sent yourself.
Easy, Ramiro. I posted the IRC log entirely out of my own free will ;-)
Anyway, there is a clear roadmap to get this merged now. First let's get a patch that generates version.h even from subdirectories, then we can proceed from there.
Just FYI I don't think I'll be able to work on this particular problem, but once someone fixes version.h I can rework the rest.
Here is a patch for version.h creation from subdirectories. Mans, any comments apart from the fact that it can be split into multiple small parts upon commit? Diego
On Tue, Jun 10, 2008 at 07:40:46AM +0200, Diego Biurrun wrote:
Here is a patch for version.h creation from subdirectories.
Mans, any comments apart from the fact that it can be split into multiple small parts upon commit?
No comments? Then this will hit the tree before the weekend... Diego
Diego Biurrun <diego at biurrun.de> writes:
On Tue, Jun 10, 2008 at 07:40:46AM +0200, Diego Biurrun wrote:
Here is a patch for version.h creation from subdirectories.
Mans, any comments apart from the fact that it can be split into multiple small parts upon commit?
No comments? Then this will hit the tree before the weekend...
I'd rather it didn't. There are better ways of doing this. I just don't have the details quite worked out yet. -- M?ns Rullg?rd mans at mansr.com
On Thu, Jun 12, 2008 at 12:02:18AM +0100, M?ns Rullg?rd wrote:
Diego Biurrun <diego at biurrun.de> writes:
On Tue, Jun 10, 2008 at 07:40:46AM +0200, Diego Biurrun wrote:
Here is a patch for version.h creation from subdirectories.
Mans, any comments apart from the fact that it can be split into multiple small parts upon commit?
No comments? Then this will hit the tree before the weekend...
I'd rather it didn't. There are better ways of doing this. I just don't have the details quite worked out yet.
Can we find a compromise until you have the details hashed out then? I commit my working version and you replace it with whatever wizardry you might come up with as soon as you have it ready. This way, the original patch can be integrated already. Also, I'd like to see my (working) solutions in the tree sometimes before you have one of your "ummm, i have a better idea.." epiphanys ;) Diego
Diego Biurrun wrote:
On Thu, Jun 12, 2008 at 12:02:18AM +0100, M?ns Rullg?rd wrote:
Diego Biurrun <diego at biurrun.de> writes:
On Tue, Jun 10, 2008 at 07:40:46AM +0200, Diego Biurrun wrote:
Here is a patch for version.h creation from subdirectories.
Mans, any comments apart from the fact that it can be split into multiple small parts upon commit?
No comments? Then this will hit the tree before the weekend...
I'd rather it didn't. There are better ways of doing this. I just don't have the details quite worked out yet.
Can we find a compromise until you have the details hashed out then? I commit my working version and you replace it with whatever wizardry you might come up with as soon as you have it ready. This way, the original patch can be integrated already.
Unless I am mistaken, this was needed purely for the dll version information. As this is entirely a cosmetic change, providing a tiny improvement to a minority of users, I can hardly justify any temporary hacks to speed this up. Besides, I don't like the rest of the patch either. -- M?ns Rullg?rd mans at mansr.com
M?ns Rullg?rd wrote:
Diego Biurrun wrote:
On Thu, Jun 12, 2008 at 12:02:18AM +0100, M?ns Rullg?rd wrote:
Diego Biurrun <diego at biurrun.de> writes:
On Tue, Jun 10, 2008 at 07:40:46AM +0200, Diego Biurrun wrote:
Here is a patch for version.h creation from subdirectories.
Mans, any comments apart from the fact that it can be split into multiple small parts upon commit?
No comments? Then this will hit the tree before the weekend...
I'd rather it didn't. There are better ways of doing this. I just don't have the details quite worked out yet.
Can we find a compromise until you have the details hashed out then? I commit my working version and you replace it with whatever wizardry you might come up with as soon as you have it ready. This way, the original patch can be integrated already.
Unless I am mistaken, this was needed purely for the dll version information. As this is entirely a cosmetic change, providing a tiny improvement to a minority of users, I can hardly justify any temporary hacks to speed this up. Besides, I don't like the rest of the patch either.
The version.sh change could probably be used by pkgconfig as well. Anyway, how do we proceed with this? Jeremy
Jeremy Kolb wrote:
M?ns Rullg?rd wrote:
Diego Biurrun wrote:
On Thu, Jun 12, 2008 at 12:02:18AM +0100, M?ns Rullg?rd wrote:
Diego Biurrun <diego at biurrun.de> writes:
On Tue, Jun 10, 2008 at 07:40:46AM +0200, Diego Biurrun wrote:
Here is a patch for version.h creation from subdirectories.
Mans, any comments apart from the fact that it can be split into multiple small parts upon commit?
No comments? Then this will hit the tree before the weekend...
I'd rather it didn't. There are better ways of doing this. I just don't have the details quite worked out yet.
Can we find a compromise until you have the details hashed out then? I commit my working version and you replace it with whatever wizardry you might come up with as soon as you have it ready. This way, the original patch can be integrated already.
Unless I am mistaken, this was needed purely for the dll version information. As this is entirely a cosmetic change, providing a tiny improvement to a minority of users, I can hardly justify any temporary hacks to speed this up. Besides, I don't like the rest of the patch either.
The version.sh change could probably be used by pkgconfig as well. Anyway, how do we proceed with this?
I'll be spending some time on planes and trains soon, which is a perfect time to work on FFmpeg. Hopefully I'll have something to show after the weekend. -- M?ns Rullg?rd mans at mansr.com
M?ns Rullg?rd <mans at mansr.com> writes:
Jeremy Kolb wrote:
M?ns Rullg?rd wrote:
Diego Biurrun wrote:
On Thu, Jun 12, 2008 at 12:02:18AM +0100, M?ns Rullg?rd wrote:
Diego Biurrun <diego at biurrun.de> writes:
On Tue, Jun 10, 2008 at 07:40:46AM +0200, Diego Biurrun wrote:
> Here is a patch for version.h creation from subdirectories. > > Mans, any comments apart from the fact that it can be split into > multiple small parts upon commit? > No comments? Then this will hit the tree before the weekend...
I'd rather it didn't. There are better ways of doing this. I just don't have the details quite worked out yet.
Can we find a compromise until you have the details hashed out then? I commit my working version and you replace it with whatever wizardry you might come up with as soon as you have it ready. This way, the original patch can be integrated already.
Unless I am mistaken, this was needed purely for the dll version information. As this is entirely a cosmetic change, providing a tiny improvement to a minority of users, I can hardly justify any temporary hacks to speed this up. Besides, I don't like the rest of the patch either.
The version.sh change could probably be used by pkgconfig as well. Anyway, how do we proceed with this?
I'll be spending some time on planes and trains soon, which is a perfect time to work on FFmpeg. Hopefully I'll have something to show after the weekend.
version.h is now correctly created from subdirs, and dependencies are correct even if it's missing. -- M?ns Rullg?rd mans at mansr.com
M?ns Rullg?rd wrote:
version.h is now correctly created from subdirs, and dependencies are correct even if it's missing.
This patch seems to work correctly on my machine both in subdirectories and from the top-level tree. Jeremy
On Mon, Jun 30, 2008 at 11:35:50AM -0400, Jeremy Kolb wrote:
M?ns Rullg?rd wrote:
version.h is now correctly created from subdirs, and dependencies are correct even if it's missing.
This patch seems to work correctly on my machine both in subdirectories and from the top-level tree.
Does it also work if you build out-of-tree?
--- configure (revision 14033) +++ configure (working copy) @@ -970,6 +970,7 @@
# gcc stupidly only outputs the basename of targets with -MM DEPEND_CMD='$(CC) $(CFLAGS) -MM -MG $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/," -e "s,\\([[:space:]]\\)\\(version\\.h\\),\\1\$$(BUILD_ROOT_REL)/\\2," -e "s/\(.*\)\.o/\1.d &/"' +DEPEND_CMDRC='$(CC) $(CFLAGS) -MM -MG -DRC_INVOKED -xc-header $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/,"'
Why are you skipping the rest of the sed commands? What is the output or DEPEND_CMDRC? Diego
Diego Biurrun wrote:
On Mon, Jun 30, 2008 at 11:35:50AM -0400, Jeremy Kolb wrote:
M?ns Rullg?rd wrote:
version.h is now correctly created from subdirs, and dependencies are correct even if it's missing.
This patch seems to work correctly on my machine both in subdirectories and from the top-level tree.
Does it also work if you build out-of-tree?
--- configure (revision 14033) +++ configure (working copy) @@ -970,6 +970,7 @@
# gcc stupidly only outputs the basename of targets with -MM DEPEND_CMD='$(CC) $(CFLAGS) -MM -MG $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/," -e "s,\\([[:space:]]\\)\\(version\\.h\\),\\1\$$(BUILD_ROOT_REL)/\\2," -e "s/\(.*\)\.o/\1.d &/"' +DEPEND_CMDRC='$(CC) $(CFLAGS) -MM -MG -DRC_INVOKED -xc-header $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/,"'
Why are you skipping the rest of the sed commands? What is the output or DEPEND_CMDRC?
Rather than another variable, just add the extra flags in the make rule. -- M?ns Rullg?rd mans at mansr.com
On Tue, Jul 01, 2008 at 11:30:33AM +0100, M?ns Rullg?rd wrote:
Diego Biurrun wrote:
On Mon, Jun 30, 2008 at 11:35:50AM -0400, Jeremy Kolb wrote:
M?ns Rullg?rd wrote:
version.h is now correctly created from subdirs, and dependencies are correct even if it's missing.
This patch seems to work correctly on my machine both in subdirectories and from the top-level tree.
Does it also work if you build out-of-tree?
--- configure (revision 14033) +++ configure (working copy) @@ -970,6 +970,7 @@
# gcc stupidly only outputs the basename of targets with -MM DEPEND_CMD='$(CC) $(CFLAGS) -MM -MG $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/," -e "s,\\([[:space:]]\\)\\(version\\.h\\),\\1\$$(BUILD_ROOT_REL)/\\2," -e "s/\(.*\)\.o/\1.d &/"' +DEPEND_CMDRC='$(CC) $(CFLAGS) -MM -MG -DRC_INVOKED -xc-header $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/,"'
Why are you skipping the rest of the sed commands? What is the output or DEPEND_CMDRC?
Rather than another variable, just add the extra flags in the make rule.
How? Diego - who guesses he is missing something obvious...
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 11:30:33AM +0100, M?ns Rullg?rd wrote:
Diego Biurrun wrote:
On Mon, Jun 30, 2008 at 11:35:50AM -0400, Jeremy Kolb wrote:
M?ns Rullg?rd wrote:
version.h is now correctly created from subdirs, and dependencies are correct even if it's missing.
This patch seems to work correctly on my machine both in subdirectories and from the top-level tree.
Does it also work if you build out-of-tree?
--- configure (revision 14033) +++ configure (working copy) @@ -970,6 +970,7 @@
# gcc stupidly only outputs the basename of targets with -MM DEPEND_CMD='$(CC) $(CFLAGS) -MM -MG $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/," -e "s,\\([[:space:]]\\)\\(version\\.h\\),\\1\$$(BUILD_ROOT_REL)/\\2," -e "s/\(.*\)\.o/\1.d &/"' +DEPEND_CMDRC='$(CC) $(CFLAGS) -MM -MG -DRC_INVOKED -xc-header $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/,"'
Why are you skipping the rest of the sed commands? What is the output or DEPEND_CMDRC?
Rather than another variable, just add the extra flags in the make rule.
How?
%.d: %.rc CFLAGS += -DRC_INVOKED -xc-header $(DEPEND_CMD) > $@ This construct is already used elsewhere in the makefiles. -- M?ns Rullg?rd mans at mansr.com
M?ns Rullg?rd wrote:
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 11:30:33AM +0100, M?ns Rullg?rd wrote:
Diego Biurrun wrote:
On Mon, Jun 30, 2008 at 11:35:50AM -0400, Jeremy Kolb wrote:
M?ns Rullg?rd wrote:
version.h is now correctly created from subdirs, and dependencies are correct even if it's missing.
This patch seems to work correctly on my machine both in subdirectories and from the top-level tree.
Does it also work if you build out-of-tree?
--- configure (revision 14033) +++ configure (working copy) @@ -970,6 +970,7 @@
# gcc stupidly only outputs the basename of targets with -MM DEPEND_CMD='$(CC) $(CFLAGS) -MM -MG $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/," -e "s,\\([[:space:]]\\)\\(version\\.h\\),\\1\$$(BUILD_ROOT_REL)/\\2," -e "s/\(.*\)\.o/\1.d &/"' +DEPEND_CMDRC='$(CC) $(CFLAGS) -MM -MG -DRC_INVOKED -xc-header $< | sed
-e
"/^\#.*/d" -e "1s,^,$(@D)/,"'
Why are you skipping the rest of the sed commands? What is the output or DEPEND_CMDRC?
Rather than another variable, just add the extra flags in the make rule.
How?
%.d: %.rc CFLAGS += -DRC_INVOKED -xc-header $(DEPEND_CMD) > $@
This construct is already used elsewhere in the makefiles.
This seems to work fine, I wasn't aware that it was possible to do that before. How do I build out-of-tree? Jeremy
On Tue, Jul 01, 2008 at 10:05:16AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Mon, Jun 30, 2008 at 11:35:50AM -0400, Jeremy Kolb wrote:
This patch seems to work correctly on my machine both in subdirectories and from the top-level tree.
Does it also work if you build out-of-tree?
This seems to work fine, I wasn't aware that it was possible to do that before. How do I build out-of-tree?
Just run configure from some other place with full path, i.e. mkdir /tmp/ffmpeg cd !$ /path/to/ffmpeg/configure --enable-shared --some-option make Diego
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 10:05:16AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Mon, Jun 30, 2008 at 11:35:50AM -0400, Jeremy Kolb wrote:
> This patch seems to work correctly on my machine both in subdirectories > and from the top-level tree. > > Does it also work if you build out-of-tree?
This seems to work fine, I wasn't aware that it was possible to do that before. How do I build out-of-tree?
Just run configure from some other place with full path, i.e.
mkdir /tmp/ffmpeg cd !$ /path/to/ffmpeg/configure --enable-shared --some-option make
This doesn't work but I don't think it's related to my change: jkolb at HP-JKOLBXP /tmp/ffmpeg $ /c/ffmpeg_latest/configure --cc=gcc-sjlj --enable-memalign-hack --disable-static --enable-shared --enable-w32threads jkolb at HP-JKOLBXP /tmp/ffmpeg $ mingw32-make.exe mingw32-make: *** No rule to make target `libavdevice/alldevices.o', needed by `libavdevice/avdevice-52.dll'. Stop.
On Tue, Jul 01, 2008 at 12:09:22PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 10:05:16AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
> On Mon, Jun 30, 2008 at 11:35:50AM -0400, Jeremy Kolb wrote: > > >> This patch seems to work correctly on my machine both in subdirectories >> and from the top-level tree. >> >> > Does it also work if you build out-of-tree? > > This seems to work fine, I wasn't aware that it was possible to do that before. How do I build out-of-tree?
Just run configure from some other place with full path, i.e.
mkdir /tmp/ffmpeg cd !$ /path/to/ffmpeg/configure --enable-shared --some-option make
This doesn't work but I don't think it's related to my change:
There is a simple way to find out: Revert your changes and compare. Diego
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 12:09:22PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 10:05:16AM -0400, Jeremy Kolb wrote:
> Diego Biurrun wrote: > > > >> On Mon, Jun 30, 2008 at 11:35:50AM -0400, Jeremy Kolb wrote: >> >> >> >>> This patch seems to work correctly on my machine both in subdirectories >>> and from the top-level tree. >>> >>> >>> >> Does it also work if you build out-of-tree? >> >> >> This seems to work fine, I wasn't aware that it was possible to do that before. How do I build out-of-tree?
Just run configure from some other place with full path, i.e.
mkdir /tmp/ffmpeg cd !$ /path/to/ffmpeg/configure --enable-shared --some-option make
This doesn't work but I don't think it's related to my change:
There is a simple way to find out: Revert your changes and compare.
Diego
Done. It's not my patch. Jeremy
On Tue, Jul 01, 2008 at 01:03:44PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 12:09:22PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 10:05:16AM -0400, Jeremy Kolb wrote:
>> Diego Biurrun wrote: >> >>> On Mon, Jun 30, 2008 at 11:35:50AM -0400, Jeremy Kolb wrote: >>> >>>> This patch seems to work correctly on my machine both in subdirectories >>>> and from the top-level tree. >>>> >>> Does it also work if you build out-of-tree? >>> This seems to work fine, I wasn't aware that it was possible to do that before. How do I build out-of-tree?
Just run configure from some other place with full path, i.e.
mkdir /tmp/ffmpeg cd !$ /path/to/ffmpeg/configure --enable-shared --some-option make
This doesn't work but I don't think it's related to my change:
There is a simple way to find out: Revert your changes and compare.
Done. It's not my patch.
Well, then find out why it is broken on MinGW. What version of make are you using? Do you have spaces in your path? Does it work for other people on MinGW? Does your patch work out-of-tree for other people? Diego
On Tue, Jul 01, 2008 at 02:19:54PM +0100, M?ns Rullg?rd wrote:
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 11:30:33AM +0100, M?ns Rullg?rd wrote:
Diego Biurrun wrote:
On Mon, Jun 30, 2008 at 11:35:50AM -0400, Jeremy Kolb wrote:
--- configure (revision 14033) +++ configure (working copy) @@ -970,6 +970,7 @@
# gcc stupidly only outputs the basename of targets with -MM DEPEND_CMD='$(CC) $(CFLAGS) -MM -MG $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/," -e "s,\\([[:space:]]\\)\\(version\\.h\\),\\1\$$(BUILD_ROOT_REL)/\\2," -e "s/\(.*\)\.o/\1.d &/"' +DEPEND_CMDRC='$(CC) $(CFLAGS) -MM -MG -DRC_INVOKED -xc-header $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/,"'
Why are you skipping the rest of the sed commands? What is the output or DEPEND_CMDRC?
Rather than another variable, just add the extra flags in the make rule.
How?
%.d: %.rc CFLAGS += -DRC_INVOKED -xc-header $(DEPEND_CMD) > $@
This construct is already used elsewhere in the makefiles.
And I have used it many times myself :) So this should have been pretty obvious. Diego
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 02:19:54PM +0100, M?ns Rullg?rd wrote:
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 11:30:33AM +0100, M?ns Rullg?rd wrote:
Diego Biurrun wrote:
On Mon, Jun 30, 2008 at 11:35:50AM -0400, Jeremy Kolb wrote:
--- configure (revision 14033) +++ configure (working copy) @@ -970,6 +970,7 @@
# gcc stupidly only outputs the basename of targets with -MM DEPEND_CMD='$(CC) $(CFLAGS) -MM -MG $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/," -e "s,\\([[:space:]]\\)\\(version\\.h\\),\\1\$$(BUILD_ROOT_REL)/\\2," -e "s/\(.*\)\.o/\1.d &/"' +DEPEND_CMDRC='$(CC) $(CFLAGS) -MM -MG -DRC_INVOKED -xc-header $< | sed
-e
"/^\#.*/d" -e "1s,^,$(@D)/,"'
Why are you skipping the rest of the sed commands? What is the output or DEPEND_CMDRC?
Rather than another variable, just add the extra flags in the make rule.
How?
%.d: %.rc CFLAGS += -DRC_INVOKED -xc-header $(DEPEND_CMD) > $@
This construct is already used elsewhere in the makefiles.
And I have used it many times myself :) So this should have been pretty obvious.
Diego
Ok here's the updated patch.
Jeremy Kolb <jkolb at wsi.com> writes:
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 02:19:54PM +0100, M?ns Rullg?rd wrote:
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 11:30:33AM +0100, M?ns Rullg?rd wrote:
Diego Biurrun wrote:
On Mon, Jun 30, 2008 at 11:35:50AM -0400, Jeremy Kolb wrote:
> --- configure (revision 14033) > +++ configure (working copy) > @@ -970,6 +970,7 @@ > > # gcc stupidly only outputs the basename of targets with -MM > DEPEND_CMD='$(CC) $(CFLAGS) -MM -MG $< | sed -e "/^\#.*/d" -e > "1s,^,$(@D)/," -e > "s,\\([[:space:]]\\)\\(version\\.h\\),\\1\$$(BUILD_ROOT_REL)/\\2," -e > "s/\(.*\)\.o/\1.d &/"' > +DEPEND_CMDRC='$(CC) $(CFLAGS) -MM -MG -DRC_INVOKED -xc-header $< | sed -e "/^\#.*/d" -e "1s,^,$(@D)/,"' > Why are you skipping the rest of the sed commands? What is the output or DEPEND_CMDRC?
Rather than another variable, just add the extra flags in the make rule.
How?
%.d: %.rc CFLAGS += -DRC_INVOKED -xc-header $(DEPEND_CMD) > $@
This construct is already used elsewhere in the makefiles.
And I have used it many times myself :) So this should have been pretty obvious.
Diego
Ok here's the updated patch.
Is it OK if we delay this stuff a little? I have some changes in mind for how version information is handled in general. I'd like to have all the version related stuff driven from makefiles rather than configure, to make sure version changes are reflected in the build, even if configure isn't run. This would also make integrating this dll version functionality nicer. I'm currently busy trying to get an FFmpeg demo running on a Beagleboard (TI OMAP3530, ARM Cortex-A8) by the 19th, so I won't have much time to work on the build system before that. -- M?ns Rullg?rd mans at mansr.com
On Tue, Jul 01, 2008 at 07:53:49PM +0100, M?ns Rullg?rd wrote:
Jeremy Kolb <jkolb at wsi.com> writes:
Ok here's the updated patch.
Is it OK if we delay this stuff a little? I have some changes in mind for how version information is handled in general. I'd like to have all the version related stuff driven from makefiles rather than configure, to make sure version changes are reflected in the build, even if configure isn't run. This would also make integrating this dll version functionality nicer.
I'm currently busy trying to get an FFmpeg demo running on a Beagleboard (TI OMAP3530, ARM Cortex-A8) by the 19th, so I won't have much time to work on the build system before that.
Uh, delay another 3 weeks? Can't we get this merged right away and then make the necessary changes later on? How hard can it be? :) Diego
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 07:53:49PM +0100, M?ns Rullg?rd wrote:
Jeremy Kolb <jkolb at wsi.com> writes:
Ok here's the updated patch.
Is it OK if we delay this stuff a little? I have some changes in mind for how version information is handled in general. I'd like to have all the version related stuff driven from makefiles rather than configure, to make sure version changes are reflected in the build, even if configure isn't run. This would also make integrating this dll version functionality nicer.
I'm currently busy trying to get an FFmpeg demo running on a Beagleboard (TI OMAP3530, ARM Cortex-A8) by the 19th, so I won't have much time to work on the build system before that.
Uh, delay another 3 weeks? Can't we get this merged right away and then make the necessary changes later on? How hard can it be? :)
I agree. Once its in it should be easy to modify to fit the changes later on. Jeremy
Jeremy Kolb wrote:
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 07:53:49PM +0100, M?ns Rullg?rd wrote:
Jeremy Kolb <jkolb at wsi.com> writes:
Ok here's the updated patch.
Is it OK if we delay this stuff a little? I have some changes in mind for how version information is handled in general. I'd like to have all the version related stuff driven from makefiles rather than configure, to make sure version changes are reflected in the build, even if configure isn't run. This would also make integrating this dll version functionality nicer.
I'm currently busy trying to get an FFmpeg demo running on a Beagleboard (TI OMAP3530, ARM Cortex-A8) by the 19th, so I won't have much time to work on the build system before that.
Uh, delay another 3 weeks? Can't we get this merged right away and then make the necessary changes later on? How hard can it be? :)
I agree. Once its in it should be easy to modify to fit the changes later on.
Jeremy
Any word on this? Thanks, Jeremy
Jeremy Kolb <jkolb at wsi.com> writes:
Jeremy Kolb wrote:
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 07:53:49PM +0100, M?ns Rullg?rd wrote:
Jeremy Kolb <jkolb at wsi.com> writes:
Ok here's the updated patch.
Is it OK if we delay this stuff a little? I have some changes in mind for how version information is handled in general. I'd like to have all the version related stuff driven from makefiles rather than configure, to make sure version changes are reflected in the build, even if configure isn't run. This would also make integrating this dll version functionality nicer.
I'm currently busy trying to get an FFmpeg demo running on a Beagleboard (TI OMAP3530, ARM Cortex-A8) by the 19th, so I won't have much time to work on the build system before that.
Uh, delay another 3 weeks? Can't we get this merged right away and then make the necessary changes later on? How hard can it be? :)
I agree. Once its in it should be easy to modify to fit the changes later on.
Any word on this?
I'm still rather busy getting the demo in shape for this weekend. I'll look at build system stuff later or if time allows. -- M?ns Rullg?rd mans at mansr.com
M?ns Rullg?rd wrote:
Jeremy Kolb <jkolb at wsi.com> writes:
Jeremy Kolb wrote:
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 07:53:49PM +0100, M?ns Rullg?rd wrote:
Jeremy Kolb <jkolb at wsi.com> writes:
Ok here's the updated patch.
Is it OK if we delay this stuff a little? I have some changes in mind for how version information is handled in general. I'd like to have all the version related stuff driven from makefiles rather than configure, to make sure version changes are reflected in the build, even if configure isn't run. This would also make integrating this dll version functionality nicer.
I'm currently busy trying to get an FFmpeg demo running on a Beagleboard (TI OMAP3530, ARM Cortex-A8) by the 19th, so I won't have much time to work on the build system before that.
Uh, delay another 3 weeks? Can't we get this merged right away and then make the necessary changes later on? How hard can it be? :)
I agree. Once its in it should be easy to modify to fit the changes later on.
Any word on this?
I'm still rather busy getting the demo in shape for this weekend. I'll look at build system stuff later or if time allows.
Great. Good luck with the demo. Jeremy
Jeremy Kolb wrote:
M?ns Rullg?rd wrote:
Jeremy Kolb <jkolb at wsi.com> writes:
Jeremy Kolb wrote:
Diego Biurrun wrote:
On Tue, Jul 01, 2008 at 07:53:49PM +0100, M?ns Rullg?rd wrote:
Jeremy Kolb <jkolb at wsi.com> writes:
> Ok here's the updated patch. > > > > Is it OK if we delay this stuff a little? I have some changes in mind for how version information is handled in general. I'd like to have all the version related stuff driven from makefiles rather than configure, to make sure version changes are reflected in the build, even if configure isn't run. This would also make integrating this dll version functionality nicer.
I'm currently busy trying to get an FFmpeg demo running on a Beagleboard (TI OMAP3530, ARM Cortex-A8) by the 19th, so I won't have much time to work on the build system before that.
Uh, delay another 3 weeks? Can't we get this merged right away and then make the necessary changes later on? How hard can it be? :)
I agree. Once its in it should be easy to modify to fit the changes later on.
Any word on this?
I'm still rather busy getting the demo in shape for this weekend. I'll look at build system stuff later or if time allows.
Great. Good luck with the demo.
Jeremy
Any update on this? Jeremy
On Tue, Sep 02, 2008 at 09:36:37AM -0400, Jeremy Kolb wrote:
Jeremy Kolb wrote:
M?ns Rullg?rd wrote:
I'm still rather busy getting the demo in shape for this weekend. I'll look at build system stuff later or if time allows.
Great. Good luck with the demo.
Any update on this?
So Mans, what do you have up your sleeve now that the ARM stuff is finished? Diego P.S.: Please trim your quotes a bit, thanks.
Diego Biurrun <diego at biurrun.de> writes:
On Tue, Sep 02, 2008 at 09:36:37AM -0400, Jeremy Kolb wrote:
Jeremy Kolb wrote:
M?ns Rullg?rd wrote:
I'm still rather busy getting the demo in shape for this weekend. I'll look at build system stuff later or if time allows.
Great. Good luck with the demo.
Any update on this?
So Mans, what do you have up your sleeve now that the ARM stuff is finished?
Finished? Not by a long shot, but I'm not working towards a deadline. I'd forgotten about this problem; thanks for reminding me. I'll refresh my memory, and see what I can do, but not tonight. -- M?ns Rullg?rd mans at mansr.com
M?ns Rullg?rd wrote:
Diego Biurrun <diego at biurrun.de> writes:
So Mans, what do you have up your sleeve now that the ARM stuff is finished?
Finished? Not by a long shot, but I'm not working towards a deadline. I'd forgotten about this problem; thanks for reminding me. I'll refresh my memory, and see what I can do, but not tonight.
Thanks.
-----Original Message----- From: ffmpeg-devel-bounces at mplayerhq.hu [mailto:ffmpeg-devel-bounces at mplayerhq.hu] On Behalf Of Jeremy Kolb Sent: Wednesday, September 03, 2008 9:44 AM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] Add versioning information to dlls M?ns Rullg?rd wrote:
Diego Biurrun <diego at biurrun.de> writes:
So Mans, what do you have up your sleeve now that the ARM stuff is finished?
Finished? Not by a long shot, but I'm not working towards a deadline. I'd forgotten about this problem; thanks for reminding me. I'll refresh my memory, and see what I can do, but not tonight.
Hi Mans, Consider this a friendly ping regarding the status of this issue :) Jeremy
On Thu, Oct 02, 2008 at 09:37:02AM -0400, Kolb, Jeremy wrote:
Consider this a friendly ping regarding the status of this issue :)
And I'd like to reping as well. Unlike you, I was not completely unhappy with the way this was implemented. I'm sure you can come up with a much better solution as always, but if you do not get to it soonish, I'm tempted to accept this as an interim solution. Diego
Diego Biurrun <diego at biurrun.de> writes:
On Thu, Oct 02, 2008 at 09:37:02AM -0400, Kolb, Jeremy wrote:
Consider this a friendly ping regarding the status of this issue :)
And I'd like to reping as well. Unlike you, I was not completely unhappy with the way this was implemented. I'm sure you can come up with a much better solution as always, but if you do not get to it soonish, I'm tempted to accept this as an interim solution.
Damn windows users and their outlandish requirements. If all of you open roundup issues for the stuff you're waiting for my input on, and assign them to me, it will make it easier for me to keep track of them. -- M?ns Rullg?rd mans at mansr.com
Damn windows users and their outlandish requirements. If all of you open roundup issues for the stuff you're waiting for my input on, and assign them to me, it will make it easier for me to keep track of them.
-- M?ns Rullg?rd mans at mansr.com
Mans, I just put this in as Issue 689. I stuck Diego on the nosy list. I tried to upload my old patch so you could use it as a reference but it failed to upload. Jeremy
-----Original Message----- From: ffmpeg-devel-bounces at mplayerhq.hu [mailto:ffmpeg-devel- bounces at mplayerhq.hu] On Behalf Of Kolb, Jeremy Sent: Monday, October 13, 2008 9:48 AM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] Add versioning information to dlls
Damn windows users and their outlandish requirements. If all of you open roundup issues for the stuff you're waiting for my input on, and assign them to me, it will make it easier for me to keep track of them.
-- M?ns Rullg?rd mans at mansr.com
Mans,
I just put this in as Issue 689. I stuck Diego on the nosy list. I tried to upload my old patch so you could use it as a reference but it failed to upload.
Jeremy
I just tried to upload the patch to roundup again but it failed. Anyway here's your friendly reminder. Jeremy
[...] New patch attached. Changes: - I couldn't get the CFLAGS += thing to work for DEPEND_CMD for .d files out of .rc files, so I just renamed dllinfo.rc to dllinfo.c. This way the current DEPEND_CMD catches it just fine. Then added a special rule for dllinfo.c instead of generic %.rc in common.mak - cross-compilation now works (cross-prefix added to windres and <winver.h> lowercased) - $build_suffix was added to OriginalFileName - Updated year to 2009 Tested under linux, under cross-compilation to windows from linux, and under windows, with these options: --enable-shared --disable-static --enable-shared --enable-static --disable-shared --enable-static For the release effort =) Ramiro Polla
On Mon, Feb 09, 2009 at 06:04:09PM -0200, Ramiro Polla wrote:
[...]
New patch attached.
Changes: - I couldn't get the CFLAGS += thing to work for DEPEND_CMD for .d files out of .rc files, so I just renamed dllinfo.rc to dllinfo.c. This way the current DEPEND_CMD catches it just fine. Then added a special rule for dllinfo.c instead of generic %.rc in common.mak
Elaborate.
For the release effort =)
:)
--- configure (revision 17100) +++ configure (working copy) @@ -2519,3 +2525,65 @@ + +dllinfo_generate() { + name=$1 + description=$2 + version=$3 + major=${version%%.*} + version_commas=`echo $version | tr . ,`,0
Use $() instead of ``. Diego
On Mon, Feb 9, 2009 at 7:42 PM, Diego Biurrun <diego at biurrun.de> wrote:
On Mon, Feb 09, 2009 at 06:04:09PM -0200, Ramiro Polla wrote:
[...]
New patch attached.
Changes: - I couldn't get the CFLAGS += thing to work for DEPEND_CMD for .d files out of .rc files, so I just renamed dllinfo.rc to dllinfo.c. This way the current DEPEND_CMD catches it just fine. Then added a special rule for dllinfo.c instead of generic %.rc in common.mak
Elaborate.
This bit on the old patch: +%.d: %.rc CFLAGS += -DRC_INVOKED -xc-header + $(DEPEND_CMD) > $@ doesn't work as expected. make doesn't seem to like the rule to make .d from .rc, and it just doesn't create the .d file. I see in Makefile there is: ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS) I don't know why it works here, but not on the .d rule...
For the release effort =)
:)
--- configure (revision 17100) +++ configure (working copy) @@ -2519,3 +2525,65 @@ + +dllinfo_generate() { + name=$1 + description=$2 + version=$3 + major=${version%%.*} + version_commas=`echo $version | tr . ,`,0
Use $() instead of ``.
Consider it done. Ramiro Polla
Hi, On Mon, Feb 9, 2009 at 9:05 PM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
On Mon, Feb 9, 2009 at 7:42 PM, Diego Biurrun <diego at biurrun.de> wrote:
On Mon, Feb 09, 2009 at 06:04:09PM -0200, Ramiro Polla wrote:
[...]
New patch attached.
Changes: - I couldn't get the CFLAGS += thing to work for DEPEND_CMD for .d files out of .rc files, so I just renamed dllinfo.rc to dllinfo.c. This way the current DEPEND_CMD catches it just fine. Then added a special rule for dllinfo.c instead of generic %.rc in common.mak
Elaborate.
This bit on the old patch:
+%.d: %.rc CFLAGS += -DRC_INVOKED -xc-header + $(DEPEND_CMD) > $@
doesn't work as expected. make doesn't seem to like the rule to make .d from .rc, and it just doesn't create the .d file.
I see in Makefile there is:
ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
I don't know why it works here, but not on the .d rule...
I changed DEPEND_CMD so that it's only the actual sed command, so that we're free to add CFLAGS in between $(CC) and | sed...
--- configure (revision 17100) +++ configure (working copy) @@ -2519,3 +2525,65 @@ + +dllinfo_generate() { + name=$1 + description=$2 + version=$3 + major=${version%%.*} + version_commas=`echo $version | tr . ,`,0
Use $() instead of ``.
Consider it done.
I took a different approach this time. Now the .rc files are no longer generated by configure, but rather a master dllinfo.rc is included from a dllinfo.rc in each subfolder. I've also added a ffmpegrc.rc that embeds information (and the icon I sent in the prevous e-mail) into ffmpeg_g.exe. Known and open issues: the ffmpeg description in ffmpegrc.rc. The FFmpeg version number. How/where will it be defined? (I mean the "0.5", and "Bike Shed"). Please comment. Ramiro Polla
On Tue, Feb 10, 2009 at 12:20:29AM -0200, Ramiro Polla wrote:
On Mon, Feb 9, 2009 at 9:05 PM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
I took a different approach this time. Now the .rc files are no longer generated by configure, but rather a master dllinfo.rc is included from a dllinfo.rc in each subfolder. I've also added a ffmpegrc.rc that embeds information (and the icon I sent in the prevous e-mail) into ffmpeg_g.exe.
I'm not sure this is better, more like the contrary. What are the advantages of this approach? The size of the patch ballooned from 7k to 16k after all...
Please comment.
--- common.mak (revision 17113) +++ common.mak (working copy) @@ -27,18 +28,24 @@
%.d: %.c - $(DEPEND_CMD) > $@ + $(CC) $(CFLAGS) -MM -MG $< | $(DEPEND_CMD) > $@
If I am not mistaken "-MM -MG" are gcc-specific or at least nonstandard, so we need to keep this setting in configure. Diego
[...]
New patch attached.
Changes: - I couldn't get the CFLAGS += thing to work for DEPEND_CMD for .d files out of .rc files, so I just renamed dllinfo.rc to dllinfo.c. This way the current DEPEND_CMD catches it just fine. Then added a special rule for dllinfo.c instead of generic %.rc in common.mak - cross-compilation now works (cross-prefix added to windres and <winver.h> lowercased) - $build_suffix was added to OriginalFileName - Updated year to 2009
Tested under linux, under cross-compilation to windows from linux, and under windows, with these options: --enable-shared --disable-static --enable-shared --enable-static --disable-shared --enable-static
For the release effort =)
Ramiro Polla
Fantastic! I hope it gets accepted this time. When I originally wrote this I only enabled it under mingw 32/64 but Cygwin would also benefit. Jeremy
Ramiro Polla wrote:
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.
Thanks!
On Thu, May 22, 2008 at 03:27:19PM -0400, Jeremy Kolb wrote:
This should take care of the trailing whitespaces.
Ignoring for a moment that this patch has other more serious problems because of which it was reverted...
--- configure (revision 13216) +++ configure (working copy) @@ -1236,12 +1237,15 @@ SLIB_EXTRA_CMD='-lib /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)' + SLIB_EXTRA_OBJS="dllinfo.rco" + SLIB_EXTRA_DEP='$(SUBDIR)../version.h'
nit: Reverse the order to sort this alphabetically.
@@ -2069,6 +2073,8 @@ echo "SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}" >> config.mak + echo "SLIB_EXTRA_OBJS=${SLIB_EXTRA_OBJS}" >> config.mak + echo "SLIB_EXTRA_DEP=${SLIB_EXTRA_DEP}" >> config.mak
ditto
@@ -2215,3 +2221,69 @@ + +# build dll configuration for windows.
Build DLL configuration for Windows.
+dllinfo_generate() { + name=$1 + description=$2 + version=$3 + major=${version%%.*} + version_commas=`echo $version | tr . ,`,0 + dllname=`echo $name | sed s/lib//`
dllname=${name#lib}
+ + license_str="This FFmpeg build is distributed under the terms of the GNU $license.\r\n" + test "$license" = "unredistributable" && + license_str="This FFmpeg build may not be distributed publicly.\r\n"
This FFmpeg build contains non-free code and is not legally redistributable.
+ cat <<EOF >$TMPRC
Space after the > please.
+#include <WinVer.h> +#include "version.h" +VS_VERSION_INFO VERSIONINFO + FILEVERSION $version_commas + PRODUCTVERSION $version_commas + FILEFLAGSMASK 0x17L + FILEFLAGS 0x0L + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L
Is there a reason for this weird 1-space indentation?
+BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "$license_str" + "Source code is available at http://ffmpeg.org"
Add a trailing / to the URL and a period to the sentence.
+ if ! cmp -s $TMPRC $name/dllinfo.rc; then + mv -f $TMPRC $name/dllinfo.rc + fi + rm -f $TMPRC
Is this necessary? We regenerate config.mak and the pkg-config files unconditionally. config.h is treated this way because unnecessarily recreating it triggers a lot of pointless recompiles.
+if test "$dllinfo" = "yes"; then + dllinfo_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" + dllinfo_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" + dllinfo_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" + dllinfo_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" + dllinfo_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" + dllinfo_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION"
postprocessing Also, you could align all those lines.
--- subdir.mak (revision 13216) +++ subdir.mak (working copy) @@ -27,7 +27,9 @@
+$(SUBDIR)$(SLIB_EXTRA_OBJS): $(SLIB_EXTRA_DEP)
I think you could just generate a proper .d file from the .rco file and be done with it. This would simplify things considerably.
-$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) +$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)$(SLIB_EXTRA_OBJS)
Alternatively, add that extra object to OBJS. This should make things simpler. It also likely fixes the build failures we were seeing on some platforms. Diego
Diego Biurrun wrote:
On Thu, May 22, 2008 at 03:27:19PM -0400, Jeremy Kolb wrote:
This should take care of the trailing whitespaces.
Ignoring for a moment that this patch has other more serious problems because of which it was reverted...
--- configure (revision 13216) +++ configure (working copy) @@ -1236,12 +1237,15 @@ SLIB_EXTRA_CMD='-lib /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)' + SLIB_EXTRA_OBJS="dllinfo.rco" + SLIB_EXTRA_DEP='$(SUBDIR)../version.h'
nit: Reverse the order to sort this alphabetically.
@@ -2069,6 +2073,8 @@ echo "SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}" >> config.mak + echo "SLIB_EXTRA_OBJS=${SLIB_EXTRA_OBJS}" >> config.mak + echo "SLIB_EXTRA_DEP=${SLIB_EXTRA_DEP}" >> config.mak
ditto
@@ -2215,3 +2221,69 @@ + +# build dll configuration for windows.
Build DLL configuration for Windows.
+dllinfo_generate() { + name=$1 + description=$2 + version=$3 + major=${version%%.*} + version_commas=`echo $version | tr . ,`,0 + dllname=`echo $name | sed s/lib//`
dllname=${name#lib}
+ + license_str="This FFmpeg build is distributed under the terms of the GNU $license.\r\n" + test "$license" = "unredistributable" && + license_str="This FFmpeg build may not be distributed publicly.\r\n"
This FFmpeg build contains non-free code and is not legally redistributable.
+ cat <<EOF >$TMPRC
Space after the > please.
+#include <WinVer.h> +#include "version.h" +VS_VERSION_INFO VERSIONINFO + FILEVERSION $version_commas + PRODUCTVERSION $version_commas + FILEFLAGSMASK 0x17L + FILEFLAGS 0x0L + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L
Is there a reason for this weird 1-space indentation?
Seems to be convention but I can remove it.
+BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "$license_str" + "Source code is available at http://ffmpeg.org"
Add a trailing / to the URL and a period to the sentence.
+ if ! cmp -s $TMPRC $name/dllinfo.rc; then + mv -f $TMPRC $name/dllinfo.rc + fi + rm -f $TMPRC
Is this necessary? We regenerate config.mak and the pkg-config files unconditionally. config.h is treated this way because unnecessarily recreating it triggers a lot of pointless recompiles.
I guess not, I can just output to those files directly. I did that because an earlier patch did it.
+if test "$dllinfo" = "yes"; then + dllinfo_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" + dllinfo_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" + dllinfo_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" + dllinfo_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" + dllinfo_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" + dllinfo_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION"
postprocessing
Also, you could align all those lines.
--- subdir.mak (revision 13216) +++ subdir.mak (working copy) @@ -27,7 +27,9 @@
+$(SUBDIR)$(SLIB_EXTRA_OBJS): $(SLIB_EXTRA_DEP)
I think you could just generate a proper .d file from the .rco file and be done with it. This would simplify things considerably.
How do you mean? What are .d files? How do I do that?
-$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) +$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)$(SLIB_EXTRA_OBJS)
Alternatively, add that extra object to OBJS. This should make things simpler. It also likely fixes the build failures we were seeing on some platforms.
Ok, which one should I do? The .d file or add the extra object?
Diego _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
Jeremy
Jeremy Kolb wrote:
Diego Biurrun wrote:
On Thu, May 22, 2008 at 03:27:19PM -0400, Jeremy Kolb wrote:
This should take care of the trailing whitespaces.
Ignoring for a moment that this patch has other more serious problems because of which it was reverted...
--- configure (revision 13216) +++ configure (working copy) @@ -1236,12 +1237,15 @@ SLIB_EXTRA_CMD='-lib /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)' + SLIB_EXTRA_OBJS="dllinfo.rco" + SLIB_EXTRA_DEP='$(SUBDIR)../version.h'
nit: Reverse the order to sort this alphabetically.
@@ -2069,6 +2073,8 @@ echo "SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}" >> config.mak + echo "SLIB_EXTRA_OBJS=${SLIB_EXTRA_OBJS}" >> config.mak + echo "SLIB_EXTRA_DEP=${SLIB_EXTRA_DEP}" >> config.mak
ditto
@@ -2215,3 +2221,69 @@ + +# build dll configuration for windows.
Build DLL configuration for Windows.
+dllinfo_generate() { + name=$1 + description=$2 + version=$3 + major=${version%%.*} + version_commas=`echo $version | tr . ,`,0 + dllname=`echo $name | sed s/lib//`
dllname=${name#lib}
+ + license_str="This FFmpeg build is distributed under the terms of the GNU $license.\r\n" + test "$license" = "unredistributable" && + license_str="This FFmpeg build may not be distributed publicly.\r\n"
This FFmpeg build contains non-free code and is not legally redistributable.
+ cat <<EOF >$TMPRC
Space after the > please.
+#include <WinVer.h> +#include "version.h" +VS_VERSION_INFO VERSIONINFO + FILEVERSION $version_commas + PRODUCTVERSION $version_commas + FILEFLAGSMASK 0x17L + FILEFLAGS 0x0L + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L
Is there a reason for this weird 1-space indentation?
Seems to be convention but I can remove it.
+BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "$license_str" + "Source code is available at http://ffmpeg.org"
Add a trailing / to the URL and a period to the sentence.
+ if ! cmp -s $TMPRC $name/dllinfo.rc; then + mv -f $TMPRC $name/dllinfo.rc + fi + rm -f $TMPRC
Is this necessary? We regenerate config.mak and the pkg-config files unconditionally. config.h is treated this way because unnecessarily recreating it triggers a lot of pointless recompiles.
I guess not, I can just output to those files directly. I did that because an earlier patch did it.
+if test "$dllinfo" = "yes"; then + dllinfo_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" + dllinfo_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" + dllinfo_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" + dllinfo_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" + dllinfo_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" + dllinfo_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION"
postprocessing
Also, you could align all those lines.
--- subdir.mak (revision 13216) +++ subdir.mak (working copy) @@ -27,7 +27,9 @@
+$(SUBDIR)$(SLIB_EXTRA_OBJS): $(SLIB_EXTRA_DEP)
I think you could just generate a proper .d file from the .rco file and be done with it. This would simplify things considerably.
How do you mean? What are .d files? How do I do that?
I'm not even sure how to create a .d file from a compiled rc file.
-$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) +$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)$(SLIB_EXTRA_OBJS)
Alternatively, add that extra object to OBJS. This should make things simpler. It also likely fixes the build failures we were seeing on some platforms.
Ok, which one should I do? The .d file or add the extra object?
Diego _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
Jeremy
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
On Wed, May 28, 2008 at 03:07:38PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
--- configure (revision 13216) +++ configure (working copy) +#include <WinVer.h> +#include "version.h" +VS_VERSION_INFO VERSIONINFO + FILEVERSION $version_commas + PRODUCTVERSION $version_commas + FILEFLAGSMASK 0x17L + FILEFLAGS 0x0L + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L
Is there a reason for this weird 1-space indentation?
Seems to be convention but I can remove it.
Whatever you prefer.
+ if ! cmp -s $TMPRC $name/dllinfo.rc; then + mv -f $TMPRC $name/dllinfo.rc + fi + rm -f $TMPRC
Is this necessary? We regenerate config.mak and the pkg-config files unconditionally. config.h is treated this way because unnecessarily recreating it triggers a lot of pointless recompiles.
I guess not, I can just output to those files directly. I did that because an earlier patch did it.
Then output directly.
--- subdir.mak (revision 13216) +++ subdir.mak (working copy) @@ -27,7 +27,9 @@
+$(SUBDIR)$(SLIB_EXTRA_OBJS): $(SLIB_EXTRA_DEP)
I think you could just generate a proper .d file from the .rco file and be done with it. This would simplify things considerably.
How do you mean? What are .d files? How do I do that?
The .d files record dependency information. Look around in your FFmpeg tree, it should be full of them. Take a look at common.mak to see how they are created.
-$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) +$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)$(SLIB_EXTRA_OBJS)
Alternatively, add that extra object to OBJS. This should make things simpler. It also likely fixes the build failures we were seeing on some platforms.
Ok, which one should I do? The .d file or add the extra object?
Both. The issues are separate. Diego P.S.: I know that you are a Windows guy, but please do learn to quote properly anyway. Trim your quotes and remove all unnecessary garbage, plus things you are not replying to.
Diego Biurrun wrote:
--- subdir.mak (revision 13216) +++ subdir.mak (working copy) @@ -27,7 +27,9 @@
+$(SUBDIR)$(SLIB_EXTRA_OBJS): $(SLIB_EXTRA_DEP)
I think you could just generate a proper .d file from the .rco file and be done with it. This would simplify things considerably.
How do you mean? What are .d files? How do I do that?
The .d files record dependency information. Look around in your FFmpeg tree, it should be full of them. Take a look at common.mak to see how they are created.
They are created via gcc, I don't see how I can create them from .rc files unless I output them by hand during configure.
-$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) +$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)$(SLIB_EXTRA_OBJS)
Alternatively, add that extra object to OBJS. This should make things simpler. It also likely fixes the build failures we were seeing on some platforms.
Ok, which one should I do? The .d file or add the extra object?
Both. The issues are separate.
Ok, thanks for the clarification. Jeremy
On Thu, May 29, 2008 at 09:42:32AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
--- subdir.mak (revision 13216) +++ subdir.mak (working copy) @@ -27,7 +27,9 @@
+$(SUBDIR)$(SLIB_EXTRA_OBJS): $(SLIB_EXTRA_DEP)
I think you could just generate a proper .d file from the .rco file and be done with it. This would simplify things considerably.
How do you mean? What are .d files? How do I do that?
The .d files record dependency information. Look around in your FFmpeg tree, it should be full of them. Take a look at common.mak to see how they are created.
They are created via gcc, I don't see how I can create them from .rc files unless I output them by hand during configure.
Where is the problem exactly? You can create them from the .rc files during the make stage, where all .d files are created... Diego
Diego Biurrun wrote:
On Thu, May 29, 2008 at 09:42:32AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
--- subdir.mak (revision 13216) +++ subdir.mak (working copy) @@ -27,7 +27,9 @@
+$(SUBDIR)$(SLIB_EXTRA_OBJS): $(SLIB_EXTRA_DEP)
I think you could just generate a proper .d file from the .rco file and be done with it. This would simplify things considerably.
How do you mean? What are .d files? How do I do that?
The .d files record dependency information. Look around in your FFmpeg tree, it should be full of them. Take a look at common.mak to see how they are created.
They are created via gcc, I don't see how I can create them from .rc files unless I output them by hand during configure.
Where is the problem exactly? You can create them from the .rc files during the make stage, where all .d files are created...
I don't think so. They are created via gcc -MM -MG and as far as I know you can't run .rc files through gcc. Jeremy
On Thu, May 29, 2008 at 09:49:29AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Thu, May 29, 2008 at 09:42:32AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
> --- subdir.mak (revision 13216) > +++ subdir.mak (working copy) > @@ -27,7 +27,9 @@ > > +$(SUBDIR)$(SLIB_EXTRA_OBJS): $(SLIB_EXTRA_DEP) > I think you could just generate a proper .d file from the .rco file and be done with it. This would simplify things considerably.
How do you mean? What are .d files? How do I do that?
The .d files record dependency information. Look around in your FFmpeg tree, it should be full of them. Take a look at common.mak to see how they are created.
They are created via gcc, I don't see how I can create them from .rc files unless I output them by hand during configure.
Where is the problem exactly? You can create them from the .rc files during the make stage, where all .d files are created...
I don't think so. They are created via gcc -MM -MG and as far as I know you can't run .rc files through gcc.
OK, I'm beginning to see more clearly. What stops you from compiling the .rc file into a standard .o file and adding that to OBJS? We do that in MPlayer, it seems to work fine. Diego
Diego Biurrun wrote:
On Thu, May 29, 2008 at 09:49:29AM -0400, Jeremy Kolb wrote:
What stops you from compiling the .rc file into a standard .o file and adding that to OBJS? We do that in MPlayer, it seems to work fine.
Diego
So you are suggesting editing each Makefile and adding the .o file to objs? That's fine by me. Will that work for each platform though? Jeremy
Jeremy Kolb wrote:
Diego Biurrun wrote:
On Thu, May 29, 2008 at 09:49:29AM -0400, Jeremy Kolb wrote:
What stops you from compiling the .rc file into a standard .o file and adding that to OBJS? We do that in MPlayer, it seems to work fine.
Diego
So you are suggesting editing each Makefile and adding the .o file to objs? That's fine by me. Will that work for each platform though?
Also, I think this means I can get rid of SLIB_EXTRA_OBJS and SLIB_EXTRA_DEP. If I do that then the problem again becomes no rule to make version.h. Can I move the rule to make version.h to subdir.mak? Jeremy
On Thu, May 29, 2008 at 04:31:26PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Thu, May 29, 2008 at 09:49:29AM -0400, Jeremy Kolb wrote:
What stops you from compiling the .rc file into a standard .o file and adding that to OBJS? We do that in MPlayer, it seems to work fine.
So you are suggesting editing each Makefile and adding the .o file to objs?
In MPlayer I have OBJS_MPLAYER-$(PE_EXECUTABLE) += osdep/mplayer-rc.o osdep/mplayer-rc.o: osdep/mplayer.rc version.h $(WINDRES) -I. -o $@ $< Does that explain my idea?
Will that work for each platform though?
I don't see why it should not... Diego
Diego Biurrun wrote:
On Thu, May 29, 2008 at 04:31:26PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Thu, May 29, 2008 at 09:49:29AM -0400, Jeremy Kolb wrote:
What stops you from compiling the .rc file into a standard .o file and adding that to OBJS? We do that in MPlayer, it seems to work fine.
So you are suggesting editing each Makefile and adding the .o file to objs?
In MPlayer I have
OBJS_MPLAYER-$(PE_EXECUTABLE) += osdep/mplayer-rc.o
osdep/mplayer-rc.o: osdep/mplayer.rc version.h $(WINDRES) -I. -o $@ $<
Does that explain my idea?
I wasn't aware that you could do += in a makefile. The version.h thing is still biting me when I run make from a sublevel directory (libavutil for example).
Will that work for each platform though?
I don't see why it should not...
But then I would have to generate the rc file for ever platform right? That has a platform specific #include file in it so it won't work. Jeremy
Jeremy Kolb wrote:
Diego Biurrun wrote:
On Thu, May 29, 2008 at 04:31:26PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Thu, May 29, 2008 at 09:49:29AM -0400, Jeremy Kolb wrote:
What stops you from compiling the .rc file into a standard .o file and adding that to OBJS? We do that in MPlayer, it seems to work fine.
So you are suggesting editing each Makefile and adding the .o file to objs?
In MPlayer I have
OBJS_MPLAYER-$(PE_EXECUTABLE) += osdep/mplayer-rc.o
osdep/mplayer-rc.o: osdep/mplayer.rc version.h $(WINDRES) -I. -o $@ $<
Does that explain my idea?
I wasn't aware that you could do += in a makefile. The version.h thing is still biting me when I run make from a sublevel directory (libavutil for example).
Will that work for each platform though?
I don't see why it should not...
But then I would have to generate the rc file for ever platform right? That has a platform specific #include file in it so it won't work.
Ignore this last part, I had some local changes that messed me up.
On Fri, May 30, 2008 at 10:54:58AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Thu, May 29, 2008 at 04:31:26PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Thu, May 29, 2008 at 09:49:29AM -0400, Jeremy Kolb wrote:
What stops you from compiling the .rc file into a standard .o file and adding that to OBJS? We do that in MPlayer, it seems to work fine.
So you are suggesting editing each Makefile and adding the .o file to objs?
In MPlayer I have
OBJS_MPLAYER-$(PE_EXECUTABLE) += osdep/mplayer-rc.o
osdep/mplayer-rc.o: osdep/mplayer.rc version.h $(WINDRES) -I. -o $@ $<
Does that explain my idea?
I wasn't aware that you could do += in a makefile. The version.h thing is still biting me when I run make from a sublevel directory (libavutil for example).
Let's see an updated patch, this discussion is too theoretical. Diego
Diego Biurrun wrote:
Let's see an updated patch, this discussion is too theoretical.
Here you go. It works for me though I get some warnings about the version.h rule in subdir.mak (which I'm now generating in each of the subdirectories that need it), not sure how to cleanly fix that. Jeremy
On Fri, May 30, 2008 at 11:47:56AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
Let's see an updated patch, this discussion is too theoretical.
Here you go. It works for me though I get some warnings about the version.h rule in subdir.mak (which I'm now generating in each of the subdirectories that need it), not sure how to cleanly fix that.
Why are you doing that? It is clearly wrong. Diego
Diego Biurrun wrote:
On Fri, May 30, 2008 at 11:47:56AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
Let's see an updated patch, this discussion is too theoretical.
Here you go. It works for me though I get some warnings about the version.h rule in subdir.mak (which I'm now generating in each of the subdirectories that need it), not sure how to cleanly fix that.
Why are you doing that? It is clearly wrong.
Diego
Because I don't know the correct fix. The rule for version.h is only in the top level makefile so if anything depends on version.h and you issue a make from a subdirectory you will get errors. Jeremy
On Fri, May 30, 2008 at 01:38:55PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Fri, May 30, 2008 at 11:47:56AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
Let's see an updated patch, this discussion is too theoretical.
Here you go. It works for me though I get some warnings about the version.h rule in subdir.mak (which I'm now generating in each of the subdirectories that need it), not sure how to cleanly fix that.
Why are you doing that? It is clearly wrong.
Because I don't know the correct fix. The rule for version.h is only in the top level makefile so if anything depends on version.h and you issue a make from a subdirectory you will get errors.
OK, I'm beginning to understand the problem. Next time, please post any errors you get, this makes things clearer. Try moving the two rules for version.h to common.mak:37. That should do the trick. Diego
On Fri, May 30, 2008 at 11:47:56AM -0400, Jeremy Kolb wrote:
[...]
Since an updated patch is required anyway...
--- configure (revision 13538) +++ configure (working copy) @@ -2216,3 +2221,64 @@ + +# Build DLL Configuration for Windows.
configuration
+ license_str="This FFmpeg build is distributed under the terms of the GNU $license.\r\n" + test "$license" = "unredistributable" && + license_str="This FFmpeg build contains non-free code and is not legally redistributable.\r\n"
Why do you add \r\n here? The other VALUE lines in the .rc file do not seem to require it. Diego
Diego Biurrun wrote:
On Fri, May 30, 2008 at 11:47:56AM -0400, Jeremy Kolb wrote:
[...]
Since an updated patch is required anyway...
--- configure (revision 13538) +++ configure (working copy) @@ -2216,3 +2221,64 @@ + +# Build DLL Configuration for Windows.
configuration
Ok.
+ license_str="This FFmpeg build is distributed under the terms of the GNU $license.\r\n" + test "$license" = "unredistributable" && + license_str="This FFmpeg build contains non-free code and is not legally redistributable.\r\n"
Why do you add \r\n here? The other VALUE lines in the .rc file do not seem to require it.
It makes the output cleaner when right clicking on the DLL and looking at the versioning information. It inserts a linebreak making the line about finding the source easier to find.
Diego
Ok try this. I also added version.h to CLEANFILES so that a make clean will remove it from the subdirectories. Jeremy
On Fri, May 30, 2008 at 02:39:14PM -0400, Jeremy Kolb wrote:
Ok try this. I also added version.h to CLEANFILES so that a make clean will remove it from the subdirectories.
Wait, there still should be only one version.h file. You may have to prepend the rule by $(SRC_PATH). Diego
Diego Biurrun wrote:
On Fri, May 30, 2008 at 02:39:14PM -0400, Jeremy Kolb wrote:
Ok try this. I also added version.h to CLEANFILES so that a make clean will remove it from the subdirectories.
Wait, there still should be only one version.h file. You may have to prepend the rule by $(SRC_PATH).
Diego
That doesn't work. I then get $ mingw32-make.exe dllinfo.o mingw32-make: *** No rule to make target `version.h', needed by `dllinfo.o'. I also tried changing the #include line to include '../version.h' but then I just get a No rule to make target `../version.h', needed by `dllinfo.o'. Jeremy
On Fri, May 30, 2008 at 03:37:53PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Fri, May 30, 2008 at 02:39:14PM -0400, Jeremy Kolb wrote:
Ok try this. I also added version.h to CLEANFILES so that a make clean will remove it from the subdirectories.
Wait, there still should be only one version.h file. You may have to prepend the rule by $(SRC_PATH).
That doesn't work. I then get
$ mingw32-make.exe dllinfo.o mingw32-make: *** No rule to make target `version.h', needed by `dllinfo.o'.
I also tried changing the #include line to include '../version.h' but then I just get a
No rule to make target `../version.h', needed by `dllinfo.o'.
I'm out of bright ideas right now. Let's wait for Mans to return from LinuxTag and have a look. In the meantime, could you please post the latest incarnation of your patch so that we have a basis to work with? Diego
Diego Biurrun wrote:
On Fri, May 30, 2008 at 03:37:53PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Fri, May 30, 2008 at 02:39:14PM -0400, Jeremy Kolb wrote:
Ok try this. I also added version.h to CLEANFILES so that a make clean will remove it from the subdirectories.
Wait, there still should be only one version.h file. You may have to prepend the rule by $(SRC_PATH).
That doesn't work. I then get
$ mingw32-make.exe dllinfo.o mingw32-make: *** No rule to make target `version.h', needed by `dllinfo.o'.
I also tried changing the #include line to include '../version.h' but then I just get a
No rule to make target `../version.h', needed by `dllinfo.o'.
I'm out of bright ideas right now. Let's wait for Mans to return from LinuxTag and have a look. In the meantime, could you please post the latest incarnation of your patch so that we have a basis to work with?
Diego
Here you go. Jeremy
On Mon, Jun 02, 2008 at 01:21:15PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Fri, May 30, 2008 at 03:37:53PM -0400, Jeremy Kolb wrote:
I'm out of bright ideas right now. Let's wait for Mans to return from LinuxTag and have a look. In the meantime, could you please post the latest incarnation of your patch so that we have a basis to work with?
Here you go.
Here's the relevant IRC discussion between me and Mans on the subject: 00:36 <@DonDiego> mru: did you see that windows rc thing? 00:37 <@mru> I saw it, didn't look at it 00:37 <@mru> in detail 00:37 <@mru> this is the wrong solution 00:37 <@mru> what we should do is 00:37 <@mru> 1. fix version.h creation to work when building in subdirs 00:38 <@DonDiego> yes 00:38 <@mru> 2. add a %.o: %.rc rule 00:38 <@mru> 3. add a %.rc: whatever rule 00:38 <@mru> perhaps with a shell script helper 00:39 <@DonDiego> we can start with 1. 00:39 <@DonDiego> IIUC this is a real bug anyway 00:39 <@mru> yes, that's why I gave it that number That does indeed sound like a plan. Diego
Diego Biurrun wrote:
On Mon, Jun 02, 2008 at 01:21:15PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Fri, May 30, 2008 at 03:37:53PM -0400, Jeremy Kolb wrote:
I'm out of bright ideas right now. Let's wait for Mans to return from LinuxTag and have a look. In the meantime, could you please post the latest incarnation of your patch so that we have a basis to work with?
Here you go.
Here's the relevant IRC discussion between me and Mans on the subject:
00:36 <@DonDiego> mru: did you see that windows rc thing? 00:37 <@mru> I saw it, didn't look at it 00:37 <@mru> in detail 00:37 <@mru> this is the wrong solution 00:37 <@mru> what we should do is 00:37 <@mru> 1. fix version.h creation to work when building in subdirs 00:38 <@DonDiego> yes 00:38 <@mru> 2. add a %.o: %.rc rule 00:38 <@mru> 3. add a %.rc: whatever rule 00:38 <@mru> perhaps with a shell script helper 00:39 <@DonDiego> we can start with 1. 00:39 <@DonDiego> IIUC this is a real bug anyway 00:39 <@mru> yes, that's why I gave it that number
That does indeed sound like a plan.
Diego
Which part is incorrect? Jeremy
On Tue, Jun 03, 2008 at 09:48:29AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Mon, Jun 02, 2008 at 01:21:15PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Fri, May 30, 2008 at 03:37:53PM -0400, Jeremy Kolb wrote:
I'm out of bright ideas right now. Let's wait for Mans to return from LinuxTag and have a look. In the meantime, could you please post the latest incarnation of your patch so that we have a basis to work with?
Here you go.
Here's the relevant IRC discussion between me and Mans on the subject:
00:36 <@DonDiego> mru: did you see that windows rc thing? 00:37 <@mru> I saw it, didn't look at it 00:37 <@mru> in detail 00:37 <@mru> this is the wrong solution 00:37 <@mru> what we should do is 00:37 <@mru> 1. fix version.h creation to work when building in subdirs 00:38 <@DonDiego> yes 00:38 <@mru> 2. add a %.o: %.rc rule 00:38 <@mru> 3. add a %.rc: whatever rule 00:38 <@mru> perhaps with a shell script helper 00:39 <@DonDiego> we can start with 1. 00:39 <@DonDiego> IIUC this is a real bug anyway 00:39 <@mru> yes, that's why I gave it that number
That does indeed sound like a plan.
Which part is incorrect?
We need separate patches. The first step would be to send us one that implements version.h creation when running make from a subdirectory. This is not entirely trivial, if you want to avoid having one version.h file per subdirectory. Try having configure run version.sh at the end so that version.h already exists when make is run, even from a subdirectory. Diego
Diego Biurrun <diego at biurrun.de> writes:
On Tue, Jun 03, 2008 at 09:48:29AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Mon, Jun 02, 2008 at 01:21:15PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Fri, May 30, 2008 at 03:37:53PM -0400, Jeremy Kolb wrote:
I'm out of bright ideas right now. Let's wait for Mans to return from LinuxTag and have a look. In the meantime, could you please post the latest incarnation of your patch so that we have a basis to work with?
Here you go.
Here's the relevant IRC discussion between me and Mans on the subject:
00:36 <@DonDiego> mru: did you see that windows rc thing? 00:37 <@mru> I saw it, didn't look at it 00:37 <@mru> in detail 00:37 <@mru> this is the wrong solution 00:37 <@mru> what we should do is 00:37 <@mru> 1. fix version.h creation to work when building in subdirs 00:38 <@DonDiego> yes 00:38 <@mru> 2. add a %.o: %.rc rule 00:38 <@mru> 3. add a %.rc: whatever rule 00:38 <@mru> perhaps with a shell script helper 00:39 <@DonDiego> we can start with 1. 00:39 <@DonDiego> IIUC this is a real bug anyway 00:39 <@mru> yes, that's why I gave it that number
That does indeed sound like a plan.
Which part is incorrect?
We need separate patches. The first step would be to send us one that implements version.h creation when running make from a subdirectory. This is not entirely trivial, if you want to avoid having one version.h file per subdirectory. Try having configure run version.sh at the end so that version.h already exists when make is run, even from a subdirectory.
That's not a good idea, since the version can change without configure being run. -- M?ns Rullg?rd mans at mansr.com
On Fri, Jun 06, 2008 at 08:06:21PM +0100, M?ns Rullg?rd wrote:
Diego Biurrun <diego at biurrun.de> writes:
On Tue, Jun 03, 2008 at 09:48:29AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Mon, Jun 02, 2008 at 01:21:15PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Fri, May 30, 2008 at 03:37:53PM -0400, Jeremy Kolb wrote:
I'm out of bright ideas right now. Let's wait for Mans to return from LinuxTag and have a look. In the meantime, could you please post the latest incarnation of your patch so that we have a basis to work with?
Here you go.
Here's the relevant IRC discussion between me and Mans on the subject:
00:36 <@DonDiego> mru: did you see that windows rc thing? 00:37 <@mru> I saw it, didn't look at it 00:37 <@mru> in detail 00:37 <@mru> this is the wrong solution 00:37 <@mru> what we should do is 00:37 <@mru> 1. fix version.h creation to work when building in subdirs 00:38 <@DonDiego> yes 00:38 <@mru> 2. add a %.o: %.rc rule 00:38 <@mru> 3. add a %.rc: whatever rule 00:38 <@mru> perhaps with a shell script helper 00:39 <@DonDiego> we can start with 1. 00:39 <@DonDiego> IIUC this is a real bug anyway 00:39 <@mru> yes, that's why I gave it that number
That does indeed sound like a plan.
Which part is incorrect?
We need separate patches. The first step would be to send us one that implements version.h creation when running make from a subdirectory. This is not entirely trivial, if you want to avoid having one version.h file per subdirectory. Try having configure run version.sh at the end so that version.h already exists when make is run, even from a subdirectory.
That's not a good idea, since the version can change without configure being run.
Let me say it more explicitly: We could have configure run version.sh at the end in *addition* to version.sh being run from the Makefiles as usual. This would ensure that version.h exists before Make is invoked. Diego
M?ns Rullg?rd wrote:
Diego Biurrun <diego at biurrun.de> writes:
On Tue, Jun 03, 2008 at 09:48:29AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Mon, Jun 02, 2008 at 01:21:15PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Fri, May 30, 2008 at 03:37:53PM -0400, Jeremy Kolb wrote:
I'm out of bright ideas right now. Let's wait for Mans to return from LinuxTag and have a look. In the meantime, could you please post the latest incarnation of your patch so that we have a basis to work with?
Here you go. Here's the relevant IRC discussion between me and Mans on the subject:
00:36 <@DonDiego> mru: did you see that windows rc thing? 00:37 <@mru> I saw it, didn't look at it 00:37 <@mru> in detail 00:37 <@mru> this is the wrong solution 00:37 <@mru> what we should do is 00:37 <@mru> 1. fix version.h creation to work when building in subdirs 00:38 <@DonDiego> yes 00:38 <@mru> 2. add a %.o: %.rc rule 00:38 <@mru> 3. add a %.rc: whatever rule 00:38 <@mru> perhaps with a shell script helper 00:39 <@DonDiego> we can start with 1. 00:39 <@DonDiego> IIUC this is a real bug anyway 00:39 <@mru> yes, that's why I gave it that number
That does indeed sound like a plan. Which part is incorrect? We need separate patches. The first step would be to send us one that implements version.h creation when running make from a subdirectory. This is not entirely trivial, if you want to avoid having one version.h file per subdirectory. Try having configure run version.sh at the end so that version.h already exists when make is run, even from a subdirectory.
That's not a good idea, since the version can change without configure being run.
Currently the build system doesn't reflect version changes on shared libraries and pc files. We know you like neither of them, but do you plan on fixing this somehow?
On Fri, Jun 06, 2008 at 09:07:59PM +0100, Ramiro Polla wrote:
M?ns Rullg?rd wrote:
Diego Biurrun <diego at biurrun.de> writes:
On Tue, Jun 03, 2008 at 09:48:29AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Mon, Jun 02, 2008 at 01:21:15PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
> On Fri, May 30, 2008 at 03:37:53PM -0400, Jeremy Kolb wrote: > > I'm out of bright ideas right now. Let's wait for Mans to return from > LinuxTag and have a look. In the meantime, could you please post the > latest incarnation of your patch so that we have a basis to work with? > Here you go. Here's the relevant IRC discussion between me and Mans on the subject:
00:36 <@DonDiego> mru: did you see that windows rc thing? 00:37 <@mru> I saw it, didn't look at it 00:37 <@mru> in detail 00:37 <@mru> this is the wrong solution 00:37 <@mru> what we should do is 00:37 <@mru> 1. fix version.h creation to work when building in subdirs 00:38 <@DonDiego> yes 00:38 <@mru> 2. add a %.o: %.rc rule 00:38 <@mru> 3. add a %.rc: whatever rule 00:38 <@mru> perhaps with a shell script helper 00:39 <@DonDiego> we can start with 1. 00:39 <@DonDiego> IIUC this is a real bug anyway 00:39 <@mru> yes, that's why I gave it that number
That does indeed sound like a plan. Which part is incorrect? We need separate patches. The first step would be to send us one that implements version.h creation when running make from a subdirectory. This is not entirely trivial, if you want to avoid having one version.h file per subdirectory. Try having configure run version.sh at the end so that version.h already exists when make is run, even from a subdirectory.
That's not a good idea, since the version can change without configure being run.
Currently the build system doesn't reflect version changes on shared libraries and pc files. We know you like neither of them, but do you plan on fixing this somehow?
I never thought about it to be honest. Yes, it could be done. Patches welcome as always :) Diego
Ramiro Polla <ramiro at lisha.ufsc.br> writes:
M?ns Rullg?rd wrote:
Diego Biurrun <diego at biurrun.de> writes:
On Tue, Jun 03, 2008 at 09:48:29AM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
On Mon, Jun 02, 2008 at 01:21:15PM -0400, Jeremy Kolb wrote:
Diego Biurrun wrote:
> On Fri, May 30, 2008 at 03:37:53PM -0400, Jeremy Kolb wrote: > > I'm out of bright ideas right now. Let's wait for Mans to return from > LinuxTag and have a look. In the meantime, could you please post the > latest incarnation of your patch so that we have a basis to work with? > Here you go. Here's the relevant IRC discussion between me and Mans on the subject:
00:36 <@DonDiego> mru: did you see that windows rc thing? 00:37 <@mru> I saw it, didn't look at it 00:37 <@mru> in detail 00:37 <@mru> this is the wrong solution 00:37 <@mru> what we should do is 00:37 <@mru> 1. fix version.h creation to work when building in subdirs 00:38 <@DonDiego> yes 00:38 <@mru> 2. add a %.o: %.rc rule 00:38 <@mru> 3. add a %.rc: whatever rule 00:38 <@mru> perhaps with a shell script helper 00:39 <@DonDiego> we can start with 1. 00:39 <@DonDiego> IIUC this is a real bug anyway 00:39 <@mru> yes, that's why I gave it that number
That does indeed sound like a plan. Which part is incorrect? We need separate patches. The first step would be to send us one that implements version.h creation when running make from a subdirectory. This is not entirely trivial, if you want to avoid having one version.h file per subdirectory. Try having configure run version.sh at the end so that version.h already exists when make is run, even from a subdirectory.
That's not a good idea, since the version can change without configure being run.
Currently the build system doesn't reflect version changes on shared libraries and pc files. We know you like neither of them, but do you plan on fixing this somehow?
The situation is not ideal, and I have been thinking about how to improve it. In the meantime, let's not add more to the breakage. -- M?ns Rullg?rd mans at mansr.com
On Thu, May 29, 2008 at 6:49 AM, Jeremy Kolb <jkolb at wsi.com> wrote:
Diego Biurrun wrote:
Where is the problem exactly? You can create them from the .rc files during the make stage, where all .d files are created...
I don't think so. They are created via gcc -MM -MG and as far as I know you can't run .rc files through gcc.
Why not? From what I can find, the first step to processing rc files in windres is "gcc -E -xc-header -DRC_INVOKED". -Eli
Eli Friedman wrote:
On Thu, May 29, 2008 at 6:49 AM, Jeremy Kolb <jkolb at wsi.com> wrote:
Diego Biurrun wrote:
Where is the problem exactly? You can create them from the .rc files during the make stage, where all .d files are created...
I don't think so. They are created via gcc -MM -MG and as far as I know you can't run .rc files through gcc.
Why not? From what I can find, the first step to processing rc files in windres is "gcc -E -xc-header -DRC_INVOKED".
Thanks Eli, that works. I hadn't realized that I could do that. Jeremy
participants (10)
-
7c6ebd986448736acd2250be77d2cc38@davjam.org -
baptiste.coudurier@smartjog.com -
daveryeo@telus.net -
diego@biurrun.de -
eli.friedman@gmail.com -
jkolb@wsi.com -
mans@mansr.com -
ramiro.polla@gmail.com -
ramiro@lisha.ufsc.br -
Reimar.Doeffinger@stud.uni-karlsruhe.de