erlang - Forcing erl -make to recompile files when macros are changed -


i tried similar how make 2 different source directories in makefile output 1 bin directory?, have these files (relative project root):

emakefile: % emakefile % -*- mode: erlang -*- {["src/*", "src/*/*", "src/*/*/*"],  [{i, "include"}, {outdir, "ebin"}, debug_info]}.  test/emakefile: % emakefile % -*- mode: erlang -*- {["../src/*", "../src/*/*", "../src/*/*/*"],  [{i, "../include"}, {outdir, "../ebin"}, debug_info, {d, 'test'}]}.  makefile: epath=-pa ebin  all: before_compile     erl -make  all_test: before_compile     cd test     erl -make     cd ..  before_compile: mk_ebin copy_sqlite create_db copy_config copy_dot_app  test: all_test     erl -noshell $(epath) \         -s tests run \         -s init stop     rm -f ct.db  clean:     rm -fv ebin/*  ... dependencies of before_compile 

the problem running make test doesn't recompile modules compiled make. seems erl -make doesn't care compiled without test defined, checks modules older beam-files. how force recompile (and avoid recompilation when isn't needed)?

update: strangely, when running make all_test after make clean, appears ./emakefile used instead of test/emakefile: getting

recompile: src/tests recompile: src/server_protocol_client 

etc. , no tests instead of

recompile: ../src/tests recompile: ../src/server_protocol_client 

which doing cd test; erl -make manually. idea why? anyway, i've fixed problem removing test/emakefile , replacing all_test in makefile:

all_test: before_compile     erl -noshell -eval "make:all([{d, 'test'}])." -s init stop 

all_test: before_compile     cd test     erl -make     cd .. 

this incorrect. each line produces own process. such:

all_test: before_compile     cd test; \     erl -make 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -