erlang.mk
erlang.mk copied to clipboard
document how to offer erlang code as a dependency
Having had a look through the documentation, I couldn't work out how to offer my own project as a dependency.
I want to do:
DEPS = lager sqlite my_project
dep_my_project = git https://github.com/myuser/myproject master
But it's not clear what the layout of the git repo at myproject needs to be. Does it need to have a Makefile? An src/ directory? rebar? etc
Can you be more specific?
(I've updated the main description)
Erlang.mk is compatible with anything that has a Makefile (Erlang.mk project or not; doesn't even need to be an Erlang application ultimately, just needs to follow standard practices like "make" builds the thing), and most rebar projects (by patching them and generating a Makefile).
So it doesn't really matter as long as it's an Erlang.mk project, a rebar project, or it has a Makefile. Erlang projects have a specific structure (ebin/ src/ priv/ and so on) so you may want to make sure you follow it (if Erlang.mk or rebar project, then most likely you already do).
You can quickly check if the project builds when used as a dependency by adding it to the package index and running "make check p=myproject" from the Erlang.mk repository.
The paragraphs you've written here ought to be in the documentation!
Question is where, because it is in the documentation already, just from different point of views (see autopatch for example).
Thanks for engaging and explaining what the issue is: I see the problem now; we kind of need an inverse user guide :)
Should I sent a pull request against doc/src/guide, once I've found an appropriate spot?
Sure. The best would probably be a completely new chapter/tutorial "Publishing your project" or similar, that would continue from "Getting started" only for the publishing part of things.
It wouldn't have to cover everything from the start of course. I can add more stuff later on.