ENH: use crazy temp files for long command lines

This commit is contained in:
Bill Hoffman 2001-11-15 18:18:45 -05:00
parent d2b84627de
commit 54f5d7994c
1 changed files with 5 additions and 3 deletions

View File

@ -304,14 +304,15 @@ void cmNMakeMakefileGenerator::OutputSharedLibraryRule(std::ostream& fout,
std::string depend = "$("; std::string depend = "$(";
depend += name; depend += name;
depend += "_SRC_OBJS) $(" + std::string(name) + "_DEPEND_LIBS)"; depend += "_SRC_OBJS) $(" + std::string(name) + "_DEPEND_LIBS)";
std::string command = "link /dll "; std::string command = "link /dll @<<\n";
command += "$(" + std::string(name) + "_SRC_OBJS) /out:"; command += "$(" + std::string(name) + "_SRC_OBJS) /out:";
command += m_LibraryOutputPath + std::string(name) + ".dll \\\n"; command += m_LibraryOutputPath + std::string(name) + ".dll ";
std::strstream linklibs; std::strstream linklibs;
this->OutputLinkLibraries(linklibs, name, t); this->OutputLinkLibraries(linklibs, name, t);
linklibs << std::ends; linklibs << std::ends;
command += linklibs.str(); command += linklibs.str();
delete [] linklibs.str(); delete [] linklibs.str();
command += "\n<<\n";
m_QuoteNextCommand = false; m_QuoteNextCommand = false;
this->OutputMakeRule(fout, "rules for a shared library", this->OutputMakeRule(fout, "rules for a shared library",
target.c_str(), target.c_str(),
@ -333,11 +334,12 @@ void cmNMakeMakefileGenerator::OutputStaticLibraryRule(std::ostream& fout,
std::string target = m_LibraryOutputPath + std::string(name) + ".lib"; std::string target = m_LibraryOutputPath + std::string(name) + ".lib";
std::string depend = "$("; std::string depend = "$(";
depend += std::string(name) + "_SRC_OBJS)"; depend += std::string(name) + "_SRC_OBJS)";
std::string command = "link -lib /nologo /out:"; std::string command = "link -lib @<<\n\t/nologo /out:";
command += m_LibraryOutputPath; command += m_LibraryOutputPath;
command += name; command += name;
command += ".lib $("; command += ".lib $(";
command += std::string(name) + "_SRC_OBJS)"; command += std::string(name) + "_SRC_OBJS)";
command += "\n<<\n";
std::string comment = "rule to build static library: "; std::string comment = "rule to build static library: ";
comment += name; comment += name;
m_QuoteNextCommand = false; m_QuoteNextCommand = false;