Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dynamic make tool detection #270

Closed
wants to merge 1 commit into from
Closed

Add dynamic make tool detection #270

wants to merge 1 commit into from

Conversation

fabiankrack
Copy link
Contributor

On FreeBSD the GNU make binary is called 'gmake'. The native
BSD make cannot be used due to syntax incompatibilities.

On FreeBSD the GNU make binary is called 'gmake'. The native
BSD make cannot be used due to syntax incompatibilities.
@sferik
Copy link
Contributor

sferik commented Jan 17, 2013

What are the specific syntax incompatibilities between BSD make and GNU make? I'd rather we resolve those, if possible. Is there a common syntax that will work in both?

@sferik
Copy link
Contributor

sferik commented Jan 17, 2013

Just noticed this was related to #239 and #266. We should fix this issue, one way or the other. It has dragged on for too long.

@sstephenson @jeremy: What's your preferred approach?

@sferik
Copy link
Contributor

sferik commented Jan 17, 2013

As I understand it, the possible solutions are:

  1. Dynamic make selection (this patch)
  2. Dynamic MAKE_OPTS selection (This fixes issue #239 related to building Ruby on FreeBSD systems #266)
  3. Unify MAKE_OPTS to work with both GNU make and BSD make

In my mind, option 3 would be most optimal/least error prone, but I don't have a good environment to develop and test such a path. Can someone recommend a BSD Vagrant box that will reproduce this issue?

@sstephenson
Copy link
Contributor

I'd prefer if, at the very least, we let you set your own value for $MAKE before falling back to a default value.

@kaspergrubbe
Copy link

This can build on both GNU make and BSD make:

MAKE_OPTS="-B -j 2"

I don't know the full implications of the -B-flag. But as I understand it, it does only affect the build process, and makes compiling a little slower.

@sstephenson
Copy link
Contributor

-B has a different meaning in BSD make: http://www.freebsd.org/cgi/man.cgi?query=make&sektion=1

The -j 2 default for $MAKE_OPTS is intended as a helpful optimization for the common case of folks on systems with GNU make and multiple processors. I'd rather explicitly whitelist that configuration than blacklist incompatible configurations.

@kaspergrubbe
Copy link

Good catch, I have now read the man page through for both versions of make.

I have made some basic guessing based on the differences of the two programs in my branch: #266

@fabiankrack
Copy link
Contributor Author

I think the cleanest solution would be to use $MAKE:

#272

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants