GNOME Bugzilla – Bug 725497
srcdir != builddir, automake, and vala
Last modified: 2018-05-22 15:05:48 UTC
vala does not build from git master when $builddir != $srcdir. This is a common build style where you don't put generated files in the source directory. The attached patch fixes the issue. Checked with 'make check'
Created attachment 270691 [details] [review] Makefile.am: Use builddir correctly instead of srcdir Generated files go into $builddir not $srcdir. They should be consumed from $builddir as well. This allows build to succeed from git when $builddir != $srcdir. ie: $ mkdir x86_64 $ cd x86_64 $ ../autogen.sh --prefix=/blah $ make
Review of attachment 270691 [details] [review]: Thanks, however, this patch breaks build with $builddir != $srcdir when building from a source tarball and thus, breaks distcheck. It may be possible to extend the patch to support this as well, however, it would be less clean, in my opinion. Also, I don't know whether automake officially supports $builddir != $srcdir when building from scratch with autoreconf. Do you have a link to an official statement saying that automake supports such builds (e.g., from the documentation)? If yes, I'd be happy to accept an updated patch that doesn't break distcheck.
(In reply to comment #2) > Review of attachment 270691 [details] [review]: > > Thanks, however, this patch breaks build with $builddir != $srcdir when > building from a source tarball and thus, breaks distcheck. > > It may be possible to extend the patch to support this as well, however, it > would be less clean, in my opinion. Also, I don't know whether automake > officially supports $builddir != $srcdir when building from scratch with > autoreconf. Do you have a link to an official statement saying that automake > supports such builds (e.g., from the documentation)? There's a lot that's not in the automake documentation ... Including the versions at which various features, including ones that vala uses were added. Thousands of projects use builddir != srcdir throughout their development process regardless of whether building from git (ie: autogen/autoreconf) or tarballs. It's quickly becoming best-practice, much like non recursive automake and parallel tests. Writing to $srcdir is bad practice from any of the standard targets. But I now understand that vala generally wants to have generated code in srcdir in tarballs. I've fixed the patch so this doesn't break. > If yes, I'd be happy to > accept an updated patch that doesn't break distcheck. Done. I should have double checked that. Duh...
Created attachment 270758 [details] [review] Makefile.am: Use builddir correctly instead of srcdir Generated files go into $builddir not $srcdir. They should be consumed from $builddir as well. This allows build to succeed from git when $builddir != $srcdir. ie: $ mkdir x86_64 $ cd x86_64 $ ../autogen.sh --prefix=/blah $ make
*** Bug 694153 has been marked as a duplicate of this bug. ***
*** Bug 741758 has been marked as a duplicate of this bug. ***
*** Bug 731826 has been marked as a duplicate of this bug. ***
Created attachment 335938 [details] [review] Makefile.am: Use builddir correctly instead of srcdir Generated files go into $builddir not $srcdir. They should be consumed from $builddir as well. This allows build to succeed from git when $builddir != $srcdir. ie: $ mkdir x86_64 $ cd x86_64 $ ../autogen.sh --prefix=/blah $ make
*** Bug 786843 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/434.