I have closely followed the rebar documentation regarding the dependencies management and release handling and tried to create a release similar to the one described in the accepted answer to one of my previous questions.
However, I can not make yaws to be included as an OTP application inside an OTP Release generated by rebar.
Here is what I do:
- create a release as per official rebar documenation (done, a simple gen_server can be run with /rel/myapp/bin/myapp start)
- specify the yaws dependency in the rebar.config file in the project directory
- run
rebar get-deps
(this pulls yaws and ibrowse) - add this to
reltool.config
:{app, yaws, [{incl_cond, include}]}
- add yaws to the list of applications in
myapp.app.src
rebar compile generate
:
...
==> Leaving directory '/myapp/deps/yaws/rel'
==> yaws (compile)
yaws.erl:13: can't find include file "yaws_appdeps.hrl"
yaws.erl:220: undefined macro 'YAWS_APPDEPS'
yaws.erl:174: function start_app_deps/0 undefined
yaws.erl:194: function start_app_deps/0 undefined
ERROR: Command [compile] failed!
Notes:
The official yaws documentation does not seem to be very explanatory regarding this matter.
If I change yaws to cowboy, I do not get such an error.
Update
Here is my directory structure:
.
├── apps
│ └── myapp
├── deps
│ ├── ibrowse
│ └── yaws
└── rel
└── files
Open the the src directory of yaws. The missing 'yaws_appdeps.hrl' include file may likely have a '.ini' or 'in' extension. Remove that and compile again