Bug 48277 - either avoid requiring GNU make, or document that it's required
Summary: either avoid requiring GNU make, or document that it's required
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.4.x
Hardware: All OpenBSD
: medium minor
Assignee: Simon McVittie
QA Contact: John (J5) Palmieri
URL:
Whiteboard: review?
Keywords: patch
Depends on:
Blocks:
 
Reported: 2012-04-03 23:17 UTC by Antoine Jacoutot
Modified: 2013-09-05 15:16 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
don't use GNUmake idiom (562 bytes, patch)
2012-04-03 23:17 UTC, Antoine Jacoutot
Details | Splinter Review
Document that GNU make is required (1.50 KB, patch)
2013-06-26 12:01 UTC, Simon McVittie
Details | Splinter Review
Use GNU make features to reduce repetition (1.96 KB, patch)
2013-06-26 12:02 UTC, Simon McVittie
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Jacoutot 2012-04-03 23:17:50 UTC
Created attachment 59461 [details] [review]
don't use GNUmake idiom

Hi.

Trying to build dbus on BSD systems ends up with the following error:
Using $< in a non-suffix rule context is a GNUmake idiom (line 1440 of Makefile)

The attached patch allows to build with both GNUmake and BSDmake.
Thoughts?
Comment 1 Simon McVittie 2012-04-04 04:59:12 UTC
I'm very tempted to do what we did in Telepathy and say "GNU make is required, use gmake if you're on *BSD". I'm actually quite surprised if D-Bus otherwise builds correctly on non-GNU make - I would have expected other GNU features to creep in, regardless of how portable we tried to be, just because no regular contributor is likely to test anything else (except CMake, because the Windows people like it, but that's an entire parallel build-system).

Only supporting GNU make would also mean we're free to use GNU extensions like $(wildcard ...), $(patsubst ...) etc. to simplify the makefiles over time. "Don't repeat yourself" - not just for web frameworks :-)
Comment 2 Antoine Jacoutot 2012-04-04 05:57:02 UTC
(In reply to comment #1)
> I'm very tempted to do what we did in Telepathy and say "GNU make is required,
> use gmake if you're on *BSD". I'm actually quite surprised if D-Bus otherwise
> builds correctly on non-GNU make - I would have expected other GNU features to
> creep in, regardless of how portable we tried to be, just because no regular
> contributor is likely to test anything else (except CMake, because the Windows
> people like it, but that's an entire parallel build-system).
> 
> Only supporting GNU make would also mean we're free to use GNU extensions like
> $(wildcard ...), $(patsubst ...) etc. to simplify the makefiles over time.
> "Don't repeat yourself" - not just for web frameworks :-)

Hi Simon.

To be honest, I have nothing against forcing GNU make as a requirement.
But so far I have always been able to build dbus with regular BSD make and since it was an obvious fix I though it could be quick to have it; at least until dbus _really_ requires GNU make for more fancy stuffs :-)
Comment 3 Simon McVittie 2013-06-26 12:01:54 UTC
Created attachment 81465 [details] [review]
Document that GNU make is required

In theory the Autotools build system supports any "make" implementation,
but there are no regular contributors who test with BSD make, so the
inevitable result is that only GNU make actually works (fd.o #48277).

Apparently there's only one GNUism at the moment, which is fixable,
but that means repeating ourselves a bit more. If we instead document
that GNU make is required, we can simplify the Makefiles over time
by using extensions like $(patsubst), leading to a less error-prone
build system.
Comment 4 Simon McVittie 2013-06-26 12:02:23 UTC
Created attachment 81466 [details] [review]
Use GNU make features to reduce repetition

---

Just some really low-hanging fruit, for now.
Comment 5 Chengwei Yang 2013-06-26 13:21:16 UTC
Comment on attachment 81465 [details] [review]
Document that GNU make is required

Review of attachment 81465 [details] [review]:
-----------------------------------------------------------------

Looks good.
Comment 6 Chengwei Yang 2013-06-26 13:23:33 UTC
Comment on attachment 81466 [details] [review]
Use GNU make features to reduce repetition

Review of attachment 81466 [details] [review]:
-----------------------------------------------------------------

Looks good to me.
Comment 7 Simon McVittie 2013-08-22 17:14:47 UTC
None of the reviewer group have reviewed this, but nobody has actually vetoed it either, so, merging.
Comment 8 Simon McVittie 2013-09-05 15:16:41 UTC
Fixed in git for 1.7.6


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.