mad_yecc.erl 408 B

12345678910111213
  1. -module(mad_yecc).
  2. -copyright('Sina Samavati').
  3. -compile(export_all).
  4. yrl_to_erl(F) -> filename:join(filename:dirname(F),filename:basename(F, ".yrl")) ++ ".erl".
  5. compile(File,Inc,Bin,Opt,Deps) ->
  6. ErlFile = yrl_to_erl(File),
  7. Compiled = mad_compile:is_compiled(ErlFile,File),
  8. if Compiled == false ->
  9. yecc:file(File),
  10. mad_erl:compile(ErlFile,Inc,Bin,Opt,Deps); true -> false end.