Is there a standard way of compiling .lfe
source files from a make
rule in an OTP project?
According to the docs, I'm supposed to use lfe_comp:file/1
, which doesn't help much if I want to compile multiple such files in an OTP application (where I'm supposed to keep the source files in src
, but the binaries in ebin
).
Ideally, I'd be able to do something like
erlc -Wf -o ebin src/*lfe
But there doesn't seem to be lfe
support in erlc
. The best solution I can think of off the top of my head is
find src/*lfe -exec erl -s lfe_comp file {} -s init stop \;
mv src/*beam ebin/
but that seems inelegant. Any better ideas?