How to make reinforcement run make on a dependency?

One of my dependencies doesn't use it rebar- it uses a Makefile. How do I get rebarto run this makefile and not try to compile the source itself?

Note that I would like to continue to use fittings for everything else.

+4
source share
2 answers

Looking at the rebar.config example file , you can mark the dependency as raw, which means that it is not compiled by the reinforcement. You can then add either a pre or post compiler to run make in this dependency directory. The rebar command generateshould still be able to build any Erlang applications created there, provided they have an OTP file structure.

+3
source

If you use rebarthrough make, you can add this kind of code to your Makefile:

    @if [[ -f $@/Makefile ]]; \
    then echo 'make -C $@ all' ; \
               make -C $@ all  ; \
    else echo 'cd $@ && rebar get-deps compile && cd ../..' ; \
               cd $@ && rebar get-deps compile && cd ../..  ; fi

It checks to see if it has a $@Makefile, decides to use makeor rebar.

This snippet is from erl.mk https://github.com/fenollp/erl-mk/blob/master/erl.mk#L17-L21

0

All Articles