ENH: fix for win98 check for directory existence

This commit is contained in:
Bill Hoffman 2001-12-20 17:00:52 -05:00
parent 450b229c48
commit 5291b7d025
2 changed files with 11 additions and 1 deletions

View File

@ -100,6 +100,11 @@ void cmBorlandMakefileGenerator::OutputMakeVariables(std::ostream& fout)
"CMAKE_SHLIB_SUFFIX = @CMAKE_SHLIB_SUFFIX@\n" "CMAKE_SHLIB_SUFFIX = @CMAKE_SHLIB_SUFFIX@\n"
"CMAKE_LINKER_FLAGS = @CMAKE_LINKER_FLAGS@ @LINKER_BUILD_FLAGS@\n" "CMAKE_LINKER_FLAGS = @CMAKE_LINKER_FLAGS@ @LINKER_BUILD_FLAGS@\n"
"CMAKE_CXX_FLAGS = -P @CMAKE_CXX_FLAGS@ @BUILD_FLAGS@\n" "CMAKE_CXX_FLAGS = -P @CMAKE_CXX_FLAGS@ @BUILD_FLAGS@\n"
"!IF \"$(OS)\" == \"Windows_NT\"\n"
"NULL=\n"
"!ELSE \n"
"NULL=nul\n"
"!ENDIF \n"
"RM = del\n"; "RM = del\n";
std::string buildType = "CMAKE_CXX_FLAGS_"; std::string buildType = "CMAKE_CXX_FLAGS_";
buildType += m_Makefile->GetDefinition("CMAKE_BUILD_TYPE"); buildType += m_Makefile->GetDefinition("CMAKE_BUILD_TYPE");

View File

@ -157,6 +157,11 @@ void cmNMakeMakefileGenerator::OutputMakeVariables(std::ostream& fout)
"CMAKE_EXECUTABLE_SUFFIX = @CMAKE_EXECUTABLE_SUFFIX@\n" "CMAKE_EXECUTABLE_SUFFIX = @CMAKE_EXECUTABLE_SUFFIX@\n"
"CMAKE_STATICLIB_SUFFIX = @CMAKE_STATICLIB_SUFFIX@\n" "CMAKE_STATICLIB_SUFFIX = @CMAKE_STATICLIB_SUFFIX@\n"
"CMAKE_SHLIB_SUFFIX = @CMAKE_SHLIB_SUFFIX@\n" "CMAKE_SHLIB_SUFFIX = @CMAKE_SHLIB_SUFFIX@\n"
"!IF \"$(OS)\" == \"Windows_NT\"\n"
"NULL=\n"
"!ELSE \n"
"NULL=nul\n"
"!ENDIF \n"
"RM = del\n"; "RM = del\n";
std::string buildType = "CMAKE_CXX_FLAGS_"; std::string buildType = "CMAKE_CXX_FLAGS_";
@ -241,7 +246,7 @@ void cmNMakeMakefileGenerator::BuildInSubDirectory(std::ostream& fout,
std::string dir = directory; std::string dir = directory;
cmSystemTools::ConvertToWindowsSlashes(dir); cmSystemTools::ConvertToWindowsSlashes(dir);
dir = cmSystemTools::EscapeSpaces(dir.c_str()); dir = cmSystemTools::EscapeSpaces(dir.c_str());
fout << "\tif not exist " << dir fout << "\tif not exist \"" << dir << "\\$(NULL)\""
<< " " << " "
<< "$(MAKE) $(MAKESILENT) rebuild_cache\n" << "$(MAKE) $(MAKESILENT) rebuild_cache\n"
<< "\techo Building " << target1 << " in directory " << directory << "\n" << "\techo Building " << target1 << " in directory " << directory << "\n"