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 753838 - Build system clean-ups
Build system clean-ups
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: build
git master
Other All
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2015-08-19 17:35 UTC by Debarshi Ray
Modified: 2015-09-08 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Remove unnecessary variable initializations (5.52 KB, patch)
2015-08-19 17:41 UTC, Debarshi Ray
committed Details | Review
build: Sprinkle quotations (16.76 KB, patch)
2015-08-19 17:43 UTC, Debarshi Ray
none Details | Review
build: Sprinkle quotations (34.07 KB, patch)
2015-08-21 11:33 UTC, Debarshi Ray
committed Details | Review
build: Fix a spelling mistake (744 bytes, patch)
2015-09-08 15:09 UTC, Debarshi Ray
none Details | Review
build: Fix wrong grammar and spelling (755 bytes, patch)
2015-09-08 15:26 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2015-08-19 17:35:44 UTC
Philip pointed out a few build system related clean-ups in https://bugzilla.gnome.org/show_bug.cgi?id=739008#c19

Let's use this bug instead of cluttering bug 739008 .
Comment 1 Debarshi Ray 2015-08-19 17:41:55 UTC
Created attachment 309622 [details] [review]
build: Remove unnecessary variable initializations
Comment 2 Debarshi Ray 2015-08-19 17:43:07 UTC
Created attachment 309623 [details] [review]
build: Sprinkle quotations

This is a WIP. I barely know M4 so please let me know if I am on the right track.
Comment 3 Debarshi Ray 2015-08-19 17:44:15 UTC
Ccing Philip because he is the Autotools/M4 expert.
Comment 4 Philip Withnall 2015-08-20 07:42:39 UTC
Review of attachment 309622 [details] [review]:

Looks good.
Comment 5 Philip Withnall 2015-08-20 07:47:31 UTC
Review of attachment 309623 [details] [review]:

::: configure.ac
@@ +149,3 @@
 dnl *** Check if we should build with http backend ***
 dnl **************************************************
+AC_ARG_ENABLE([http], AS_HELP_STRING([--disable-http],[build without http/dav backend]))

You can have [] around AS_HELP_STRING(…) too.

@@ +177,3 @@
+		   	AC_DEFINE([HAVE_AVAHI], [], [Set if we can use avahi])]
+                        [msg_avahi=yes],
+	          	[AM_CONDITIONAL([HAVE_AVAHI], [false])])

Might want to reindent this with spaces to make it a bit clearer that, for example, the first AM_CONDITIONAL and AC_DEFINE are in the same set of quotation marks.

But if that goes against the coding style, no worries.

@@ +194,3 @@
 dnl *** Check for libudev ***
 dnl *************************
+AC_ARG_ENABLE([udev], AS_HELP_STRING([--disable-udev],[build without libudev]))

AS_HELP_STRING can be quoted here too.

@@ +202,3 @@
   if test "x$msg_udev" = "xyes"; then
+    PKG_CHECK_MODULES([UDEV], [libudev])
+    AC_DEFINE([HAVE_LIBUDEV], 1, [Define to 1 if libudev availible])

s/availible/available/

@@ +385,3 @@
 dnl *** Check if we should build with GOA volume monitor ***
 dnl ********************************************************
+AC_ARG_ENABLE([goa], AS_HELP_STRING([--disable-goa],[build without GOA volume monitor]))

AS_HELP_STRING can be quoted here.

@@ +405,3 @@
 dnl *** Check for gphoto2 ***
 dnl *************************
+AC_ARG_ENABLE([gphoto2], AS_HELP_STRING([--disable-gphoto2],[build without gphoto2 support]))

AS_HELP_STRING.

@@ +429,3 @@
+      AC_DEFINE([HAVE_GPHOTO2], 1, [Define to 1 if gphoto2 is available])
+      PKG_CHECK_MODULES([GPHOTO25], [libgphoto2 >= 2.5.0],
+         AC_DEFINE([HAVE_GPHOTO25], 1, [Define to 1 if libgphoto2 2.5 is available]),

The AC_DEFINE inside PKG_CHECK_MODULES should be quoted; and if you’re clarifying indentation, here would be a good place to do so.
Comment 6 Philip Withnall 2015-08-20 07:48:42 UTC
Note: I wouldn’t spend too much time on this, unless you’re planning on adding new features to the build system (like stuff from https://wiki.gnome.org/Projects/GnomeCommon/Migration). Build system stuff is uninteresting and a time sink. :-)
Comment 7 Debarshi Ray 2015-08-20 10:00:55 UTC
Comment on attachment 309622 [details] [review]
build: Remove unnecessary variable initializations

Pushed to master.
Comment 8 Debarshi Ray 2015-08-21 11:32:12 UTC
(In reply to Philip Withnall from comment #6)
> Note: I wouldn’t spend too much time on this, unless you’re planning on
> adding new features to the build system (like stuff from
> https://wiki.gnome.org/Projects/GnomeCommon/Migration).

No, I am not migrating gvfs away from gnome-common. I just wanted to address some of the issues that you had raised in bug 739008 I couldn't bring myself to completely ignore those. :)

> Build system stuff
> is uninteresting and a time sink. :-)

Indeed.
Comment 9 Debarshi Ray 2015-08-21 11:33:09 UTC
Created attachment 309802 [details] [review]
build: Sprinkle quotations

Quoted a few more things as suggested by pwithnall.
Comment 10 Debarshi Ray 2015-08-21 11:33:46 UTC
(In reply to Philip Withnall from comment #5)
> @@ +202,3 @@
>    if test "x$msg_udev" = "xyes"; then
> +    PKG_CHECK_MODULES([UDEV], [libudev])
> +    AC_DEFINE([HAVE_LIBUDEV], 1, [Define to 1 if libudev availible])
> 
> s/availible/available/

I will fix that in a subsequent commit.
Comment 11 Philip Withnall 2015-08-21 12:05:54 UTC
Review of attachment 309802 [details] [review]:

Looks good to me.
Comment 12 Debarshi Ray 2015-09-08 15:09:57 UTC
Created attachment 310911 [details] [review]
build: Fix a spelling mistake
Comment 13 Ondrej Holy 2015-09-08 15:18:46 UTC
Review of attachment 310911 [details] [review]:

::: configure.ac
@@ +202,3 @@
   if test "x$msg_udev" = "xyes"; then
     PKG_CHECK_MODULES([UDEV], [libudev])
+    AC_DEFINE([HAVE_LIBUDEV], 1, [Define to 1 if libudev available])

"Define to 1 if libudev is available"?
Comment 14 Debarshi Ray 2015-09-08 15:26:26 UTC
Created attachment 310915 [details] [review]
build: Fix wrong grammar and spelling
Comment 15 Debarshi Ray 2015-09-08 15:26:43 UTC
(In reply to Ondrej Holy from comment #13)
> Review of attachment 310911 [details] [review] [review]:
> 
> ::: configure.ac
> @@ +202,3 @@
>    if test "x$msg_udev" = "xyes"; then
>      PKG_CHECK_MODULES([UDEV], [libudev])
> +    AC_DEFINE([HAVE_LIBUDEV], 1, [Define to 1 if libudev available])
> 
> "Define to 1 if libudev is available"?

Of course. Fixed.
Comment 16 Ondrej Holy 2015-09-08 15:28:14 UTC
Review of attachment 310915 [details] [review]:

Thanks!