After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751128 - build: make it possible to disable the backend build
build: make it possible to disable the backend build
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-06-17 21:15 UTC by Cosimo Cecchi
Modified: 2015-09-11 15:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: make it possible to disable the backend build (7.78 KB, patch)
2015-06-17 21:15 UTC, Cosimo Cecchi
needs-work Details | Review
build: Make it possible to disable the backend build (7.79 KB, patch)
2015-06-18 05:55 UTC, Debarshi Ray
committed Details | Review
build: Make it possible to disable the backend build (8.30 KB, patch)
2015-09-11 15:58 UTC, Debarshi Ray
committed Details | Review

Description Cosimo Cecchi 2015-06-17 21:15:55 UTC
This was something I wrote a while ago to make g-o-a more friendly to xdg-app, but never remembered to attach here for review.
The idea is that an application that wants to bundle g-o-a should not need to build all the backend components.
Feedback welcome!
Comment 1 Cosimo Cecchi 2015-06-17 21:15:57 UTC
Created attachment 305502 [details] [review]
build: make it possible to disable the backend build

The backend will typically be a core OS component, where the client
library can be bundled with applications. Make it possible to build the
latter without the former.
Comment 2 Cosimo Cecchi 2015-06-17 21:16:25 UTC
Adding Alex to CC.
Comment 3 Debarshi Ray 2015-06-18 05:38:22 UTC
Review of attachment 305502 [details] [review]:

Thanks for the patch, Cosimo. This is interesting.

::: Makefile.am
@@ +6,3 @@
+if BUILD_BACKEND
+SUBDIRS += telepathy-account-widgets
+endif

telepathy-account-widgets needs to be built before src, I think. I haven't hit a build failure yet, but see below.

::: src/Makefile.am
@@ +6,3 @@
+if BUILD_BACKEND
+SUBDIRS += daemon goabackend goaidentity
+endif

The order actually matters. You can't build the examples (with --enable-backend) before goabackend has been built because goabackend.h includes a build generated header. Similarly you can't build the daemon before goabackend.

The build will fail if you start from a clean git tree.

::: src/examples/Makefile.am
@@ +32,3 @@
 add_pocket_LDADD = $(GLIB_LIBS) $(REST_LIBS) ../goa/libgoa-1.0.la
+noinst_PROGRAMS += add-pocket
+endif

Nit: Do you mind keeping the original format? ie. noinst_PROGRAMS = list-providers add-pocket, and then listing the sources in two paragraphs?
Comment 4 Debarshi Ray 2015-06-18 05:55:34 UTC
Created attachment 305517 [details] [review]
build: Make it possible to disable the backend build

I adjusted the Makefile.ams to make it build with --enable-backend. However, it fails while generating the documentation for --disable-backend build.

What is the recommendation for application bundle builds? Shall we disable the documentation?
Comment 5 Alexander Larsson 2015-06-18 06:49:14 UTC
In general i disable the devel docs when building specifically for a bundled build. There really is no need to ship that in the final app, so why build it?

User docs are a different thing though.
Comment 6 Debarshi Ray 2015-09-11 15:58:09 UTC
Created attachment 311163 [details] [review]
build: Make it possible to disable the backend build

Pushed after disabling the developer documentation and the gsettings schema. The settings are only used by the backend.