|
|
@ -10,8 +10,9 @@ |
|
|
|
-define(onMSyncFun, onMSyncFun). |
|
|
|
-define(onCSyncFun, onCSyncFun). |
|
|
|
-define(swSyncNode, swSyncNode). |
|
|
|
-define(isJustMem, isJustMem). |
|
|
|
|
|
|
|
-define(DefCfgList, [{?Log, all}, {?compileCmd, undefined}, {?extraDirs, undefined}, {?descendant, fix}, {?onMSyncFun, undefined}, {?onCSyncFun, undefined}, {?swSyncNode, false}]). |
|
|
|
-define(DefCfgList, [{?Log, all}, {?compileCmd, undefined}, {?extraDirs, undefined}, {?descendant, fix}, {?onMSyncFun, undefined}, {?onCSyncFun, undefined}, {?swSyncNode, false}, {?isJustMem, false}]). |
|
|
|
|
|
|
|
-define(esCfgSync, esCfgSync). |
|
|
|
-define(rootSrcDir, <<"src">>). |
|
|
@ -798,7 +799,8 @@ recompileSrcFile(SrcFile, SwSyncNode) -> |
|
|
|
ignore; |
|
|
|
{ok, Options} -> |
|
|
|
RightFileDir = binary_to_list(filename:join(CurSrcDir, filename:basename(SrcFile))), |
|
|
|
case CompileFun(RightFileDir, [binary, return | Options]) of |
|
|
|
LastOptions = ?IIF(?esCfgSync:getv(?isJustMem), [binary, return | Options], [return | Options]), |
|
|
|
case CompileFun(RightFileDir, LastOptions) of |
|
|
|
{ok, Module, Binary, Warnings} -> |
|
|
|
printResults(Module, RightFileDir, [], Warnings), |
|
|
|
reloadIfNecessary(Module, OldBinary, Binary, Filename, SwSyncNode), |
|
|
@ -819,6 +821,9 @@ recompileSrcFile(SrcFile, SwSyncNode) -> |
|
|
|
{error, Errors, Warnings} -> |
|
|
|
printResults(Module, RightFileDir, Errors, Warnings), |
|
|
|
{ok, Errors, Warnings}; |
|
|
|
{ok, Module, Warnings} -> |
|
|
|
printResults(Module, RightFileDir, [], Warnings), |
|
|
|
{ok, [], Warnings}; |
|
|
|
_Err -> |
|
|
|
esUtils:logErrors("compile Mod:~s Errors Reason:~p", [Module, _Err]) |
|
|
|
end; |
|
|
|