private static GeneralCommandLine getErlcCommandLine(ErlangTarget target,
CompileContext context,
ErlangCompilerOptions compilerOptions,
File outputDirectory) throws ProjectBuildException {
GeneralCommandLine commandLine = new GeneralCommandLine();
JpsModule module = target.getModule();
JpsSdk<JpsDummyElement> sdk = getSdk(context, module);
File executable = JpsErlangSdkType.getByteCodeCompilerExecutable(sdk.getHomePath());
List<String> erlangModulePaths = getErlangModulePaths(module, target, context);
commandLine.setWorkDirectory(outputDirectory);
commandLine.setExePath(executable.getAbsolutePath());
addCodePath(commandLine, module, target, context);
addParseTransforms(commandLine, module);
addDebugInfo(commandLine, erlangModulePaths, outputDirectory, compilerOptions.myAddDebugInfoEnabled);
addIncludePaths(commandLine, module);
addMacroDefinitions(commandLine, target);
commandLine.addParameters(erlangModulePaths);
return commandLine;
}