diff --git a/Source/cmDSPMakefile.cxx b/Source/cmDSPMakefile.cxx index 5333d8866..3c2969c80 100644 --- a/Source/cmDSPMakefile.cxx +++ b/Source/cmDSPMakefile.cxx @@ -126,38 +126,6 @@ void cmDSPMakefile::CreateSingleDSP(const char *lname, cmTarget &target) } -void cmDSPMakefile::WriteDSPBuildRule(std::ostream& fout) -{ - std::string dspname = *(m_CreatedProjectNames.end()-1); - dspname += ".dsp"; - std::string makefileIn = "\""; - makefileIn += m_Makefile->GetStartDirectory(); - makefileIn += "/"; - makefileIn += "CMakeLists.txt\""; - std::string dsprule = "\""; - dsprule += m_Makefile->GetHomeDirectory(); - dsprule += "/CMake/Source/CMakeSetupCMD\" "; - dsprule += makefileIn; - dsprule += " -DSP -H\""; - dsprule += m_Makefile->GetHomeDirectory(); - dsprule += "\" -S\""; - dsprule += m_Makefile->GetStartDirectory(); - dsprule += "\" -O\""; - dsprule += m_Makefile->GetStartOutputDirectory(); - dsprule += "\" -B\""; - dsprule += m_Makefile->GetHomeOutputDirectory(); - dsprule += "\""; - - std::set depends; - std::set outputs; - outputs.insert(outputs.begin(), dspname); - fout << "# Begin Source File\n\n"; - fout << "SOURCE=" << makefileIn.c_str() << "\n\n"; - this->WriteCustomRule(fout, makefileIn.c_str(), dsprule.c_str(), depends, outputs); - fout << "# End Source File\n"; -} - - void cmDSPMakefile::AddDSPBuildRule(cmSourceGroup& sourceGroup) { std::string dspname = *(m_CreatedProjectNames.end()-1); @@ -166,9 +134,7 @@ void cmDSPMakefile::AddDSPBuildRule(cmSourceGroup& sourceGroup) makefileIn += m_Makefile->GetStartDirectory(); makefileIn += "/"; makefileIn += "CMakeLists.txt\""; - std::string dsprule = "\""; - dsprule += m_Makefile->GetHomeDirectory(); - dsprule += "/CMake/Source/CMakeSetupCMD\" "; + std::string dsprule = "${CMAKE} "; dsprule += makefileIn; dsprule += " -DSP -H\""; dsprule += m_Makefile->GetHomeDirectory(); @@ -179,6 +145,7 @@ void cmDSPMakefile::AddDSPBuildRule(cmSourceGroup& sourceGroup) dsprule += "\" -B\""; dsprule += m_Makefile->GetHomeOutputDirectory(); dsprule += "\""; + m_Makefile->ExpandVariablesInString(dsprule); std::vector outputs; outputs.push_back(dspname); diff --git a/Source/cmDSPMakefile.h b/Source/cmDSPMakefile.h index 109feb1cc..179d4854d 100644 --- a/Source/cmDSPMakefile.h +++ b/Source/cmDSPMakefile.h @@ -102,7 +102,6 @@ private: void WriteDSPHeader(std::ostream& fout, const char *libName, const cmTarget &tgt); - void WriteDSPBuildRule(std::ostream& fout); void WriteDSPFooter(std::ostream& fout); void AddDSPBuildRule(cmSourceGroup&); diff --git a/Source/cmDSPWriter.cxx b/Source/cmDSPWriter.cxx index 5333d8866..3c2969c80 100644 --- a/Source/cmDSPWriter.cxx +++ b/Source/cmDSPWriter.cxx @@ -126,38 +126,6 @@ void cmDSPMakefile::CreateSingleDSP(const char *lname, cmTarget &target) } -void cmDSPMakefile::WriteDSPBuildRule(std::ostream& fout) -{ - std::string dspname = *(m_CreatedProjectNames.end()-1); - dspname += ".dsp"; - std::string makefileIn = "\""; - makefileIn += m_Makefile->GetStartDirectory(); - makefileIn += "/"; - makefileIn += "CMakeLists.txt\""; - std::string dsprule = "\""; - dsprule += m_Makefile->GetHomeDirectory(); - dsprule += "/CMake/Source/CMakeSetupCMD\" "; - dsprule += makefileIn; - dsprule += " -DSP -H\""; - dsprule += m_Makefile->GetHomeDirectory(); - dsprule += "\" -S\""; - dsprule += m_Makefile->GetStartDirectory(); - dsprule += "\" -O\""; - dsprule += m_Makefile->GetStartOutputDirectory(); - dsprule += "\" -B\""; - dsprule += m_Makefile->GetHomeOutputDirectory(); - dsprule += "\""; - - std::set depends; - std::set outputs; - outputs.insert(outputs.begin(), dspname); - fout << "# Begin Source File\n\n"; - fout << "SOURCE=" << makefileIn.c_str() << "\n\n"; - this->WriteCustomRule(fout, makefileIn.c_str(), dsprule.c_str(), depends, outputs); - fout << "# End Source File\n"; -} - - void cmDSPMakefile::AddDSPBuildRule(cmSourceGroup& sourceGroup) { std::string dspname = *(m_CreatedProjectNames.end()-1); @@ -166,9 +134,7 @@ void cmDSPMakefile::AddDSPBuildRule(cmSourceGroup& sourceGroup) makefileIn += m_Makefile->GetStartDirectory(); makefileIn += "/"; makefileIn += "CMakeLists.txt\""; - std::string dsprule = "\""; - dsprule += m_Makefile->GetHomeDirectory(); - dsprule += "/CMake/Source/CMakeSetupCMD\" "; + std::string dsprule = "${CMAKE} "; dsprule += makefileIn; dsprule += " -DSP -H\""; dsprule += m_Makefile->GetHomeDirectory(); @@ -179,6 +145,7 @@ void cmDSPMakefile::AddDSPBuildRule(cmSourceGroup& sourceGroup) dsprule += "\" -B\""; dsprule += m_Makefile->GetHomeOutputDirectory(); dsprule += "\""; + m_Makefile->ExpandVariablesInString(dsprule); std::vector outputs; outputs.push_back(dspname); diff --git a/Source/cmDSPWriter.h b/Source/cmDSPWriter.h index 109feb1cc..179d4854d 100644 --- a/Source/cmDSPWriter.h +++ b/Source/cmDSPWriter.h @@ -102,7 +102,6 @@ private: void WriteDSPHeader(std::ostream& fout, const char *libName, const cmTarget &tgt); - void WriteDSPBuildRule(std::ostream& fout); void WriteDSPFooter(std::ostream& fout); void AddDSPBuildRule(cmSourceGroup&);