ninenines / erlang.mk

A build tool for Erlang that just works.
https://erlang.mk
ISC License
578 stars 241 forks source link

fix: replace perl usage with coreutils #914

Closed pinicarus closed 3 years ago

pinicarus commented 3 years ago

This should replace the dependency to perl

essen commented 3 years ago

Sounds good. Thanks!

essen commented 3 years ago

Merged, thanks!

essen commented 3 years ago

I have to revert this commit because realpath is not available on macOS by default.

pinicarus commented 3 years ago

I have to revert this commit because realpath is not available on macOS by default.

Oh, too bad.

essen commented 3 years ago

Would be open to another (reasonable) solution of course.

crownedgrouse commented 3 years ago

"readlink - f " can be used when realpath is missing

pinicarus commented 3 years ago

"readlink - f " can be used when realpath is missing

Yes, but it lacks the --relative-to feature.

pinicarus commented 3 years ago

I have an alternative implementation that uses make's abspath (or realpath) function and an awk script that only needs the split function.

Running it on my laptop with the --posix flag gives the same output as realpath. Do you known if awk is available in macOS by default?

essen commented 3 years ago

Not sure about "by default" but the problem with awk is there's an alternative implementation that might not be compatible, used in Busybox distros for example. That said, GNU awk is required to even build Erlang.mk and the only problem was Alpine (where it's listed as a mandatory dependency in the user guide) so it's probably safe to use.