From cd351ef2c427284eea0ab494eba5d4f24bc0e050 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 27 Aug 2016 13:44:53 +0200 Subject: [PATCH] Makefiles: Deduplicate variable --- Source/cmLocalUnixMakefileGenerator3.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 824d4b89a..f2ef5c81e 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -638,19 +638,20 @@ void cmLocalUnixMakefileGenerator3::WriteMakeVariables( #endif } + std::string cmakeShellCommand = this->ConvertShellCommand( + cmSystemTools::GetCMakeCommand(), cmOutputConverter::FULL); + /* clang-format off */ makefileStream << "# The CMake executable.\n" << "CMAKE_COMMAND = " - << this->ConvertShellCommand(cmSystemTools::GetCMakeCommand(), - cmOutputConverter::FULL) + << cmakeShellCommand << "\n" << "\n"; makefileStream << "# The command to remove a file.\n" << "RM = " - << this->ConvertShellCommand(cmSystemTools::GetCMakeCommand(), - cmOutputConverter::FULL) + << cmakeShellCommand << " -E remove -f\n" << "\n"; makefileStream