no message
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
package _VisualDVM.GlobalData.Makefile;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Utils.TextLog;
|
||||
import _VisualDVM.Utils;
|
||||
@@ -25,10 +25,10 @@ public class Makefile extends ModuleAnchestor {
|
||||
return Current.HasMachine() && (machine_id == Current.getMachine().id);
|
||||
}
|
||||
public LinkedHashMap<LanguageName, Module> getActiveModules() {
|
||||
return CommonUtils.db.getByFKAndGroupBy(this, Module.class, "language", LanguageName.class).values().stream().filter(Module::isSelected).collect(Collectors.toMap(module -> module.language, module -> module, (a, b) -> b, LinkedHashMap::new));
|
||||
return Utils_.db.getByFKAndGroupBy(this, Module.class, "language", LanguageName.class).values().stream().filter(Module::isSelected).collect(Collectors.toMap(module -> module.language, module -> module, (a, b) -> b, LinkedHashMap::new));
|
||||
}
|
||||
public LinkedHashMap<LanguageName, Module> getModules() {
|
||||
return CommonUtils.db.getByFKAndGroupBy(this, Module.class, "language", LanguageName.class);
|
||||
return Utils_.db.getByFKAndGroupBy(this, Module.class, "language", LanguageName.class);
|
||||
}
|
||||
public String Generate(db_project_info project, boolean useFilesOrder, LinkedHashMap<LanguageName, Module> modules) throws Exception {
|
||||
Compiler linker = getCompiler();
|
||||
@@ -37,7 +37,7 @@ public class Makefile extends ModuleAnchestor {
|
||||
Vector<String> titles = new Vector<>();
|
||||
Vector<String> objects = new Vector<>();
|
||||
Vector<String> bodies = new Vector<>();
|
||||
String binary = CommonUtils.DQuotes("0"); // Utils.DQuotes(project.name);
|
||||
String binary = Utils_.DQuotes("0"); // Utils.DQuotes(project.name);
|
||||
for (Module module : modules.values()) {
|
||||
//определить а активен ли модуль.
|
||||
//выбран ли он. есть ли у него компилятор. есть ли для него программы.
|
||||
@@ -61,7 +61,7 @@ public class Makefile extends ModuleAnchestor {
|
||||
for (DBProjectFile program : programsToAssembly) {
|
||||
//--
|
||||
program.last_assembly_name = module.language.toString() + "_" + i + ".o";
|
||||
String object = CommonUtils.DQuotes(program.last_assembly_name);
|
||||
String object = Utils_.DQuotes(program.last_assembly_name);
|
||||
module_objects.add(object);
|
||||
module_body +=
|
||||
object + ":\n" +
|
||||
@@ -78,7 +78,7 @@ public class Makefile extends ModuleAnchestor {
|
||||
++i;
|
||||
}
|
||||
titles.add(String.join("\n",
|
||||
LANG_ + "COMMAND=" + CommonUtils.DQuotes(module_compiler.call_command) + " " + module.command,
|
||||
LANG_ + "COMMAND=" + Utils_.DQuotes(module_compiler.call_command) + " " + module.command,
|
||||
LANG_ + "FLAGS=" + module.flags,
|
||||
LANG_ + "OBJECTS=" + String.join(" ", module_objects),
|
||||
""
|
||||
@@ -88,7 +88,7 @@ public class Makefile extends ModuleAnchestor {
|
||||
}
|
||||
}
|
||||
return String.join("\n",
|
||||
"LINK_COMMAND=" + CommonUtils.DQuotes(linker.call_command) + " " + command,
|
||||
"LINK_COMMAND=" + Utils_.DQuotes(linker.call_command) + " " + command,
|
||||
"LINK_FLAGS=" + flags + "\n",
|
||||
String.join("\n", titles),
|
||||
"all: " + binary,
|
||||
@@ -124,7 +124,7 @@ public class Makefile extends ModuleAnchestor {
|
||||
for (DBProjectFile program : programsToAssembly) {
|
||||
//--
|
||||
program.last_assembly_name = module.language.toString() + "_" + i + ".o";
|
||||
String object = CommonUtils.DQuotes(program.last_assembly_name);
|
||||
String object = Utils_.DQuotes(program.last_assembly_name);
|
||||
module_objects.add(object);
|
||||
module_body +=
|
||||
object + ":\n" +
|
||||
@@ -141,7 +141,7 @@ public class Makefile extends ModuleAnchestor {
|
||||
++i;
|
||||
}
|
||||
titles.add(String.join("\n",
|
||||
LANG_ + "COMMAND=" + CommonUtils.DQuotes(module_compiler.call_command) + " " + module.command,
|
||||
LANG_ + "COMMAND=" + Utils_.DQuotes(module_compiler.call_command) + " " + module.command,
|
||||
LANG_ + "FLAGS=" + module.flags,
|
||||
LANG_ + "OBJECTS=" + String.join(" ", module_objects),
|
||||
""
|
||||
@@ -159,7 +159,7 @@ public class Makefile extends ModuleAnchestor {
|
||||
//todo возможно улучшить
|
||||
//https://habr.com/ru/post/211751/
|
||||
public Machine getMachine() {
|
||||
return CommonUtils.db.getById(Machine.class, machine_id);
|
||||
return Utils_.db.getById(Machine.class, machine_id);
|
||||
}
|
||||
public boolean DependsToCompiler(Compiler compiler) {
|
||||
if (compiler_id == compiler.id) return true;
|
||||
@@ -178,7 +178,7 @@ public class Makefile extends ModuleAnchestor {
|
||||
if (linker.type.equals(CompilerType.dvm)) {
|
||||
if (!Current.getProject().languageName.getDVMLink().equals(command))
|
||||
Log.Writeln("команда линковки " +
|
||||
CommonUtils.Quotes(command) +
|
||||
Utils_.Quotes(command) +
|
||||
" не соответствует языку текущего проекта "
|
||||
+ Current.getProject().languageName.getDescription() + "\n" +
|
||||
"Используйте команду " + Current.getProject().languageName.getDVMLink());
|
||||
|
||||
Reference in New Issue
Block a user