Bug 68142 - build: Fix out of source directory build
Summary: build: Fix out of source directory build
Status: NEW
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-15 11:22 UTC by Alban Browaeys
Modified: 2013-08-27 10:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
build: Fix out of source directory build (1.42 KB, patch)
2013-08-15 11:22 UTC, Alban Browaeys
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alban Browaeys 2013-08-15 11:22:52 UTC
Created attachment 84095 [details] [review]
build: Fix out of source directory build

This fixes out of source directory build. Namely doing source stuff from the source directory (git, autoreconf, etc) and build ones from builddir (configure)
Comment 1 Simon McVittie 2013-08-21 17:15:08 UTC
On Bug #59705 I asked:
> Is there an expectation that autogen.sh can always be run in an out-of-tree
> build directory, via its absolute path to the copy in the source directory?

and you never replied. Is there? What projects support or document it?

I haven't seen any particular indication that this cd-to-srcdir behaviour is something that's (meant to be) widely supported. autogen.sh is a loose convention, rather than an API: the closest I've seen to a definition of its "API" is <https://people.gnome.org/~walters/docs/build-api.txt> which effectively says that "NOCONFIGURE=1 ./autogen.sh" in the srcdir, followed by $srcdir/configure in the builddir, is the only calling convention that can be relied on.

I'm reluctant to add complexity if we don't need it - if "NOCONFIGURE=1 ./autogen.sh && ( cd $builddir && $srcdir/configure )" is necessary for typical GNOME projects, and sufficient for us, can't that be our "API"?
Comment 2 Alban Browaeys 2013-08-25 02:41:36 UTC
sorry. No, there is no expectation. The issue is with jhbuild as of now. I have a few cmake projects (which hard depend on the feature to build out of source directory ot the point they do not build if not so) included in my setup as I planned to resume work on opensync nad take a shot at syncevo while proceeding with gnome development and testing.
The one issue is that with jhbuild one cannot tag a project as out of source build, only the opposite .
Another option than this patch would be to tag explicitely the project as not able to be build out of its source directory in the gnome moduleset .
Both are fine with me .
I did it this way as projects most of the time enable this option, (project like kde enforce it; gnome-autogen enable it automagically). So to me it is a convention but not a rule written in stone.

Then  should I close both bugs and bug jhbuild to have them tagged as supports-non-srcdir-builds="no" ?
Comment 3 Simon McVittie 2013-08-27 10:39:37 UTC
(In reply to comment #2)
> Then  should I close both bugs and bug jhbuild to have them tagged as
> supports-non-srcdir-builds="no" ?

If anything, I think you should be requesting that for projects that don't have buildapi-variable-no-builddir, jhbuild uses the same sequence that I do when compiling Autotools stuff locally:

* (in srcdir) NOCONFIGURE=1 ./autogen.sh
* (in builddir) $abs_top_srcdir/configure $options
* (in builddir or via make -C) make

That's the only thing that's guaranteed to work under Colin's proposed "build-api".


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.