简体   繁体   中英

How to use yaws as a part of an OTP release with rebar?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM