[erlang-questions] erlang.mk and yaws

Stefan Hellkvist hellkvist@REDACTED
Sun Mar 29 09:46:43 CEST 2015

Hi (long time lurker of this mailing list)

I like erlang.mk and I like yaws and tend to use them in various projects
(big thank you to the respective contributors of those projects). But when
two of your friends do not get along together you tend to worry. In the
yaws case it seems like the problem is that it does have a rebar.config and
builds fine with rebar, but it does not have its own copy of rebar locally
which many packages seem to include these days (or am I right, what is the
norm?). So yaws is not built when it is added as a dependency in an
erlang.mk project.

I have also tried to add yaws as an AUTOPATCH option in erlang.mk and
erlang.mk tries to create a Makefile from the rebar.config but the
resulting build fails with a:

src/yaws.erl:13: can't find include file "yaws_appdeps.hrl"
src/yaws.erl:221: undefined macro 'YAWS_APPDEPS'
src/yaws.erl:175: function start_app_deps/0 undefined
src/yaws.erl:195: function start_app_deps/0 undefined
make[2]: *** [ebin/portal.app] Error 1
make[1]: *** [all] Error 2

So I guess the AUTOPATCH option in erlang.mk does not seem to properly
create a working Makefile.

The way I always resolve this is to either copy in a rebar script into the
yaws folder or go through the autoconf procedure, which is the other way of
building yaws, but this is of course a manual process that I would like to
avoid. The problem is - which one is the odd one here - should a fix be
done in erlang.mk (perhaps in the AUTOPATCH part) or should yaws' build
system be fixed? Or should my two friends continue to not get along
properly forever and ever? :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150329/9d10066b/attachment.htm>

More information about the erlang-questions mailing list