ninenines / erlang.mk

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

DTL_OPTS does not apply to Deps #925

Closed artman41 closed 3 years ago

artman41 commented 3 years ago

For an application, I have the following in the Makefile

DTL_OPTS+= {auto_escape, false}

Modifying Erlang.Mk to output the Erlydtl call, I can see the following

Application:

erlydtl:compile(F, Module, [{auto_escape,false},{out_dir,"ebin/"},return_errors])

Dep:

erlydtl:compile(F, Module, [{out_dir,"ebin/"},return_errors])

Currently, this results in the dep's template escaping HTML whereas I would instead expect it to inherit the {auto_escape, false} option and leave the HTML unescaped.

For now, I'm adding the dep to the NO_AUTOPATCH variable, though I'd prefer having the DTL_OPTS fixed instead

essen commented 3 years ago

If you want them to apply to deps you need to also export it.

export DTL_OPTS
artman41 commented 3 years ago

@essen absolute legend, thanks for pointing out my mistake 👍