dimitri / el-get

Manage the external elisp bits and pieces upon which you depend!
http://tapoueh.org/emacs/el-get.html
1.64k stars 457 forks source link

Why is gmake used? #2781

Closed raxod502 closed 4 years ago

raxod502 commented 4 years ago

We are working on adding support for el-get recipes to straight.el: https://github.com/raxod502/straight.el/pull/549. As a result of that I had a quick question. Why do many recipes in el-get have branches to use either make or gmake depending on system-type. If the package compiles with plain make, then using gmake doesn't help; on the other hand, if it doesn't compile with plain make, then there's no point in even having an option to not use gmake. So I am somewhat confused about this convention.

npostavs commented 4 years ago

I think the issue is that BSD systems usually have make -> BSD Make, and gmake -> GNU Make. So if the makefile happens to use GNU Make features, then someone running on *BSD or macOS will submit a PR to switch it to gmake. I imagine some instances could just be cargo culting though.

DarwinAwardWinner commented 4 years ago

I believe that on systems where make is GNU Make, there is generally not a gmake command. Hence, there is no single command name you can use on every system to always get GNU Make:

ryan@calliope:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:    20.04
Codename:   focal
ryan@calliope:~$ which make
/usr/bin/make
ryan@calliope:~$ which gmake
ryan@calliope:~$ make --version
GNU Make 4.2.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

However, given that this need arises in multiple recipes, the logic should probably be extracted into el-get itself, which should do the work once to figure out which command is GNU Make and set a variable appropriately.

raxod502 commented 4 years ago

I see. I had forgotten that on GNU systems, plain make was GNU make rather than BSD. Your explanation makes sense. Thank you!