lfe-deprecated / lfetool

DEPRECATED - See:
https://github.com/lfe-rebar3/
Other
61 stars 19 forks source link

Use gmake and sh in FreeBSD #133

Open arpunk opened 9 years ago

arpunk commented 9 years ago

Hi @oubiwann,

I am currently having issues with lfetool under FreeBSD, mostly because of a few assumptions lfetool does.

First of all, bash is not installed by default on FreeBSD, and when you install bash it get's installed into /usr/local/bin instead, so I have to manually change lfetool to use that path instead. One solution would be to use env to get the bash shell or use sh which is standard in all Unices.

Second, under FreeBSD the GNU make util is named gmake, and the standard make util is from *BSD, so there are some errors when I try to create a project with lfetool:

Setting up starter OTP service project sample ...
Initialized empty Git repository in /usr/home/arpunk/repos/sample/.git/
make: "resources/make/resources/make/common.mk" line 1: Missing dependency operator
make: "resources/make/resources/make/common.mk" line 2: Need an operator
make: "resources/make/resources/make/common.mk" line 3: Need an operator
make: "resources/make/resources/make/common.mk" line 4: Need an operator
make: "resources/make/resources/make/common.mk" line 15: Missing dependency operator
make: "resources/make/resources/make/common.mk" line 17: Need an operator
make: "resources/make/resources/make/common.mk" line 19: Need an operator
make: "resources/make/resources/make/common.mk" line 22: Missing dependency operator
make: "resources/make/resources/make/common.mk" line 24: Need an operator
make: "resources/make/resources/make/common.mk" line 25: Missing dependency operator
make: "resources/make/resources/make/common.mk" line 27: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/home/arpunk/repos/sample

Let me know if you want me to try a PR (because as my understanding, v2 will be rewritten in LFE).

dokkarr commented 9 years ago

Yeah, there is a balance we need to strike with lfetool 1.x, while work goes into 2.x. It may be as simple as requiring that certain binaries be installed on *BSD, Mac, Windows, Linux, etc., in order to use lfetool. There's been some work by others on BSD (I think Dragonfly BSD, which should be very close if not identical to the support needed by FreeBSD) as well as Solaris + OpenIndiana. I think this was @bjorstrom and @billota, respectively. Perhaps they can chime in with their notes.

As for a fix for gmake, we can probably get most of the way there with using bash functions as aliases an a uname check ...

I'd wait on the PR until the others have responded. IIRC, they've been working to make the smallest changes possible to support *BSD and Solaris.

arpunk commented 9 years ago

@dokkarr Thanks for your answer! I'm keeping an eye on this issue. If you need some specific testing under FreeBSD let me know.

bjorstrom commented 9 years ago

Yeah, I've got some work I've done for using lfetool on Dragonfly BSD. It's on my task list to get that work in shape for a PR. I'll update this ticket when I've pushed the code for review.

@dokkarr: @billota was definitely the one working on additional Solaris support for lfetool. He's been pretty busy lately, though, and I don't think anything's going to be happening on that for a while.

billota commented 9 years ago

Sorry, been busy. Yes, I have some Solaris stuff in a branch on some machine. Needs to get pushed up to a github repo with a PR.