GNOME Bugzilla – Bug 670537
Do not ship vala-generated .c files in tarballs
Last modified: 2012-03-03 11:05:46 UTC
Now that bug 667851 is fixed, it's important that the tarball only contain the .vala files, and not the generated .c files. For instance, if I try to build 3.3.90 tarball with vala 0.15, it will fail because the generated files are from vala 0.14.
Agreed - patches welcome! Actually I assume it is just some automake magic...
Created attachment 208195 [details] [review] Do not ship vala-generated .c files in tarballs This is important as tarballs might get built with a different versions of vala. This introduces a dependency on the vala compiler, but since vala support requires libvala, this shouldn't be a big issue. This is based on http://mterry.name/log/2011/10/10/vala-autotool-tricks/ Note that I haven't tested this, can't run a "make dist" for anjuta at the moment...
Review of attachment 208195 [details] [review]: FWIW, this will break distcheck, as automake doesn't support out-of-tree builds when the C files are missing. ::: plugins/language-support-vala/Makefile.am @@ +38,3 @@ # Plugin sources +libanjuta_language_vala_la_VALASOURCES = locator.vala plugin.vala provider.vala report.vala +libanjuta_language_vala_la_SOURCES = $(libanjuta_language_vala_la_VALASOURCES) I'd rather not do this, as we don't have mixed C and Vala sources. I prefer to use libanjuta_language_vala_la_SOURCES in the dist-hook below (but this is just a matter of personal preference.) @Johannes: What do you think about this? ::: plugins/symbol-db/anjuta-tags/Makefile.am @@ +137,3 @@ +dist-hook: + cd $(distdir) && \ + rm ctags-visitor.c ctags-vala.h You don't need to rm ctags-vala.h as you removed it from EXTRA_DIST, and automake doesn't know about it.
Review of attachment 208195 [details] [review]: Thanks for the patch. Overall the patch doesn't work, it breaks make dist. I will have to check but thanks for the link - I hope it is in generally doable to not ship generated files. ::: plugins/symbol-db/anjuta-tags/Makefile.am @@ +137,3 @@ +dist-hook: + cd $(distdir) && \ + rm ctags-visitor.c ctags-vala.h This needs to be rm -f at least because those might not exist.
Created attachment 208319 [details] [review] Do not ship vala-generated .c files in tarballs This is important as tarballs might get built with a different versions of vala. This introduces a dependency on the vala compiler, but since vala support requires libvala, this shouldn't be a big issue.
Forgot to add a comment: the updated patch fixes make dist, but make distcheck is still broken (and the only fix to this is, AFAICT, not to use automake vala support) (btw, this obsoletes the first patch)
Well, it doesn't only break distcheck it also breaks the distribution of the files of course. What do other projects do? Don't use automake support?
Created attachment 208419 [details] [review] bgo#670537: Do not ship vala-generated .c files in tarballs I've made it not use automake vala support. Now distcheck fails in the am-project testsuite so I think I didn't break anything
It's not really nice but it seems to work.
(In reply to comment #9) > It's not really nice but it seems to work. The last patch from Abderrahim is not committed yet. Do you do it or could I commit it myself?
Review of attachment 208419 [details] [review]: Thanks, committed!