1. Benoit Chesneau
  2. erlydtl

Commits

rsa...@a5195066-8e3e-0410-a82a-05b01b1b9875  committed 71d2772

recompile always if debug compile custom flag is set

  • Participants
  • Parent commits 0cdaafc
  • Branches default

Comments (0)

Files changed (1)

File src/erlydtl/erlydtl_compiler.erl

View file
 -author('rsaccon@gmail.com').
 -author('emmiller@gmail.com').
 
+-ifdef(debug). 
+-define(RECOMPILE_ALWAYS, true). 
+-else. 
+-define(RECOMPILE_ALWAYS, false). 
+-endif.
+
 -export([compile/2, compile/3, compile/4, compile/5, compile/6,compile/7]).
 
 -record(dtl_context, {
     end.
     
 
-is_up_to_date(CheckSum, Module, {M, F}) ->
+is_up_to_date(_, _, _, true) ->
+    false;
+is_up_to_date(CheckSum, Module, {M, F}, _) ->
     case catch Module:source() of
         {_, CheckSum} -> 
             case catch Module:dependencies() of
   
         
 parse(CheckSum, Module, Data, Reader) ->
-    case is_up_to_date(CheckSum, Module, Reader) of
-        true_ignoring_for_now ->  %% it works, but is disabled, to enable change to 'true' 
+    case is_up_to_date(CheckSum, Module, Reader, ?RECOMPILE_ALWAYS) of
+        true ->
             ok;
         _ ->
             case parse(Data) of