Browse Source

fix building unknown nodules

Maxim Sokhatsky 10 years ago
parent
commit
b5393de5ea
2 changed files with 4 additions and 1 deletions
  1. 2 0
      src/compile/mad_script.erl
  2. 2 1
      src/mad_compile.erl

+ 2 - 0
src/compile/mad_script.erl

@@ -9,3 +9,5 @@ script(ConfigFile, Conf, _) ->
         {ok, Out} -> Out;
         {ok, Out} -> Out;
         {error, _} -> Conf
         {error, _} -> Conf
     end.
     end.
+
+compile(_,_,_,_) -> ok.

+ 2 - 1
src/mad_compile.erl

@@ -56,7 +56,8 @@ compile_fun(Inc,Bin,Opt) -> fun(File) -> (module(filetype(File))):compile(File,I
 module("erl") -> mad_erl;
 module("erl") -> mad_erl;
 module("erl.src") -> mad_utils;
 module("erl.src") -> mad_utils;
 module("yrl") -> mad_yecc;
 module("yrl") -> mad_yecc;
-module("app.src") -> mad_app.
+module("app.src") -> mad_app;
+module(_) -> mad_script.
 
 
 filetype(Path) -> string:join(tl(string:tokens(filename:basename(Path), ".")), ".").
 filetype(Path) -> string:join(tl(string:tokens(filename:basename(Path), ".")), ".").
 files(Dir,Ext) -> filelib:fold_files(Dir, Ext, true, fun(F, Acc) -> [F|Acc] end, []).
 files(Dir,Ext) -> filelib:fold_files(Dir, Ext, true, fun(F, Acc) -> [F|Acc] end, []).