Skip to content

Commit 5c2ad06

Browse files
author
Samat Gaynutdinov
committed
refactor: make uppercase
1 parent 43aabdf commit 5c2ad06

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

server/src/printers/NativeMakefilePrinter.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ namespace printer {
108108
buildDirectory(Paths::getUtbotBuildDir(projectContext)),
109109
buildDirectoryRelative(Paths::getRelativeUtbotBuildDir(projectContext)),
110110
dependencyDirectory(buildDirectory / "dependencies"),
111-
pathToShellVariable({{buildDirectory, "$(build_dir)"},
112-
{projectContext.projectPath, "$(project_dir)"},
113-
{buildDirectoryRelative, "$(build_relative)"}},
111+
pathToShellVariable({{buildDirectory, "$(BUILD_DIR)"},
112+
{projectContext.projectPath, "$(PROJECT_DIR)"},
113+
{buildDirectoryRelative, "$(BUILD_RELATIVE)"}},
114114
comparator
115115
),
116116
stubSources(stubSources) {
@@ -134,29 +134,29 @@ namespace printer {
134134

135135
declareShellVariable("UTBOT_INSTALL", Paths::getUTBotInstallDir(), declareVariableFunc);
136136

137-
declareShellVariable("access_privateLib", Paths::getAccessPrivateLibPath(), declareVariableFunc);
137+
declareShellVariable("ACCESS_PRIVATE_LIB", Paths::getAccessPrivateLibPath(), declareVariableFunc);
138138

139-
declareShellVariable("utbotDebsInstallDir", Paths::getUTBotDebsInstallDir(), declareVariableFunc);
139+
declareShellVariable("UTBOT_DEBS_INSTALL_DIR", Paths::getUTBotDebsInstallDir(), declareVariableFunc);
140140

141-
declareShellVariable("asanLib", Paths::getAsanLibraryPath(), declareVariableFunc);
141+
declareShellVariable("ASAN_LIB", Paths::getAsanLibraryPath(), declareVariableFunc);
142142

143-
declareShellVariable("clang", Paths::getUTBotClang(), declareVariableWithPriorityFunc, false, false);
143+
declareShellVariable("CLANG", Paths::getUTBotClang(), declareVariableWithPriorityFunc, false, false);
144144

145-
declareShellVariable("clangxx", Paths::getUTBotClangPP(), declareVariableWithPriorityFunc, false, false);
145+
declareShellVariable("CLANGXX", Paths::getUTBotClangPP(), declareVariableWithPriorityFunc, false, false);
146146

147-
pathToShellVariable[Paths::getUTBotClang()] = StringUtils::stringFormat("$(%s)", "clang");
148-
pathToShellVariable[Paths::getUTBotClangPP()] = StringUtils::stringFormat("$(%s)", "clangxx");
147+
pathToShellVariable[Paths::getUTBotClang()] = StringUtils::stringFormat("$(%s)", "CLANG");
148+
pathToShellVariable[Paths::getUTBotClangPP()] = StringUtils::stringFormat("$(%s)", "CLANGXX");
149149

150-
declareShellVariable("gcc", Paths::getGcc(), declareVariableFunc);
151-
declareShellVariable("gxx", Paths::getGpp(), declareVariableFunc);
150+
declareShellVariable("GCC", Paths::getGcc(), declareVariableFunc);
151+
declareShellVariable("GXX", Paths::getGpp(), declareVariableFunc);
152152

153-
declareShellVariable("ar", Paths::getAr(), declareVariableIfNotDefinedFunc);
153+
declareShellVariable("AR", Paths::getAr(), declareVariableIfNotDefinedFunc);
154154

155-
declareShellVariable("ldGold", Paths::getLdGold(), declareVariableIfNotDefinedFunc);
155+
declareShellVariable("LD_GOLD", Paths::getLdGold(), declareVariableIfNotDefinedFunc);
156156

157-
declareShellVariable("ld", Paths::getLd(), declareVariableIfNotDefinedFunc);
157+
declareShellVariable("LD", Paths::getLd(), declareVariableIfNotDefinedFunc);
158158

159-
declareShellVariable("gtest", Paths::getGtestLibPath(), declareVariableWithPriorityFunc);
159+
declareShellVariable("GTEST", Paths::getGtestLibPath(), declareVariableWithPriorityFunc);
160160

161161
declareAction(stringFormat("$(shell mkdir -p %s >/dev/null)", getRelativePath(buildDirectory)));
162162
declareAction(stringFormat("$(shell mkdir -p %s >/dev/null)",

server/src/printers/TestMakefilesPrinter.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ namespace printer {
7474
fs::path sharedMakefilePath = getMakefilePathForShared(generalMakefilePath);
7575
fs::path objMakefilePath = getMakefilePathForObject(generalMakefilePath);
7676

77-
generalMakefilePrinter.declareVariable("export project_dir_relative_to_makefile",
77+
generalMakefilePrinter.declareVariable("export PROJECT_DIR_RELATIVE_TO_MAKEFILE",
7878
fs::relative(projectContext.projectPath, path));
7979
// magic spell from https://stackoverflow.com/questions/18136918/how-to-get-current-relative-directory-of-your-makefile
80-
generalMakefilePrinter.declareVariable("export makefile_dir", "$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))");
81-
generalMakefilePrinter.declareVariable("export project_dir",
82-
StringUtils::stringFormat("%s/%s", "$(makefile_dir)", "$(project_dir_relative_to_makefile)"));
83-
generalMakefilePrinter.declareVariable("export build_relative", objMakefilePrinter.buildDirectoryRelative);
84-
generalMakefilePrinter.declareVariable("export build_dir", StringUtils::stringFormat("%s/%s",
80+
generalMakefilePrinter.declareVariable("export MAKEFILE_DIR", "$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))");
81+
generalMakefilePrinter.declareVariable("export PROJECT_DIR",
82+
StringUtils::stringFormat("%s/%s", "$(MAKEFILE_DIR)", "$(project_dir_relative_to_makefile)"));
83+
generalMakefilePrinter.declareVariable("export BUILD_RELATIVE", objMakefilePrinter.buildDirectoryRelative);
84+
generalMakefilePrinter.declareVariable("export BUILD_DIR", StringUtils::stringFormat("%s/%s",
8585
objMakefilePrinter.getRelativePath(projectContext.projectPath),
8686
objMakefilePrinter.getRelativePath(objMakefilePrinter.buildDirectoryRelative)));
8787

0 commit comments

Comments
 (0)