[Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt 1.397.2.4 1.397.2.5 cmAddCustomTargetCommand.cxx 1.37 1.37.2.1 cmAddCustomTargetCommand.h 1.22 1.22.2.1 cmCTest.cxx 1.334 1.334.2.1 cmCallVisualStudioMacro.cxx 1.3.2.1 1.3.2.2 cmCommand.h 1.27 1.27.2.1 cmComputeLinkInformation.cxx 1.24.2.10 1.24.2.11 cmComputeLinkInformation.h 1.15.2.3 1.15.2.4 cmDependsJavaLexer.cxx 1.12 1.12.2.1 cmDependsJavaLexer.h 1.5 1.5.2.1 cmDocumentation.cxx 1.69.2.2 1.69.2.3 cmDocumentation.h 1.33.2.1 1.33.2.2 cmDocumentationFormatter.cxx 1.1.2.2 1.1.2.3 cmDocumentationFormatter.h 1.8.2.1 1.8.2.2 cmDocumentationFormatterDocbook.cxx 1.1.2.2 1.1.2.3 cmDocumentationFormatterDocbook.h 1.1 1.1.2.1 cmDocumentationFormatterHTML.cxx 1.11.2.2 1.11.2.3 cmDocumentationFormatterHTML.h 1.3 1.3.2.1 cmDocumentationFormatterMan.cxx 1.5 1.5.2.1 cmDocumentationFormatterMan.h 1.2 1.2.2.1 cmEnableLanguageCommand.cxx 1.5 1.5.2.1 cmFindBase.cxx 1.35.2.4 1.35.2.5 cmFindCommon.cxx 1.1.2.1 1.1.2.2 cmFindLibraryCommand.cxx 1.58.2.1 1.58.2.2 cmFindPackageCommand.cxx 1.36.2.4 1.36.2.5 cmGlobalGenerator.cxx 1.227.2.7 1.227.2.8 cmGlobalGenerator.h 1.107.2.5 1.107.2.6 cmGlobalNMakeMakefileGenerator.cxx 1.26 1.26.2.1 cmGlobalVisualStudio71Generator.cxx 1.48.2.1 1.48.2.2 cmGlobalVisualStudio7Generator.cxx 1.99.2.2 1.99.2.3 cmGlobalXCodeGenerator.cxx 1.186.2.8 1.186.2.9 cmGlobalXCodeGenerator.h 1.52.2.1 1.52.2.2 cmIfCommand.cxx 1.84.2.3 1.84.2.4 cmIfCommand.h 1.46.2.3 1.46.2.4 cmInstallCommand.cxx 1.45.2.3 1.45.2.4 cmInstallTargetGenerator.cxx 1.62.2.3 1.62.2.4 cmInstallTargetGenerator.h 1.24.2.2 1.24.2.3 cmListFileCache.cxx 1.41.2.3 1.41.2.4 cmListFileCache.h 1.21 1.21.2.1 cmLocalGenerator.cxx 1.269.2.7 1.269.2.8 cmLocalGenerator.h 1.103.2.1 1.103.2.2 cmLocalUnixMakefileGenerator3.cxx 1.240.2.6 1.240.2.7 cmLocalUnixMakefileGenerator3.h 1.82 1.82.2.1 cmLocalVisualStudio7Generator.cxx 1.217.2.11 1.217.2.12 cmMacroCommand.cxx 1.36 1.36.2.1 cmMakefile.cxx 1.463.2.8 1.463.2.9 cmMakefile.h 1.230.2.4 1.230.2.5 cmMakefileExecutableTargetGenerator.cxx 1.46.2.2 1.46.2.3 cmMakefileLibraryTargetGenerator.cxx 1.58.2.4 1.58.2.5 cmMakefileTargetGenerator.cxx 1.93.2.6 1.93.2.7 cmMakefileTargetGenerator.h 1.24.2.1 1.24.2.2 cmOutputRequiredFilesCommand.cxx 1.16 1.16.2.1 cmPolicies.cxx 1.20.2.8 1.20.2.9 cmPolicies.h 1.10.2.6 1.10.2.7 cmSetTargetPropertiesCommand.h 1.31 1.31.2.1 cmSourceFile.cxx 1.47.2.3 1.47.2.4 cmSystemTools.cxx 1.368.2.6 1.368.2.7 cmTarget.cxx 1.207.2.10 1.207.2.11 cmWhileCommand.cxx 1.12 1.12.2.1 cmake.cxx 1.375.2.13 1.375.2.14 cmakemain.cxx 1.80.2.3 1.80.2.4

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Oct 24 11:18:57 EDT 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv25234/Source

Modified Files:
      Tag: CMake-2-6
	CMakeLists.txt cmAddCustomTargetCommand.cxx 
	cmAddCustomTargetCommand.h cmCTest.cxx 
	cmCallVisualStudioMacro.cxx cmCommand.h 
	cmComputeLinkInformation.cxx cmComputeLinkInformation.h 
	cmDependsJavaLexer.cxx cmDependsJavaLexer.h 
	cmDocumentation.cxx cmDocumentation.h 
	cmDocumentationFormatter.cxx cmDocumentationFormatter.h 
	cmDocumentationFormatterDocbook.cxx 
	cmDocumentationFormatterDocbook.h 
	cmDocumentationFormatterHTML.cxx 
	cmDocumentationFormatterHTML.h cmDocumentationFormatterMan.cxx 
	cmDocumentationFormatterMan.h cmEnableLanguageCommand.cxx 
	cmFindBase.cxx cmFindCommon.cxx cmFindLibraryCommand.cxx 
	cmFindPackageCommand.cxx cmGlobalGenerator.cxx 
	cmGlobalGenerator.h cmGlobalNMakeMakefileGenerator.cxx 
	cmGlobalVisualStudio71Generator.cxx 
	cmGlobalVisualStudio7Generator.cxx cmGlobalXCodeGenerator.cxx 
	cmGlobalXCodeGenerator.h cmIfCommand.cxx cmIfCommand.h 
	cmInstallCommand.cxx cmInstallTargetGenerator.cxx 
	cmInstallTargetGenerator.h cmListFileCache.cxx 
	cmListFileCache.h cmLocalGenerator.cxx cmLocalGenerator.h 
	cmLocalUnixMakefileGenerator3.cxx 
	cmLocalUnixMakefileGenerator3.h 
	cmLocalVisualStudio7Generator.cxx cmMacroCommand.cxx 
	cmMakefile.cxx cmMakefile.h 
	cmMakefileExecutableTargetGenerator.cxx 
	cmMakefileLibraryTargetGenerator.cxx 
	cmMakefileTargetGenerator.cxx cmMakefileTargetGenerator.h 
	cmOutputRequiredFilesCommand.cxx cmPolicies.cxx cmPolicies.h 
	cmSetTargetPropertiesCommand.h cmSourceFile.cxx 
	cmSystemTools.cxx cmTarget.cxx cmWhileCommand.cxx cmake.cxx 
	cmakemain.cxx 
Log Message:
ENH: merge in changes for 2.6.3 RC 1


Index: cmLocalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v
retrieving revision 1.217.2.11
retrieving revision 1.217.2.12
diff -C 2 -d -r1.217.2.11 -r1.217.2.12
*** cmLocalVisualStudio7Generator.cxx	12 Sep 2008 14:56:21 -0000	1.217.2.11
--- cmLocalVisualStudio7Generator.cxx	24 Oct 2008 15:18:52 -0000	1.217.2.12
***************
*** 703,707 ****
        }
      fout << "\t\t\t\tModulePath=\"" 
!          << this->ConvertToXMLOutputPath(modDir.c_str()) << "\\$(ConfigurationName)\"\n";
      }
    targetOptions.OutputAdditionalOptions(fout, "\t\t\t\t", "\n");
--- 703,708 ----
        }
      fout << "\t\t\t\tModulePath=\"" 
!          << this->ConvertToXMLOutputPath(modDir.c_str())
!          << "\\$(ConfigurationName)\"\n";
      }
    targetOptions.OutputAdditionalOptions(fout, "\t\t\t\t", "\n");
***************
*** 1832,1835 ****
--- 1833,1856 ----
      keyword = "Win32Proj";
      }
+   const char* vsProjectname = target.GetProperty("VS_SCC_PROJECTNAME");
+   if (!vsProjectname)
+     {
+     vsProjectname = "";
+     }
+   const char* vsLocalpath = target.GetProperty("VS_SCC_LOCALPATH");
+   if (!vsLocalpath)
+     {
+     vsLocalpath = "";
+     }
+   const char* vsProvider = target.GetProperty("VS_SCC_PROVIDER");
+   std::string providerString;
+   if (!vsProvider)
+     {
+     providerString = "";
+     }
+   else
+     {
+     providerString = "\tSccProvider=\"" + std::string(vsProvider) + "\"\n";
+     }
    cmGlobalVisualStudio7Generator* gg =
      static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator);
***************
*** 1839,1845 ****
      fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n";
      }
!   fout << "\tSccProjectName=\"\"\n"
!        << "\tSccLocalPath=\"\"\n"
!        << "\tKeyword=\"" << keyword << "\">\n"
         << "\t<Platforms>\n"
         << "\t\t<Platform\n\t\t\tName=\"" << this->PlatformName << "\"/>\n"
--- 1860,1872 ----
      fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n";
      }
!   // if we have all the required Source code control tags
!   // then add that to the project
!   if(vsProvider && vsLocalpath && vsProjectname)
!     {
!     fout << "\tSccProjectName=\"" << vsProjectname << "\"\n"
!          << "\tSccLocalPath=\"" << vsLocalpath << "\"\n"
!          << "\tSccProvider=\"" << providerString << "\"\n";
!     }
!   fout << "\tKeyword=\"" << keyword << "\">\n"
         << "\t<Platforms>\n"
         << "\t\t<Platform\n\t\t\tName=\"" << this->PlatformName << "\"/>\n"

Index: cmDocumentationFormatterHTML.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatterHTML.cxx,v
retrieving revision 1.11.2.2
retrieving revision 1.11.2.3
diff -C 2 -d -r1.11.2.2 -r1.11.2.3
*** cmDocumentationFormatterHTML.cxx	22 Jul 2008 18:04:24 -0000	1.11.2.2
--- cmDocumentationFormatterHTML.cxx	24 Oct 2008 15:18:46 -0000	1.11.2.3
***************
*** 203,210 ****
  
  //----------------------------------------------------------------------------
! void cmDocumentationFormatterHTML::PrintHeader(const char* /*name*/, 
                                                 std::ostream& os)
  {
!   os << "<html><body>\n";
  }
  
--- 203,213 ----
  
  //----------------------------------------------------------------------------
! void cmDocumentationFormatterHTML::PrintHeader(const char* docname,
!                                                const char* appname,
                                                 std::ostream& os)
  {
!   os << "<html><head><title>";
!   os << docname << " - " << appname;
!   os << "</title></head><body>\n";
  }
  

Index: cmFindBase.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindBase.cxx,v
retrieving revision 1.35.2.4
retrieving revision 1.35.2.5
diff -C 2 -d -r1.35.2.4 -r1.35.2.5
*** cmFindBase.cxx	13 Jun 2008 12:55:17 -0000	1.35.2.4
--- cmFindBase.cxx	24 Oct 2008 15:18:46 -0000	1.35.2.5
***************
*** 62,67 ****
      "to list the system path variable. The argument "
      "after DOC will be used for the documentation string in "
!     "the cache.  PATH_SUFFIXES can be used to give sub directories "
!     "that will be appended to the search paths.\n"
      "If NO_DEFAULT_PATH is specified, then no additional paths are "
      "added to the search. "
--- 62,69 ----
      "to list the system path variable. The argument "
      "after DOC will be used for the documentation string in "
!     "the cache.  "
!     "PATH_SUFFIXES specifies additional subdirectories to check below "
!     "each search path."
!     "\n"
      "If NO_DEFAULT_PATH is specified, then no additional paths are "
      "added to the search. "
***************
*** 490,500 ****
        paths.push_back(p);
        }
!     }
!   // now put the path without the path suffixes in the SearchPaths
!   for(i = finalPath.begin();
!       i != finalPath.end(); ++i)
!     {
!     // put all search paths in because it may later be replaced
!     // by lib64 stuff fixes bug 4009
      paths.push_back(*i);
      }
--- 492,496 ----
        paths.push_back(p);
        }
!     // now put the path without the path suffixes in the SearchPaths
      paths.push_back(*i);
      }

Index: cmPolicies.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.cxx,v
retrieving revision 1.20.2.8
retrieving revision 1.20.2.9
diff -C 2 -d -r1.20.2.8 -r1.20.2.9
*** cmPolicies.cxx	12 Sep 2008 14:56:21 -0000	1.20.2.8
--- cmPolicies.cxx	24 Oct 2008 15:18:54 -0000	1.20.2.9
***************
*** 324,327 ****
--- 324,339 ----
      "argument to the FILE command.",
      2,6,2, cmPolicies::WARN);
+ 
+   this->DefinePolicy(
+     CMP0010, "CMP0010",
+     "Bad variable reference syntax is an error.",
+     "In CMake 2.6.2 and below, incorrect variable reference syntax such as "
+     "a missing close-brace (\"${FOO\") was reported but did not stop "
+     "processing of CMake code.  "
+     "This policy determines whether a bad variable reference is an error.  "
+     "The OLD behavior for this policy is to warn about the error, leave "
+     "the string untouched, and continue. "
+     "The NEW behavior for this policy is to report an error.",
+     2,6,3, cmPolicies::WARN);
  }
  

Index: cmIfCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmIfCommand.cxx,v
retrieving revision 1.84.2.3
retrieving revision 1.84.2.4
diff -C 2 -d -r1.84.2.3 -r1.84.2.4
*** cmIfCommand.cxx	12 Sep 2008 14:56:21 -0000	1.84.2.3
--- cmIfCommand.cxx	24 Oct 2008 15:18:48 -0000	1.84.2.4
***************
*** 22,27 ****
  #include <cmsys/RegularExpression.hxx>
  
  bool cmIfFunctionBlocker::
! IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
                    cmExecutionStatus &inStatus)
  {
--- 22,29 ----
  #include <cmsys/RegularExpression.hxx>
  
+ //=========================================================================
[...970 lines suppressed...]
!   else
!     {
!     errorString = "Unknown arguments specified";
!     return false;
!     }
!     
    return true;
  }
  
+ //=========================================================================
  const char* cmIfCommand::GetVariableOrString(const char* str,
                                               const cmMakefile* mf)
***************
*** 773,776 ****
--- 799,803 ----
  }
  
+ //=========================================================================
  const char* cmIfCommand::GetVariableOrNumber(const char* str,
                                               const cmMakefile* mf)

Index: cmIfCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmIfCommand.h,v
retrieving revision 1.46.2.3
retrieving revision 1.46.2.4
diff -C 2 -d -r1.46.2.3 -r1.46.2.4
*** cmIfCommand.h	12 Sep 2008 14:56:21 -0000	1.46.2.3
--- cmIfCommand.h	24 Oct 2008 15:18:48 -0000	1.46.2.4
***************
*** 192,196 ****
    // an error, the errorString will be set.
    static bool IsTrue(const std::vector<std::string> &args, 
!     char** errorString, cmMakefile *mf);
    
    // Get a definition from the makefile.  If it doesn't exist,
--- 192,196 ----
    // an error, the errorString will be set.
    static bool IsTrue(const std::vector<std::string> &args, 
!     std::string &errorString, cmMakefile *mf);
    
    // Get a definition from the makefile.  If it doesn't exist,

Index: cmGlobalVisualStudio71Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio71Generator.cxx,v
retrieving revision 1.48.2.1
retrieving revision 1.48.2.2
diff -C 2 -d -r1.48.2.1 -r1.48.2.2
*** cmGlobalVisualStudio71Generator.cxx	1 May 2008 16:35:39 -0000	1.48.2.1
--- cmGlobalVisualStudio71Generator.cxx	24 Oct 2008 15:18:46 -0000	1.48.2.2
***************
*** 156,160 ****
    // check to see if this is a fortran build
    const char* ext = ".vcproj";
!   const char* project = "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"";
    if(this->TargetIsFortranOnly(t))
      {
--- 156,161 ----
    // check to see if this is a fortran build
    const char* ext = ".vcproj";
!   const char* project = 
!     "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"";
    if(this->TargetIsFortranOnly(t))
      {

Index: cmAddCustomTargetCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmAddCustomTargetCommand.cxx,v
retrieving revision 1.37
retrieving revision 1.37.2.1
diff -C 2 -d -r1.37 -r1.37.2.1
*** cmAddCustomTargetCommand.cxx	7 Mar 2008 22:05:06 -0000	1.37
--- cmAddCustomTargetCommand.cxx	24 Oct 2008 15:18:45 -0000	1.37.2.1
***************
*** 56,59 ****
--- 56,60 ----
    std::string comment_buffer;
    const char* comment = 0;
+   std::vector<std::string> sources;
  
    // Keep track of parser state.
***************
*** 63,66 ****
--- 64,68 ----
      doing_working_directory,
      doing_comment,
+     doing_source,
      doing_verbatim
    };
***************
*** 112,115 ****
--- 114,121 ----
          }
        }
+     else if(copy == "SOURCES")
+       {
+       doing = doing_source;
+       }
      else
        {
***************
*** 129,132 ****
--- 135,141 ----
             comment = comment_buffer.c_str();
             break;
+         case doing_source:
+           sources.push_back(copy);
+           break;
          default:
            this->SetError("Wrong syntax. Unknown type of argument.");
***************
*** 165,171 ****
    // Add the utility target to the makefile.
    bool escapeOldStyle = !verbatim;
!   this->Makefile->AddUtilityCommand(args[0].c_str(), excludeFromAll,
!                                     working_directory.c_str(), depends,
!                                     commandLines, escapeOldStyle, comment);
  
    return true;
--- 174,184 ----
    // Add the utility target to the makefile.
    bool escapeOldStyle = !verbatim;
!   cmTarget* target =
!     this->Makefile->AddUtilityCommand(args[0].c_str(), excludeFromAll,
!                                       working_directory.c_str(), depends,
!                                       commandLines, escapeOldStyle, comment);
! 
!   // Add additional user-specified source files to the target.
!   target->AddSources(sources);
  
    return true;

Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.368.2.6
retrieving revision 1.368.2.7
diff -C 2 -d -r1.368.2.6 -r1.368.2.7
*** cmSystemTools.cxx	3 Sep 2008 13:43:18 -0000	1.368.2.6
--- cmSystemTools.cxx	24 Oct 2008 15:18:54 -0000	1.368.2.7
***************
*** 933,936 ****
--- 933,937 ----
        }
      output += buffer;
+     buffer[0] = 0;
      fgets(buffer, BUFFER_SIZE, cpipe);
      }
***************
*** 972,975 ****
--- 973,977 ----
          break;
  #endif
+ #ifndef __HAIKU__
  #ifdef SIGBUS
        case SIGBUS:
***************
*** 977,980 ****
--- 979,983 ----
          break;
  #endif
+ #endif
  #ifdef SIGSEGV
        case SIGSEGV:
***************
*** 1699,1703 ****
  
  // no fchmod on BeOS 5...do pathname instead.
! #if defined(__BEOS__) && !defined(__ZETA__) 
    if ((oflags & O_CREAT) && chmod(pathname, mode))
      {
--- 1702,1706 ----
  
  // no fchmod on BeOS 5...do pathname instead.
! #if defined(__BEOS__) && !defined(__ZETA__) && !defined(__HAIKU__)
    if ((oflags & O_CREAT) && chmod(pathname, mode))
      {

Index: cmDocumentationFormatter.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatter.cxx,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C 2 -d -r1.1.2.2 -r1.1.2.3
*** cmDocumentationFormatter.cxx	22 Jul 2008 18:04:24 -0000	1.1.2.2
--- cmDocumentationFormatter.cxx	24 Oct 2008 15:18:46 -0000	1.1.2.3
***************
*** 119,123 ****
      return "module";
      }
!   else if(name.find("Name") != name.npos)
      {
      return "name";
--- 119,124 ----
      return "module";
      }
!   else if(name.find("Name") != name.npos ||
!           name.find("Introduction") != name.npos)
      {
      return "name";

Index: cmAddCustomTargetCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmAddCustomTargetCommand.h,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -C 2 -d -r1.22 -r1.22.2.1
*** cmAddCustomTargetCommand.h	23 Jan 2008 15:27:59 -0000	1.22
--- cmAddCustomTargetCommand.h	24 Oct 2008 15:18:45 -0000	1.22.2.1
***************
*** 69,73 ****
        "                    [DEPENDS depend depend depend ... ]\n"
        "                    [WORKING_DIRECTORY dir]\n"
!       "                    [COMMENT comment] [VERBATIM])\n"
        "Adds a target with the given name that executes the given commands. "
        "The target has no output file and is ALWAYS CONSIDERED OUT OF DATE "
--- 69,74 ----
        "                    [DEPENDS depend depend depend ... ]\n"
        "                    [WORKING_DIRECTORY dir]\n"
!       "                    [COMMENT comment] [VERBATIM]\n"
!       "                    [SOURCES src1 [src2...]])\n"
        "Adds a target with the given name that executes the given commands. "
        "The target has no output file and is ALWAYS CONSIDERED OUT OF DATE "
***************
*** 95,99 ****
        "When VERBATIM is not given the behavior is platform specific. "
        "In the future VERBATIM may be enabled by default. The only reason "
!       "it is an option is to preserve compatibility with older CMake code.";
      }
    
--- 96,106 ----
        "When VERBATIM is not given the behavior is platform specific. "
        "In the future VERBATIM may be enabled by default. The only reason "
!       "it is an option is to preserve compatibility with older CMake code."
!       "\n"
!       "The SOURCES option specifies additional source files to be included "
!       "in the custom target.  "
!       "Specified source files will be added to IDE project files for "
!       "convenience in editing even if they have not build rules."
!       ;
      }
    

Index: cmMakefileLibraryTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v
retrieving revision 1.58.2.4
retrieving revision 1.58.2.5
diff -C 2 -d -r1.58.2.4 -r1.58.2.5
*** cmMakefileLibraryTargetGenerator.cxx	3 Sep 2008 13:43:18 -0000	1.58.2.4
--- cmMakefileLibraryTargetGenerator.cxx	24 Oct 2008 15:18:52 -0000	1.58.2.5
***************
*** 592,596 ****
        (commands1,
         this->Makefile->GetStartOutputDirectory(),
!        this->Makefile->GetHomeOutputDirectory());
      commands.insert(commands.end(), commands1.begin(), commands1.end());
      commands1.clear();
--- 592,596 ----
        (commands1,
         this->Makefile->GetStartOutputDirectory(),
!        cmLocalGenerator::HOME_OUTPUT);
      commands.insert(commands.end(), commands1.begin(), commands1.end());
      commands1.clear();
***************
*** 688,724 ****
    // Construct object file lists that may be needed to expand the
    // rule.
-   std::string variableName;
-   std::string variableNameExternal;
-   this->WriteObjectsVariable(variableName, variableNameExternal);
    std::string buildObjs;
!   if(useResponseFile)
!     {
!     std::string objects;
!     this->WriteObjectsString(objects);
!     std::string objects_rsp =
!       this->CreateResponseFile("objects.rsp", objects, depends);
!     buildObjs = "@";
!     buildObjs += this->Convert(objects_rsp.c_str(),
!                                cmLocalGenerator::NONE,
!                                cmLocalGenerator::SHELL);
!     }
!   else if(useLinkScript)
!     {
!     if(!useArchiveRules)
!       {
!       this->WriteObjectsString(buildObjs);
!       }
!     }
!   else
!     {
!     buildObjs = "$(";
!     buildObjs += variableName;
!     buildObjs += ") $(";
!     buildObjs += variableNameExternal;
!     buildObjs += ")";
!     }
!   std::string cleanObjs = "$(";
!   cleanObjs += variableName;
!   cleanObjs += ")";
    cmLocalGenerator::RuleVariables vars;
    vars.TargetPDB = targetOutPathPDB.c_str();
--- 688,695 ----
    // Construct object file lists that may be needed to expand the
    // rule.
    std::string buildObjs;
!   this->CreateObjectLists(useLinkScript, useArchiveRules, useResponseFile,
!                           buildObjs, depends);
! 
    cmLocalGenerator::RuleVariables vars;
    vars.TargetPDB = targetOutPathPDB.c_str();
***************
*** 873,877 ****
      (commands1,
       this->Makefile->GetStartOutputDirectory(),
!      this->Makefile->GetHomeOutputDirectory());
    commands.insert(commands.end(), commands1.begin(), commands1.end());
    commands1.clear();
--- 844,848 ----
      (commands1,
       this->Makefile->GetStartOutputDirectory(),
!      cmLocalGenerator::HOME_OUTPUT);
    commands.insert(commands.end(), commands1.begin(), commands1.end());
    commands1.clear();
***************
*** 889,893 ****
      this->LocalGenerator->CreateCDCommand(commands1,
                                    this->Makefile->GetStartOutputDirectory(),
!                                   this->Makefile->GetHomeOutputDirectory());
      commands.insert(commands.end(), commands1.begin(), commands1.end());
      commands1.clear();
--- 860,864 ----
      this->LocalGenerator->CreateCDCommand(commands1,
                                    this->Makefile->GetStartOutputDirectory(),
!                                   cmLocalGenerator::HOME_OUTPUT);
      commands.insert(commands.end(), commands1.begin(), commands1.end());
      commands1.clear();

Index: cmListFileCache.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmListFileCache.h,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -C 2 -d -r1.21 -r1.21.2.1
*** cmListFileCache.h	13 Mar 2008 17:48:57 -0000	1.21
--- cmListFileCache.h	24 Oct 2008 15:18:48 -0000	1.21.2.1
***************
*** 56,59 ****
--- 56,60 ----
    std::string FilePath;
    long Line;
+   cmListFileContext(): Name(), FilePath(), Line(0) {}
  };
  

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CMakeLists.txt,v
retrieving revision 1.397.2.4
retrieving revision 1.397.2.5
diff -C 2 -d -r1.397.2.4 -r1.397.2.5
*** CMakeLists.txt	6 Aug 2008 21:04:19 -0000	1.397.2.4
--- CMakeLists.txt	24 Oct 2008 15:18:45 -0000	1.397.2.5
***************
*** 303,319 ****
  ENDIF(CMAKE_BUILD_ON_VISUAL_STUDIO OR MINGW)
  
- # With the Microsoft compiler (for _bstr_t support used from
- # cmCallVisualStudioMacro) we need the comsupp lib. Needed when
- # _MSC_VER and HAVE_COMDEF_H are defined...
- #
- IF(MSVC)
-   IF(MSVC60)
-     # comsuppd did not yet exist in VS6
-     TARGET_LINK_LIBRARIES(CMakeLib comsupp)
-   ELSE(MSVC60)
-     TARGET_LINK_LIBRARIES(CMakeLib optimized comsupp debug comsuppd)
-   ENDIF(MSVC60)
- ENDIF(MSVC)
- 
  #
  # CTestLib
--- 303,306 ----

Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.93.2.6
retrieving revision 1.93.2.7
diff -C 2 -d -r1.93.2.6 -r1.93.2.7
*** cmMakefileTargetGenerator.cxx	13 Jun 2008 12:55:17 -0000	1.93.2.6
--- cmMakefileTargetGenerator.cxx	24 Oct 2008 15:18:52 -0000	1.93.2.7
***************
*** 568,572 ****
      {
      sourceFile = this->Convert(sourceFile.c_str(),
!                                cmLocalGenerator::HOME_OUTPUT);
      }
    sourceFile = this->Convert(sourceFile.c_str(),
--- 568,572 ----
      {
      sourceFile = this->Convert(sourceFile.c_str(),
!                                cmLocalGenerator::START_OUTPUT);
      }
    sourceFile = this->Convert(sourceFile.c_str(),
***************
*** 615,619 ****
      (compileCommands,
       this->Makefile->GetStartOutputDirectory(),
!      this->Makefile->GetHomeOutputDirectory());
    commands.insert(commands.end(),
                    compileCommands.begin(), compileCommands.end());
--- 615,619 ----
      (compileCommands,
       this->Makefile->GetStartOutputDirectory(),
!      cmLocalGenerator::HOME_OUTPUT);
    commands.insert(commands.end(),
                    compileCommands.begin(), compileCommands.end());
***************
*** 726,730 ****
            (preprocessCommands,
             this->Makefile->GetStartOutputDirectory(),
!            this->Makefile->GetHomeOutputDirectory());
          commands.insert(commands.end(),
                          preprocessCommands.begin(),
--- 726,730 ----
            (preprocessCommands,
             this->Makefile->GetStartOutputDirectory(),
!            cmLocalGenerator::HOME_OUTPUT);
          commands.insert(commands.end(),
                          preprocessCommands.begin(),
***************
*** 782,786 ****
            (assemblyCommands,
             this->Makefile->GetStartOutputDirectory(),
!            this->Makefile->GetHomeOutputDirectory());
          commands.insert(commands.end(),
                          assemblyCommands.begin(),
--- 782,786 ----
            (assemblyCommands,
             this->Makefile->GetStartOutputDirectory(),
!            cmLocalGenerator::HOME_OUTPUT);
          commands.insert(commands.end(),
                          assemblyCommands.begin(),
***************
*** 896,900 ****
      (commands,
       this->Makefile->GetStartOutputDirectory(),
!      this->Makefile->GetHomeOutputDirectory());
  
    // Write the rule.
--- 896,900 ----
      (commands,
       this->Makefile->GetStartOutputDirectory(),
!      cmLocalGenerator::HOME_OUTPUT);
  
    // Write the rule.
***************
*** 949,962 ****
      << "# Targets to which this target links.\n"
      << "SET(CMAKE_TARGET_LINKED_INFO_FILES\n";
-   cmGlobalGenerator* gg = this->GlobalGenerator;
    std::set<cmTarget const*> emitted;
!   cmTarget::LinkLibraryVectorType const& libs =
!     this->Target->GetLinkLibraries();
!   for(cmTarget::LinkLibraryVectorType::const_iterator j = libs.begin();
!       j != libs.end(); ++j)
      {
!     if(cmTarget const* linkee = gg->FindTarget(0, j->first.c_str()))
        {
!       if(emitted.insert(linkee).second)
          {
          cmMakefile* mf = linkee->GetMakefile();
--- 949,962 ----
      << "# Targets to which this target links.\n"
      << "SET(CMAKE_TARGET_LINKED_INFO_FILES\n";
    std::set<cmTarget const*> emitted;
!   const char* cfg = this->LocalGenerator->ConfigurationName.c_str();
!   if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg))
      {
!     cmComputeLinkInformation::ItemVector const& items = cli->GetItems();
!     for(cmComputeLinkInformation::ItemVector::const_iterator
!           i = items.begin(); i != items.end(); ++i)
        {
!       cmTarget const* linkee = i->Target;
!       if(linkee && !linkee->IsImported() && emitted.insert(linkee).second)
          {
          cmMakefile* mf = linkee->GetMakefile();
***************
*** 1032,1037 ****
           << " "
           << this->Convert(this->InfoFileNameFull.c_str(),
!                           cmLocalGenerator::FULL, cmLocalGenerator::SHELL)
!          << " --color=$(COLOR)";
    commands.push_back(depCmd.str());
  
--- 1032,1040 ----
           << " "
           << this->Convert(this->InfoFileNameFull.c_str(),
!                           cmLocalGenerator::FULL, cmLocalGenerator::SHELL);
!   if(this->LocalGenerator->GetColorMakefile())
!     {
!     depCmd << " --color=$(COLOR)";
!     }
    commands.push_back(depCmd.str());
  
***************
*** 1453,1457 ****
        {
        flags += "-F";
!       flags += this->LocalGenerator->ConvertToOutputForExisting(i->c_str());
        flags += " ";
        }
--- 1456,1462 ----
        {
        flags += "-F";
!       flags += this->Convert(i->c_str(),
!                              cmLocalGenerator::START_OUTPUT,
!                              cmLocalGenerator::SHELL, true);
        flags += " ";
        }
***************
*** 1622,1625 ****
--- 1627,1689 ----
  
  //----------------------------------------------------------------------------
+ void
+ cmMakefileTargetGenerator
+ ::CreateObjectLists(bool useLinkScript, bool useArchiveRules,
+                     bool useResponseFile, std::string& buildObjs,
+                     std::vector<std::string>& makefile_depends)
+ {
+   std::string variableName;
+   std::string variableNameExternal;
+   this->WriteObjectsVariable(variableName, variableNameExternal);
+   if(useResponseFile)
+     {
+     // MSVC response files cannot exceed 128K.
+     std::string::size_type const responseFileLimit = 131000;
+ 
+     // Construct the individual object list strings.
+     std::vector<std::string> object_strings;
+     this->WriteObjectsStrings(object_strings, responseFileLimit);
+ 
+     // Write a response file for each string.
+     const char* sep = "";
+     for(unsigned int i = 0; i < object_strings.size(); ++i)
+       {
+       // Number the response files.
+       char rsp[32];
+       sprintf(rsp, "objects%u.rsp", i+1);
+ 
+       // Create this response file.
+       std::string objects_rsp =
+         this->CreateResponseFile(rsp, object_strings[i], makefile_depends);
+ 
+       // Separate from previous response file references.
+       buildObjs += sep;
+       sep = " ";
+ 
+       // Reference the response file.
+       buildObjs += "@";
+       buildObjs += this->Convert(objects_rsp.c_str(),
+                                  cmLocalGenerator::NONE,
+                                  cmLocalGenerator::SHELL);
+       }
+     }
+   else if(useLinkScript)
+     {
+     if(!useArchiveRules)
+       {
+       this->WriteObjectsString(buildObjs);
+       }
+     }
+   else
+     {
+     buildObjs = "$(";
+     buildObjs += variableName;
+     buildObjs += ") $(";
+     buildObjs += variableNameExternal;
+     buildObjs += ")";
+     }
+ }
+ 
+ //----------------------------------------------------------------------------
  const char* cmMakefileTargetGenerator::GetFortranModuleDirectory()
  {

Index: cmDocumentationFormatterDocbook.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatterDocbook.cxx,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C 2 -d -r1.1.2.2 -r1.1.2.3
*** cmDocumentationFormatterDocbook.cxx	15 May 2008 19:39:54 -0000	1.1.2.2
--- cmDocumentationFormatterDocbook.cxx	24 Oct 2008 15:18:46 -0000	1.1.2.3
***************
*** 230,235 ****
  
  //----------------------------------------------------------------------------
! void cmDocumentationFormatterDocbook::PrintHeader(const char* name, 
!                                                std::ostream& os)
  {
    // this one is used to ensure that we don't create multiple link targets
--- 230,236 ----
  
  //----------------------------------------------------------------------------
! void cmDocumentationFormatterDocbook::PrintHeader(const char* docname,
!                                                   const char* appname,
!                                                   std::ostream& os)
  {
    // this one is used to ensure that we don't create multiple link targets
***************
*** 245,249 ****
          "<article>\n"
          "<articleinfo>\n"
!         "<title>" << name << "</title>\n"
          "</articleinfo>\n";
  }
--- 246,250 ----
          "<article>\n"
          "<articleinfo>\n"
!         "<title>" << docname << " - " << appname << "</title>\n"
          "</articleinfo>\n";
  }

Index: cmFindLibraryCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindLibraryCommand.cxx,v
retrieving revision 1.58.2.1
retrieving revision 1.58.2.2
diff -C 2 -d -r1.58.2.1 -r1.58.2.2
*** cmFindLibraryCommand.cxx	13 Jun 2008 12:55:17 -0000	1.58.2.1
--- cmFindLibraryCommand.cxx	24 Oct 2008 15:18:46 -0000	1.58.2.2
***************
*** 17,20 ****
--- 17,22 ----
  #include "cmFindLibraryCommand.h"
  #include "cmCacheManager.h"
+ #include <cmsys/Directory.hxx>
+ #include <cmsys/stl/algorithm>
  
  cmFindLibraryCommand::cmFindLibraryCommand()
***************
*** 181,184 ****
--- 183,187 ----
      // try to replace lib with lib64 and see if it is there,
      // then prepend it to the path
+     // Note that all paths have trailing slashes.
      if((s != *i) && cmSystemTools::FileIsDirectory(s.c_str()))
        {
***************
*** 188,192 ****
      // now just add a 64 to the path name and if it is there,
      // add it to the path
!     s2 += "64";
      if(cmSystemTools::FileIsDirectory(s2.c_str()))
        {
--- 191,195 ----
      // now just add a 64 to the path name and if it is there,
      // add it to the path
!     s2 += "64/";
      if(cmSystemTools::FileIsDirectory(s2.c_str()))
        {
***************
*** 228,233 ****
  
  //----------------------------------------------------------------------------
! std::string cmFindLibraryCommand::FindNormalLibrary()
  {
    // Collect the list of library name prefixes/suffixes to try.
    const char* prefixes_list =
--- 231,290 ----
  
  //----------------------------------------------------------------------------
! struct cmFindLibraryHelper
! {
!   cmFindLibraryHelper(cmMakefile* mf);
! 
!   // Context information.
!   cmMakefile* Makefile;
!   cmGlobalGenerator* GG;
! 
!   // List of valid prefixes and suffixes.
!   std::vector<std::string> Prefixes;
!   std::vector<std::string> Suffixes;
!   std::string PrefixRegexStr;
!   std::string SuffixRegexStr;
! 
!   // Keep track of the best library file found so far.
!   typedef std::vector<std::string>::size_type size_type;
!   std::string BestPath;
!   size_type BestPrefix;
!   size_type BestSuffix;
! 
!   // Support for OpenBSD shared library naming: lib<name>.so.<major>.<minor>
!   bool OpenBSD;
!   unsigned int BestMajor;
!   unsigned int BestMinor;
! 
!   // Current name under consideration.
!   cmsys::RegularExpression NameRegex;
!   bool TryRawName;
!   std::string RawName;
! 
!   // Current full path under consideration.
!   std::string TestPath;
! 
!   void RegexFromLiteral(std::string& out, std::string const& in);
!   void RegexFromList(std::string& out, std::vector<std::string> const& in);
!   size_type GetPrefixIndex(std::string const& prefix)
!     {
!     return cmsys_stl::find(this->Prefixes.begin(), this->Prefixes.end(),
!                            prefix) - this->Prefixes.begin();
!     }
!   size_type GetSuffixIndex(std::string const& suffix)
!     {
!     return cmsys_stl::find(this->Suffixes.begin(), this->Suffixes.end(),
!                            suffix) - this->Suffixes.begin();
!     }
!   bool HasValidSuffix(std::string const& name);
!   void SetName(std::string const& name);
!   bool CheckDirectory(std::string const& path);
! };
! 
! //----------------------------------------------------------------------------
! cmFindLibraryHelper::cmFindLibraryHelper(cmMakefile* mf):
!   Makefile(mf)
  {
+   this->GG = this->Makefile->GetLocalGenerator()->GetGlobalGenerator();
+ 
    // Collect the list of library name prefixes/suffixes to try.
    const char* prefixes_list =
***************
*** 235,299 ****
    const char* suffixes_list =
      this->Makefile->GetRequiredDefinition("CMAKE_FIND_LIBRARY_SUFFIXES");
!   std::vector<std::string> prefixes;
!   std::vector<std::string> suffixes;
!   cmSystemTools::ExpandListArgument(prefixes_list, prefixes, true);
!   cmSystemTools::ExpandListArgument(suffixes_list, suffixes, true);
  
!   // Search the entire path for each name.
!   std::string tryPath;
!   for(std::vector<std::string>::const_iterator ni = this->Names.begin();
!       ni != this->Names.end() ; ++ni)
      {
!     // If the original library name provided by the user matches one of
!     // the suffixes, try it first.
!     bool tryOrig = false;
!     std::string const& name = *ni;
!     for(std::vector<std::string>::const_iterator si = suffixes.begin();
!         !tryOrig && si != suffixes.end(); ++si)
        {
!       std::string const& suffix = *si;
!       if(name.length() > suffix.length() &&
!          name.substr(name.size()-suffix.length()) == suffix)
!         {
!         tryOrig = true;
!         }
        }
  
!     for(std::vector<std::string>::const_iterator
!           p = this->SearchPaths.begin();
!         p != this->SearchPaths.end(); ++p)
        {
!       // Try the original library name as specified by the user.
!       if(tryOrig)
          {
!         tryPath = *p;
!         tryPath += name;
!         if(cmSystemTools::FileExists(tryPath.c_str(), true))
            {
!           tryPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
!           cmSystemTools::ConvertToUnixSlashes(tryPath);
!           return tryPath;
            }
          }
  
!       // Try various library naming conventions.
!       for(std::vector<std::string>::iterator prefix = prefixes.begin();
!           prefix != prefixes.end(); ++prefix)
          {
!         for(std::vector<std::string>::iterator suffix = suffixes.begin();
!             suffix != suffixes.end(); ++suffix)
!           {
!           tryPath = *p;
!           tryPath += *prefix;
!           tryPath += name;
!           tryPath += *suffix;
!           if(cmSystemTools::FileExists(tryPath.c_str())
!              && !cmSystemTools::FileIsDirectory(tryPath.c_str()))
!             {
!             tryPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
!             cmSystemTools::ConvertToUnixSlashes(tryPath);
!             return tryPath;
!             }
!           }
          }
        }
--- 292,485 ----
    const char* suffixes_list =
      this->Makefile->GetRequiredDefinition("CMAKE_FIND_LIBRARY_SUFFIXES");
!   cmSystemTools::ExpandListArgument(prefixes_list, this->Prefixes, true);
!   cmSystemTools::ExpandListArgument(suffixes_list, this->Suffixes, true);
!   this->RegexFromList(this->PrefixRegexStr, this->Prefixes);
!   this->RegexFromList(this->SuffixRegexStr, this->Suffixes);
  
!   // Check whether to use OpenBSD-style library version comparisons.
!   this->OpenBSD =
!     this->Makefile->GetCMakeInstance()
!     ->GetPropertyAsBool("FIND_LIBRARY_USE_OPENBSD_VERSIONING");
! 
!   this->TryRawName = false;
! 
!   // No library file has yet been found.
!   this->BestPrefix = this->Prefixes.size();
!   this->BestSuffix = this->Suffixes.size();
!   this->BestMajor = 0;
!   this->BestMinor = 0;
! }
! 
! //----------------------------------------------------------------------------
! void cmFindLibraryHelper::RegexFromLiteral(std::string& out,
!                                            std::string const& in)
! {
!   for(std::string::const_iterator ci = in.begin(); ci != in.end(); ++ci)
      {
!     char ch = *ci;
!     if(ch == '[' || ch == ']' || ch == '(' || ch == ')' || ch == '\\' ||
!        ch == '.' || ch == '*' || ch == '+' || ch == '?' || ch == '-' ||
!        ch == '^' || ch == '$')
        {
!       out += "\\";
        }
+ #if defined(_WIN32) || defined(__APPLE__)
+     out += tolower(ch);
+ #else
+     out += ch;
+ #endif
+     }
+ }
  
! //----------------------------------------------------------------------------
! void cmFindLibraryHelper::RegexFromList(std::string& out,
!                                         std::vector<std::string> const& in)
! {
!   // Surround the list in parens so the '|' does not apply to anything
!   // else and the result can be checked after matching.
!   out += "(";
!   const char* sep = "";
!   for(std::vector<std::string>::const_iterator si = in.begin();
!       si != in.end(); ++si)
!     {
!     // Separate from previous item.
!     out += sep;
!     sep = "|";
! 
!     // Append this item.
!     this->RegexFromLiteral(out, *si);
!     }
!   out += ")";
! }
! 
! //----------------------------------------------------------------------------
! bool cmFindLibraryHelper::HasValidSuffix(std::string const& name)
! {
!   // Check if the given name ends in a valid library suffix.
!   for(std::vector<std::string>::const_iterator si = this->Suffixes.begin();
!       si != this->Suffixes.end(); ++si)
!     {
!     std::string const& suffix = *si;
!     if(name.length() > suffix.length() &&
!        name.substr(name.size()-suffix.length()) == suffix)
        {
!       return true;
!       }
!     }
!   return false;
! }
! 
! //----------------------------------------------------------------------------
! void cmFindLibraryHelper::SetName(std::string const& name)
! {
!   // Consider checking the raw name too.
!   this->TryRawName = this->HasValidSuffix(name);
!   this->RawName = name;
! 
!   // Build a regular expression to match library names.
!   std::string regex = "^";
!   regex += this->PrefixRegexStr;
!   this->RegexFromLiteral(regex, name);
!   regex += this->SuffixRegexStr;
!   if(this->OpenBSD)
!     {
!     regex += "(\\.[0-9]+\\.[0-9]+)?";
!     }
!   regex += "$";
!   this->NameRegex.compile(regex.c_str());
! }
! 
! //----------------------------------------------------------------------------
! bool cmFindLibraryHelper::CheckDirectory(std::string const& path)
! {
!   // If the original library name provided by the user matches one of
!   // the suffixes, try it first.  This allows users to search
!   // specifically for a static library on some platforms (on MS tools
!   // one cannot tell just from the library name whether it is a static
!   // library or an import library).
!   if(this->TryRawName)
!     {
!     this->TestPath = path;
!     this->TestPath += this->RawName;
!     if(cmSystemTools::FileExists(this->TestPath.c_str(), true))
!       {
!       this->BestPath =
!         cmSystemTools::CollapseFullPath(this->TestPath.c_str());
!       cmSystemTools::ConvertToUnixSlashes(this->BestPath);
!       return true;
!       }
!     }
! 
!   // Search for a file matching the library name regex.
!   std::string dir = path;
!   cmSystemTools::ConvertToUnixSlashes(dir);
!   std::set<cmStdString> const& files = this->GG->GetDirectoryContent(dir);
!   for(std::set<cmStdString>::const_iterator fi = files.begin();
!       fi != files.end(); ++fi)
!     {
!     std::string const& origName = *fi;
! #if defined(_WIN32) || defined(__APPLE__)
!     std::string testName = cmSystemTools::LowerCase(origName);
! #else
!     std::string const& testName = origName;
! #endif
!     if(this->NameRegex.find(testName))
!       {
!       this->TestPath = path;
!       this->TestPath += origName;
!       if(!cmSystemTools::FileIsDirectory(this->TestPath.c_str()))
          {
!         // This is a matching file.  Check if it is better than the
!         // best name found so far.  Earlier prefixes are preferred,
!         // followed by earlier suffixes.  For OpenBSD, shared library
!         // version extensions are compared.
!         size_type prefix = this->GetPrefixIndex(this->NameRegex.match(1));
!         size_type suffix = this->GetSuffixIndex(this->NameRegex.match(2));
!         unsigned int major = 0;
!         unsigned int minor = 0;
!         if(this->OpenBSD)
            {
!           sscanf(this->NameRegex.match(3).c_str(), ".%u.%u", &major, &minor);
!           }
!         if(this->BestPath.empty() || prefix < this->BestPrefix ||
!            (prefix == this->BestPrefix && suffix < this->BestSuffix) ||
!            (prefix == this->BestPrefix && suffix == this->BestSuffix &&
!             (major > this->BestMajor ||
!              (major == this->BestMajor && minor > this->BestMinor))))
!           {
!           this->BestPath = this->TestPath;
!           this->BestPrefix = prefix;
!           this->BestSuffix = suffix;
!           this->BestMajor = major;
!           this->BestMinor = minor;
            }
          }
+       }
+     }
  
!   // Use the best candidate found in this directory, if any.
!   return !this->BestPath.empty();
! }
! 
! //----------------------------------------------------------------------------
! std::string cmFindLibraryCommand::FindNormalLibrary()
! {
!   // Search the entire path for each name.
!   cmFindLibraryHelper helper(this->Makefile);
!   for(std::vector<std::string>::const_iterator ni = this->Names.begin();
!       ni != this->Names.end() ; ++ni)
!     {
!     // Switch to searching for this name.
!     std::string const& name = *ni;
!     helper.SetName(name);
! 
!     // Search every directory.
!     for(std::vector<std::string>::const_iterator
!           p = this->SearchPaths.begin();
!         p != this->SearchPaths.end(); ++p)
!       {
!       if(helper.CheckDirectory(*p))
          {
!         return helper.BestPath;
          }
        }

Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.207.2.10
retrieving revision 1.207.2.11
diff -C 2 -d -r1.207.2.10 -r1.207.2.11
*** cmTarget.cxx	3 Sep 2008 13:43:18 -0000	1.207.2.10
--- cmTarget.cxx	24 Oct 2008 15:18:54 -0000	1.207.2.11
***************
*** 529,532 ****
--- 529,539 ----
  
    cm->DefineProperty
+     ("TYPE", cmProperty::TARGET,
+      "The type of the target.",
+      "This read-only property can be used to test the type of the given "
+      "target. It will be one of STATIC_LIBRARY, MODULE_LIBRARY, "
+      "SHARED_LIBRARY, EXECUTABLE or one of the internal target types.");
+ 
+   cm->DefineProperty
      ("VERSION", cmProperty::TARGET,
       "What version number is this target.",
***************
*** 656,659 ****
--- 663,692 ----
       "set_source_files_properties command.");
  
+   cm->DefineProperty
+     ("PROJECT_LABEL", cmProperty::TARGET,
+      "Change the name of a target in an IDE.",
+      "Can be used to change the name of the target in an IDE "
+      "like visual stuido. ");
+   cm->DefineProperty
+     ("VS_KEYWORD", cmProperty::TARGET,
+      "Visual Studio project keyword.",
+      "Can be set to change the visual studio keyword, for example "
+      "QT integration works better if this is set to Qt4VSv1.0. ");
+   cm->DefineProperty
+     ("VS_SCC_PROVIDER", cmProperty::TARGET,
+      "Visual Studio Source Code Control Provider.",
+      "Can be set to change the visual studio source code control "
+      "provider property.");
+   cm->DefineProperty
+     ("VS_SCC_LOCALPATH", cmProperty::TARGET,
+      "Visual Studio Source Code Control Provider.",
+      "Can be set to change the visual studio source code control "
+      "local path property.");
+   cm->DefineProperty
+     ("VS_SCC_PROJECTNAME", cmProperty::TARGET,
+      "Visual Studio Source Code Control Project.",
+      "Can be set to change the visual studio source code control "
+      "project name property.");
+ 
  #if 0
    cm->DefineProperty
***************
*** 3673,3679 ****
  cmTarget::GetLinkInformation(const char* config)
  {
-   // Link information does not make sense for static libraries.
-   assert(this->GetType() != cmTarget::STATIC_LIBRARY);
- 
    // Lookup any existing information for this configuration.
    std::map<cmStdString, cmComputeLinkInformation*>::iterator
--- 3706,3709 ----

Index: cmSetTargetPropertiesCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSetTargetPropertiesCommand.h,v
retrieving revision 1.31
retrieving revision 1.31.2.1
diff -C 2 -d -r1.31 -r1.31.2.1
*** cmSetTargetPropertiesCommand.h	23 Jan 2008 15:27:59 -0000	1.31
--- cmSetTargetPropertiesCommand.h	24 Oct 2008 15:18:54 -0000	1.31.2.1
***************
*** 146,149 ****
--- 146,152 ----
          "to change the visual studio keyword, for example QT integration "
          "works better if this is set to Qt4VSv1.0.\n"
+         "VS_SCC_PROJECTNAME, VS_SCC_LOCALPATH, VS_SCC_PROVIDER can be set "
+         "to add support for source control bindings in a  Visual Studio "
+         "project file.\n"
          "When a library is built CMake by default generates code to remove "
          "any existing library using all possible names.  This is needed "

Index: cmLocalUnixMakefileGenerator3.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.h,v
retrieving revision 1.82
retrieving revision 1.82.2.1
diff -C 2 -d -r1.82 -r1.82.2.1
*** cmLocalUnixMakefileGenerator3.h	13 Jan 2008 21:36:20 -0000	1.82
--- cmLocalUnixMakefileGenerator3.h	24 Oct 2008 15:18:52 -0000	1.82.2.1
***************
*** 194,202 ****
                    EchoColor color = EchoNormal);
  
    virtual std::string GetTargetDirectory(cmTarget const& target) const;
  
      // create a command that cds to the start dir then runs the commands
    void CreateCDCommand(std::vector<std::string>& commands, 
!                        const char *targetDir, const char *returnDir);
  
    static std::string ConvertToQuotedOutputPath(const char* p);
--- 194,206 ----
                    EchoColor color = EchoNormal);
  
+   /** Get whether the makefile is to have color.  */
+   bool GetColorMakefile() const { return this->ColorMakefile; }
+ 
    virtual std::string GetTargetDirectory(cmTarget const& target) const;
  
      // create a command that cds to the start dir then runs the commands
    void CreateCDCommand(std::vector<std::string>& commands, 
!                        const char *targetDir,
!                        cmLocalGenerator::RelativeRoot returnDir);
  
    static std::string ConvertToQuotedOutputPath(const char* p);
***************
*** 322,329 ****
                            const cmCustomCommand& cc);
    void AppendCustomCommands(std::vector<std::string>& commands,
!                             const std::vector<cmCustomCommand>& ccs);
    void AppendCustomCommand(std::vector<std::string>& commands,
                             const cmCustomCommand& cc,
!                            bool echo_comment=false);
    void AppendCleanCommand(std::vector<std::string>& commands,
                            const std::vector<std::string>& files,
--- 326,337 ----
                            const cmCustomCommand& cc);
    void AppendCustomCommands(std::vector<std::string>& commands,
!                             const std::vector<cmCustomCommand>& ccs,
!                             cmLocalGenerator::RelativeRoot relative =
!                             cmLocalGenerator::HOME_OUTPUT);
    void AppendCustomCommand(std::vector<std::string>& commands,
                             const cmCustomCommand& cc,
!                            bool echo_comment=false,
!                            cmLocalGenerator::RelativeRoot relative =
!                            cmLocalGenerator::HOME_OUTPUT);
    void AppendCleanCommand(std::vector<std::string>& commands,
                            const std::vector<std::string>& files,

Index: cmGlobalXCodeGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.h,v
retrieving revision 1.52.2.1
retrieving revision 1.52.2.2
diff -C 2 -d -r1.52.2.1 -r1.52.2.2
*** cmGlobalXCodeGenerator.h	13 Jul 2008 21:55:23 -0000	1.52.2.1
--- cmGlobalXCodeGenerator.h	24 Oct 2008 15:18:48 -0000	1.52.2.2
***************
*** 153,156 ****
--- 153,158 ----
                                    cmLocalGenerator* root,
                                    std::vector<cmLocalGenerator*>& generators);
+   cmXCodeObject* CreateXCodeFileReference(cmSourceFile* sf,
+                                           cmTarget& cmtarget);
    cmXCodeObject* CreateXCodeSourceFile(cmLocalGenerator* gen, 
                                         cmSourceFile* sf,

Index: cmComputeLinkInformation.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkInformation.h,v
retrieving revision 1.15.2.3
retrieving revision 1.15.2.4
diff -C 2 -d -r1.15.2.3 -r1.15.2.4
*** cmComputeLinkInformation.h	28 Jul 2008 15:31:35 -0000	1.15.2.3
--- cmComputeLinkInformation.h	24 Oct 2008 15:18:45 -0000	1.15.2.4
***************
*** 41,49 ****
    struct Item
    {
!     Item(): Value(), IsPath(true) {}
!     Item(Item const& item): Value(item.Value), IsPath(item.IsPath) {}
!     Item(std::string const& v, bool p): Value(v), IsPath(p) {}
      std::string Value;
      bool IsPath;
    };
    typedef std::vector<Item> ItemVector;
--- 41,52 ----
    struct Item
    {
!     Item(): Value(), IsPath(true), Target(0) {}
!     Item(Item const& item):
!       Value(item.Value), IsPath(item.IsPath), Target(item.Target) {}
!     Item(std::string const& v, bool p, cmTarget* target = 0):
!       Value(v), IsPath(p), Target(target) {}
      std::string Value;
      bool IsPath;
+     cmTarget* Target;
    };
    typedef std::vector<Item> ItemVector;

Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.186.2.8
retrieving revision 1.186.2.9
diff -C 2 -d -r1.186.2.8 -r1.186.2.9
*** cmGlobalXCodeGenerator.cxx	12 Sep 2008 14:56:21 -0000	1.186.2.8
--- cmGlobalXCodeGenerator.cxx	24 Oct 2008 15:18:48 -0000	1.186.2.9
***************
*** 282,285 ****
--- 282,291 ----
    cmTarget* allbuild = mf->FindTarget("ALL_BUILD");
  
+   // Refer to the main build configuration file for easy editing.
+   std::string listfile = mf->GetStartDirectory();
+   listfile += "/";
+   listfile += "CMakeLists.txt";
+   allbuild->AddSource(listfile.c_str());
+ 
    // Add XCODE depend helper 
    std::string dir = mf->GetCurrentOutputDirectory();
***************
*** 334,337 ****
--- 340,349 ----
          allbuild->AddUtility(target.GetName());
          }
+ 
+       // Refer to the build configuration file for easy editing.
+       listfile = lg->GetMakefile()->GetStartDirectory();
+       listfile += "/";
+       listfile += "CMakeLists.txt";
+       target.AddSource(listfile.c_str());
        }
      }
***************
*** 460,484 ****
    // fileRef object for any given full path.
    //
!   std::string fname = sf->GetFullPath();
!   cmXCodeObject* fileRef = this->FileRefs[fname];
!   if(!fileRef)
!     {
!     fileRef = this->CreateObject(cmXCodeObject::PBXFileReference);
!     std::string comment = fname;
!     comment += " in ";
!     //std::string gname = group->GetObject("name")->GetString();
!     //comment += gname.substr(1, gname.size()-2);
!     fileRef->SetComment(fname.c_str());
! 
!     this->FileRefs[fname] = fileRef;
!     }
! 
!   cmStdString key = GetGroupMapKey(cmtarget, sf);
!   cmXCodeObject* group = this->GroupMap[key];
!   cmXCodeObject* children = group->GetObject("children");
!   if (!children->HasObject(fileRef))
!     {
!     children->AddObject(fileRef);
!     }
  
    cmXCodeObject* buildFile = this->CreateObject(cmXCodeObject::PBXBuildFile);
--- 472,476 ----
    // fileRef object for any given full path.
    //
!   cmXCodeObject* fileRef = this->CreateXCodeFileReference(sf, cmtarget);
  
    cmXCodeObject* buildFile = this->CreateObject(cmXCodeObject::PBXBuildFile);
***************
*** 526,529 ****
--- 518,548 ----
  
    buildFile->AddAttribute("settings", settings);
+   return buildFile;
+ }
+ 
+ //----------------------------------------------------------------------------
+ cmXCodeObject*
+ cmGlobalXCodeGenerator::CreateXCodeFileReference(cmSourceFile* sf,
+                                                  cmTarget& cmtarget)
+ {
+   std::string fname = sf->GetFullPath();
+   cmXCodeObject* fileRef = this->FileRefs[fname];
+   if(!fileRef)
+     {
+     fileRef = this->CreateObject(cmXCodeObject::PBXFileReference);
+     std::string comment = fname;
+     //comment += " in ";
+     //std::string gname = group->GetObject("name")->GetString();
+     //comment += gname.substr(1, gname.size()-2);
+     fileRef->SetComment(fname.c_str());
+     this->FileRefs[fname] = fileRef;
+     }
+   cmStdString key = GetGroupMapKey(cmtarget, sf);
+   cmXCodeObject* group = this->GroupMap[key];
+   cmXCodeObject* children = group->GetObject("children");
+   if (!children->HasObject(fileRef))
+     {
+     children->AddObject(fileRef);
+     }
    fileRef->AddAttribute("fileEncoding", this->CreateString("4"));
  
***************
*** 570,573 ****
--- 589,596 ----
      sourcecode += ".c.c";
      }
+   else if(ext == "txt")
+     {
+     sourcecode += ".text";
+     }
    //else
    //  {
***************
*** 603,607 ****
      }
  
!   return buildFile;
  }
  
--- 626,630 ----
      }
  
!   return fileRef;
  }
  
***************
*** 1619,1642 ****
      }    
  
-   // Convert "XCODE_ATTRIBUTE_*" properties directly.
-   {
-   cmPropertyMap const& props = target.GetProperties();
-   for(cmPropertyMap::const_iterator i = props.begin();
-       i != props.end(); ++i)
-     {
-     if(i->first.find("XCODE_ATTRIBUTE_") == 0)
-       {
-       buildSettings->AddAttribute(i->first.substr(16).c_str(),
-                                   this->CreateString(i->second.GetValue()));
-       }
-     }
-   }
- 
    buildSettings->AddAttribute("GCC_GENERATE_DEBUGGING_SYMBOLS",
                                this->CreateString(debugStr));
    buildSettings->AddAttribute("GCC_OPTIMIZATION_LEVEL", 
                                this->CreateString(optLevel));
-   buildSettings->AddAttribute("OPTIMIZATION_CFLAGS", 
-                               this->CreateString(oflagc.c_str()));
    buildSettings->AddAttribute("GCC_SYMBOLS_PRIVATE_EXTERN",
                                this->CreateString("NO"));
--- 1642,1649 ----
***************
*** 1731,1734 ****
--- 1738,1755 ----
                                  this->CreateString(vso.str().c_str()));
      }
+   // put this last so it can override existing settings
+   // Convert "XCODE_ATTRIBUTE_*" properties directly.
+   {
+   cmPropertyMap const& props = target.GetProperties();
+   for(cmPropertyMap::const_iterator i = props.begin();
+       i != props.end(); ++i)
+     {
+     if(i->first.find("XCODE_ATTRIBUTE_") == 0)
+       {
+       buildSettings->AddAttribute(i->first.substr(16).c_str(),
+                                   this->CreateString(i->second.GetValue()));
+       }
+     }
+   }
  }
  
***************
*** 1787,1790 ****
--- 1808,1826 ----
    target->AddAttribute("productName",this->CreateString(productName.c_str()));
    target->SetTarget(&cmtarget);
+ 
+   // Add source files without build rules for editing convenience.
+   if(cmtarget.GetType() == cmTarget::UTILITY)
+     {
+     std::vector<cmSourceFile*> const& sources = cmtarget.GetSourceFiles();
+     for(std::vector<cmSourceFile*>::const_iterator i = sources.begin();
+         i != sources.end(); ++i)
+       {
+       if(!(*i)->GetPropertyAsBool("GENERATED"))
+         {
+         this->CreateXCodeFileReference(*i, cmtarget);
+         }
+       }
+     }
+ 
    return target;
  }
***************
*** 2048,2117 ****
  
    // Add dependencies on other CMake targets.
!   {
!   // Keep track of dependencies already listed.
!   std::set<cmStdString> emitted;
! 
!   // A target should not depend on itself.
!   emitted.insert(cmtarget->GetName());
! 
!   // Loop over all library dependencies.
!   const cmTarget::LinkLibraryVectorType& tlibs = 
!     cmtarget->GetLinkLibraries();
!   for(cmTarget::LinkLibraryVectorType::const_iterator lib = tlibs.begin();
!       lib != tlibs.end(); ++lib)
      {
!     // Don't emit the same library twice for this target.
!     if(emitted.insert(lib->first).second)
        {
!       // Add this dependency.
!       cmTarget* t = this->FindTarget(this->CurrentProject.c_str(),
!                                      lib->first.c_str());
!       cmXCodeObject* dptarget = this->FindXCodeTarget(t);
!       if(dptarget)
!         {
!         this->AddDependTarget(target, dptarget);
!         }
        }
      }
-   }
-   
-   // write utility dependencies.
-   for(std::set<cmStdString>::const_iterator i
-         = cmtarget->GetUtilities().begin();
-       i != cmtarget->GetUtilities().end(); ++i)
-     {
-     cmTarget* t = this->FindTarget(this->CurrentProject.c_str(),
-                                    i->c_str());
-     // if the target is in this project then make target depend
-     // on it.  It may not be in this project if this is a sub
-     // project from the top.
-     if(t)
-       {
-       cmXCodeObject* dptarget = this->FindXCodeTarget(t);
-       if(dptarget)
-         {
-         this->AddDependTarget(target, dptarget);
-         }
-       else
-         {
-         std::string m = "Error Utility: ";
-         m += i->c_str();
-         m += "\n";
-         m += "cmtarget ";
-         if(t)
-           {
-           m += t->GetName();
-           }
-         m += "\n";
-         m += "Is on the target ";
-         m += cmtarget->GetName();
-         m += "\n";
-         m += "But it has no xcode target created yet??\n";
-         m += "Current project is ";
-         m += this->CurrentProject.c_str();
-         cmSystemTools::Error(m.c_str());
-         }
-       } 
-     }
  
    // Skip link information for static libraries.
--- 2084,2095 ----
  
    // Add dependencies on other CMake targets.
!   TargetDependSet const& deps = this->GetTargetDirectDepends(*cmtarget);
!   for(TargetDependSet::const_iterator i = deps.begin(); i != deps.end(); ++i)
      {
!     if(cmXCodeObject* dptarget = this->FindXCodeTarget(*i))
        {
!       this->AddDependTarget(target, dptarget);
        }
      }
  
    // Skip link information for static libraries.
***************
*** 2243,2248 ****
        // groups:
        //
!       if(cmtarget.GetType() == cmTarget::UTILITY ||
!          cmtarget.GetType() == cmTarget::GLOBAL_TARGET)
          {
          continue;
--- 2221,2225 ----
        // groups:
        //
!       if(cmtarget.GetType() == cmTarget::GLOBAL_TARGET)
          {
          continue;

Index: cmWhileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmWhileCommand.cxx,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -C 2 -d -r1.12 -r1.12.2.1
*** cmWhileCommand.cxx	1 Mar 2008 02:33:33 -0000	1.12
--- cmWhileCommand.cxx	24 Oct 2008 15:18:54 -0000	1.12.2.1
***************
*** 40,49 ****
      if (!this->Depth) 
        {
!       char* errorString = 0;
      
        std::vector<std::string> expandedArguments;
        mf.ExpandArguments(this->Args, expandedArguments);
        bool isTrue = 
!         cmIfCommand::IsTrue(expandedArguments,&errorString,&mf);
  
        this->Executing = true;
--- 40,49 ----
      if (!this->Depth) 
        {
!       std::string errorString;
      
        std::vector<std::string> expandedArguments;
        mf.ExpandArguments(this->Args, expandedArguments);
        bool isTrue = 
!         cmIfCommand::IsTrue(expandedArguments,errorString,&mf);
  
        this->Executing = true;
***************
*** 70,74 ****
          mf.ExpandArguments(this->Args, expandedArguments);
          isTrue = 
!           cmIfCommand::IsTrue(expandedArguments,&errorString,&mf);
          }
        mf.RemoveFunctionBlocker(lff);
--- 70,74 ----
          mf.ExpandArguments(this->Args, expandedArguments);
          isTrue = 
!           cmIfCommand::IsTrue(expandedArguments,errorString,&mf);
          }
        mf.RemoveFunctionBlocker(lff);

Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.375.2.13
retrieving revision 1.375.2.14
diff -C 2 -d -r1.375.2.13 -r1.375.2.14
*** cmake.cxx	4 Sep 2008 21:10:45 -0000	1.375.2.13
--- cmake.cxx	24 Oct 2008 15:18:55 -0000	1.375.2.14
***************
*** 1174,1179 ****
        time(&time_start);
        clock_start = clock();
! 
!       cmSystemTools::RunSingleCommand(command.c_str());
  
        clock_finish = clock();
--- 1174,1179 ----
        time(&time_start);
        clock_start = clock();
!       int ret =0;
!       cmSystemTools::RunSingleCommand(command.c_str(), 0, &ret);
  
        clock_finish = clock();
***************
*** 1187,1191 ****
          << " s. (clock)"
          << "\n";
!       return 0;
        }
  
--- 1187,1191 ----
          << " s. (clock)"
          << "\n";
!       return ret;
        }
  

Index: cmDependsJavaLexer.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDependsJavaLexer.cxx,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -C 2 -d -r1.12 -r1.12.2.1
*** cmDependsJavaLexer.cxx	24 Sep 2007 15:16:13 -0000	1.12
--- cmDependsJavaLexer.cxx	24 Oct 2008 15:18:46 -0000	1.12.2.1
***************
*** 24,28 ****
  #include <stdlib.h>
  
! #if defined(__BEOS__)
  #include <unistd.h>   /* prevents a conflict with a #define later on... */
  #endif
--- 24,28 ----
  #include <stdlib.h>
  
! #if defined(__BEOS__) || defined (__HAIKU__)
  #include <unistd.h>   /* prevents a conflict with a #define later on... */
  #endif

Index: cmInstallCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallCommand.cxx,v
retrieving revision 1.45.2.3
retrieving revision 1.45.2.4
diff -C 2 -d -r1.45.2.3 -r1.45.2.4
*** cmInstallCommand.cxx	13 Jul 2008 21:55:23 -0000	1.45.2.3
--- cmInstallCommand.cxx	24 Oct 2008 15:18:48 -0000	1.45.2.4
***************
*** 608,613 ****
        }
  
- //       if(target.GetProperty("ASSOCIATED_FILES");
- 
    // These well-known sets of files are installed *automatically* for FRAMEWORK
    // SHARED library targets on the Mac as part of installing the FRAMEWORK.
--- 608,611 ----
***************
*** 709,713 ****
      installsFramework = installsFramework || frameworkGenerator != 0;
      installsBundle = installsBundle || bundleGenerator != 0;
!     installsPrivateHeader = installsPrivateHeader || privateHeaderGenerator != 0;
      installsPublicHeader = installsPublicHeader || publicHeaderGenerator != 0;
      installsResource = installsResource || resourceGenerator;
--- 707,712 ----
      installsFramework = installsFramework || frameworkGenerator != 0;
      installsBundle = installsBundle || bundleGenerator != 0;
!     installsPrivateHeader = installsPrivateHeader 
!       || privateHeaderGenerator != 0;
      installsPublicHeader = installsPublicHeader || publicHeaderGenerator != 0;
      installsResource = installsResource || resourceGenerator;
***************
*** 734,777 ****
      }
  
!   // Tell the global generator about any installation component names specified
    if (installsArchive)
      {
!     this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!                        ->AddInstallComponent(archiveArgs.GetComponent().c_str());
      }
    if (installsLibrary)
      {
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!                        ->AddInstallComponent(libraryArgs.GetComponent().c_str());
      }
    if (installsRuntime)
      {
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!                        ->AddInstallComponent(runtimeArgs.GetComponent().c_str());
      }
    if (installsFramework)
      {
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!                      ->AddInstallComponent(frameworkArgs.GetComponent().c_str());
      }
    if (installsBundle)
      {
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!                         ->AddInstallComponent(bundleArgs.GetComponent().c_str());
      }
    if (installsPrivateHeader)
      {
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!                  ->AddInstallComponent(privateHeaderArgs.GetComponent().c_str());
      }
    if (installsPublicHeader)
      {
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!                   ->AddInstallComponent(publicHeaderArgs.GetComponent().c_str());
      }
    if (installsResource)
      {
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!                       ->AddInstallComponent(resourceArgs.GetComponent().c_str());
      }
  
--- 733,778 ----
      }
  
!   // Tell the global generator about any installation component names
!   // specified
    if (installsArchive)
      {
!     this->Makefile->GetLocalGenerator()->
!       GetGlobalGenerator()
!       ->AddInstallComponent(archiveArgs.GetComponent().c_str());
      }
    if (installsLibrary)
      {
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!       ->AddInstallComponent(libraryArgs.GetComponent().c_str());
      }
    if (installsRuntime)
      {
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!       ->AddInstallComponent(runtimeArgs.GetComponent().c_str());
      }
    if (installsFramework)
      {
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!       ->AddInstallComponent(frameworkArgs.GetComponent().c_str());
      }
    if (installsBundle)
      {
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!       ->AddInstallComponent(bundleArgs.GetComponent().c_str());
      }
    if (installsPrivateHeader)
      {
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!       ->AddInstallComponent(privateHeaderArgs.GetComponent().c_str());
      }
    if (installsPublicHeader)
      {
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!       ->AddInstallComponent(publicHeaderArgs.GetComponent().c_str());
      }
    if (installsResource)
      {
      this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
!       ->AddInstallComponent(resourceArgs.GetComponent().c_str());
      }
  

Index: cmakemain.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmakemain.cxx,v
retrieving revision 1.80.2.3
retrieving revision 1.80.2.4
diff -C 2 -d -r1.80.2.3 -r1.80.2.4
*** cmakemain.cxx	3 Sep 2008 13:43:18 -0000	1.80.2.3
--- cmakemain.cxx	24 Oct 2008 15:18:55 -0000	1.80.2.4
***************
*** 69,73 ****
     "For true platform independence, CMake provides a list of commands "
     "that can be used on all systems. Run with -E help for the usage "
!    "information."},
    {"-i", "Run in wizard mode.",
     "Wizard mode runs cmake interactively without a GUI.  The user is "
--- 69,77 ----
     "For true platform independence, CMake provides a list of commands "
     "that can be used on all systems. Run with -E help for the usage "
!    "information. Commands availble are: chdir, copy, copy_if_different "
!    "copy_directory, compare_files, echo, echo_append, environment, "
!    "make_directory, md5sum, remove_directory, remove, tar, time, "
!    "touch, touch_nocreate, write_regv, delete_regv, comspec, "
!    "create_symlink."},
    {"-i", "Run in wizard mode.",
     "Wizard mode runs cmake interactively without a GUI.  The user is "
***************
*** 98,102 ****
    {"--debug-trycompile", "Do not delete the try compile directories..",
     "Do not delete the files and directories created for try_compile calls. "
!    "This is useful in debugging failed try_compiles."},
    {"--debug-output", "Put cmake in a debug mode.",
     "Print extra stuff during the cmake run like stack traces with "
--- 102,110 ----
    {"--debug-trycompile", "Do not delete the try compile directories..",
     "Do not delete the files and directories created for try_compile calls. "
!    "This is useful in debugging failed try_compiles. It may however "
!    "change the results of the try-compiles as old junk from a previous "
!    "try-compile may cause a different test to either pass or fail "
!    "incorrectly.  This option is best used for one try-compile at a time, "
!    "and only when debugging." },
    {"--debug-output", "Put cmake in a debug mode.",
     "Print extra stuff during the cmake run like stack traces with "

Index: cmMakefileExecutableTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v
retrieving revision 1.46.2.2
retrieving revision 1.46.2.3
diff -C 2 -d -r1.46.2.2 -r1.46.2.3
*** cmMakefileExecutableTargetGenerator.cxx	3 Sep 2008 13:43:18 -0000	1.46.2.2
--- cmMakefileExecutableTargetGenerator.cxx	24 Oct 2008 15:18:52 -0000	1.46.2.3
***************
*** 354,387 ****
    // Construct object file lists that may be needed to expand the
    // rule.
-   std::string variableName;
-   std::string variableNameExternal;
-   this->WriteObjectsVariable(variableName, variableNameExternal);
    std::string buildObjs;
!   if(useResponseFile)
!     {
!     std::string objects;
!     this->WriteObjectsString(objects);
!     std::string objects_rsp =
!       this->CreateResponseFile("objects.rsp", objects, depends);
!     buildObjs = "@";
!     buildObjs += this->Convert(objects_rsp.c_str(),
!                                cmLocalGenerator::NONE,
!                                cmLocalGenerator::SHELL);
!     }
!   else if(useLinkScript)
!     {
!     this->WriteObjectsString(buildObjs);
!     }
!   else
!     {
!     buildObjs = "$(";
!     buildObjs += variableName;
!     buildObjs += ") $(";
!     buildObjs += variableNameExternal;
!     buildObjs += ")";
!     }
!   std::string cleanObjs = "$(";
!   cleanObjs += variableName;
!   cleanObjs += ")";
  
    cmLocalGenerator::RuleVariables vars;
--- 354,360 ----
    // Construct object file lists that may be needed to expand the
    // rule.
    std::string buildObjs;
!   this->CreateObjectLists(useLinkScript, false, useResponseFile,
!                           buildObjs, depends);
  
    cmLocalGenerator::RuleVariables vars;
***************
*** 441,445 ****
      (commands1,
       this->Makefile->GetStartOutputDirectory(),
!      this->Makefile->GetHomeOutputDirectory());
    commands.insert(commands.end(), commands1.begin(), commands1.end());
    commands1.clear();
--- 414,418 ----
      (commands1,
       this->Makefile->GetStartOutputDirectory(),
!      cmLocalGenerator::HOME_OUTPUT);
    commands.insert(commands.end(), commands1.begin(), commands1.end());
    commands1.clear();
***************
*** 455,459 ****
      this->LocalGenerator->CreateCDCommand(commands1,
                                    this->Makefile->GetStartOutputDirectory(),
!                                   this->Makefile->GetHomeOutputDirectory());
      commands.insert(commands.end(), commands1.begin(), commands1.end());
      commands1.clear();
--- 428,432 ----
      this->LocalGenerator->CreateCDCommand(commands1,
                                    this->Makefile->GetStartOutputDirectory(),
!                                   cmLocalGenerator::HOME_OUTPUT);
      commands.insert(commands.end(), commands1.begin(), commands1.end());
      commands1.clear();

Index: cmDocumentation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentation.cxx,v
retrieving revision 1.69.2.2
retrieving revision 1.69.2.3
diff -C 2 -d -r1.69.2.2 -r1.69.2.3
*** cmDocumentation.cxx	3 Sep 2008 13:43:17 -0000	1.69.2.2
--- cmDocumentation.cxx	24 Oct 2008 15:18:46 -0000	1.69.2.3
***************
*** 203,206 ****
--- 203,226 ----
  
  //----------------------------------------------------------------------------
+ #define DOCUMENT_INTRO(type, default_name, desc) \
+   static char const *cmDocumentation##type##Intro[2] = { default_name, desc };
+ #define GET_DOCUMENT_INTRO(type) cmDocumentation##type##Intro
+ 
+ DOCUMENT_INTRO(Modules, "cmakemodules",
+   "Reference of available CMake modules.");
+ DOCUMENT_INTRO(CustomModules, "cmakecustommodules",
+   "Reference of available CMake custom modules.");
+ DOCUMENT_INTRO(Policies, "cmakepolicies",
+   "Reference of CMake policies.");
+ DOCUMENT_INTRO(Properties, "cmakeprops",
+   "Reference of CMake properties.");
+ DOCUMENT_INTRO(Variables, "cmakevars",
+   "Reference of CMake variables.");
+ DOCUMENT_INTRO(Commands, "cmakecommands",
+   "Reference of available CMake commands.");
+ DOCUMENT_INTRO(CompatCommands, "cmakecompat",
+   "Reference of CMake compatibility commands.");
+ 
+ //----------------------------------------------------------------------------
  cmDocumentation::cmDocumentation()
  :CurrentFormatter(0)
***************
*** 322,326 ****
  
  //----------------------------------------------------------------------------
! bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os)
  {
    if ((this->CurrentFormatter->GetForm() != HTMLForm) 
--- 342,366 ----
  
  //----------------------------------------------------------------------------
! void cmDocumentation::AddDocumentIntroToPrint(const char* intro[2])
! {
!   const char* docname = this->GetDocName(false);
!   if(intro && docname)
!     {
!     cmDocumentationSection* section;
!     std::string desc("");
! 
!     desc += docname;
!     desc += " - ";
!     desc += intro[1];
! 
!     section = new cmDocumentationSection("Introduction", "NAME");
!     section->Append(0, desc.c_str(), 0);
!     this->PrintSections.push_back(section);
!     }
! }
! 
! //----------------------------------------------------------------------------
! bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os,
!                                          const char* docname)
  {
    if ((this->CurrentFormatter->GetForm() != HTMLForm) 
***************
*** 331,334 ****
--- 371,384 ----
      }
  
+   // Handle Document Name. docname==0 disables intro.
+   this->SetDocName("");
+   if (docname)
+     {
+     if (*docname)
+       this->SetDocName(docname);
+     else // empty string was given. select default if possible
+       this->SetDocName(this->GetDefaultDocName(ht));
+     }
+ 
    switch (ht)
      {
***************
*** 596,599 ****
--- 646,650 ----
      std::ofstream* fout = 0;
      std::ostream* s = &os;
+     std::string docname("");
      if(i->Filename.length() > 0)
        {
***************
*** 607,614 ****
          result = false;
          }
        }
      
      // Print this documentation type to the stream.
!     if(!this->PrintDocumentation(i->HelpType, *s) || !*s)
        {
        result = false;
--- 658,669 ----
          result = false;
          }
+       if(i->Filename != "-")
+         {
+         docname = cmSystemTools::GetFilenameWithoutLastExtension(i->Filename);
+         }
        }
      
      // Print this documentation type to the stream.
!     if(!this->PrintDocumentation(i->HelpType, *s, docname.c_str()) || !*s)
        {
        result = false;
***************
*** 635,639 ****
                                                     const std::string& filename)
  {
!   std::string ext = cmSystemTools::GetFilenameExtension(filename);
    ext = cmSystemTools::UpperCase(ext);
    if ((ext == ".HTM") || (ext == ".HTML"))
--- 690,694 ----
                                                     const std::string& filename)
  {
!   std::string ext = cmSystemTools::GetFilenameLastExtension(filename);
    ext = cmSystemTools::UpperCase(ext);
    if ((ext == ".HTM") || (ext == ".HTML"))
***************
*** 871,874 ****
--- 926,935 ----
  
  //----------------------------------------------------------------------------
+ void cmDocumentation::SetDocName(const char *docname)
+ {
+   this->DocName = docname?docname:"";
+ }
+ 
+ //----------------------------------------------------------------------------
  void cmDocumentation::SetSection(const char *name, 
                                   cmDocumentationSection *section)
***************
*** 1234,1238 ****
  {
    this->CreateFullDocumentation();
!   this->CurrentFormatter->PrintHeader(GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
--- 1295,1299 ----
  {
    this->CreateFullDocumentation();
!   this->CurrentFormatter->PrintHeader(GetNameString(), GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
***************
*** 1245,1253 ****
    this->ClearSections();
    this->CreateModulesSection();
    this->AddSectionToPrint("Description");
    this->AddSectionToPrint("Modules");
    this->AddSectionToPrint("Copyright");
    this->AddSectionToPrint("See Also");
!   this->CurrentFormatter->PrintHeader(this->GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
--- 1306,1315 ----
    this->ClearSections();
    this->CreateModulesSection();
+   this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Modules));
    this->AddSectionToPrint("Description");
    this->AddSectionToPrint("Modules");
    this->AddSectionToPrint("Copyright");
    this->AddSectionToPrint("See Also");
!   this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
***************
*** 1260,1263 ****
--- 1322,1326 ----
    this->ClearSections();
    this->CreateCustomModulesSection();
+   this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(CustomModules));
    this->AddSectionToPrint("Description");
    this->AddSectionToPrint("Custom CMake Modules");
***************
*** 1266,1270 ****
    this->AddSectionToPrint("See Also");
  
!   this->CurrentFormatter->PrintHeader(this->GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
--- 1329,1333 ----
    this->AddSectionToPrint("See Also");
  
!   this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
***************
*** 1276,1279 ****
--- 1339,1343 ----
  {
    this->ClearSections();
+   this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Policies));
    this->AddSectionToPrint("Description");
    this->AddSectionToPrint("Policies");
***************
*** 1281,1285 ****
    this->AddSectionToPrint("See Also");
  
!   this->CurrentFormatter->PrintHeader(this->GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
--- 1345,1349 ----
    this->AddSectionToPrint("See Also");
  
!   this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
***************
*** 1291,1294 ****
--- 1355,1359 ----
  {
    this->ClearSections();
+   this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Properties));
    this->AddSectionToPrint("Properties Description");
    for (std::vector<std::string>::iterator i = 
***************
*** 1300,1304 ****
    this->AddSectionToPrint("Copyright");
    this->AddSectionToPrint("Standard See Also");
!   this->CurrentFormatter->PrintHeader(this->GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
--- 1365,1369 ----
    this->AddSectionToPrint("Copyright");
    this->AddSectionToPrint("Standard See Also");
!   this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
***************
*** 1310,1313 ****
--- 1375,1379 ----
  {
    this->ClearSections();
+   this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Variables));
    for (std::vector<std::string>::iterator i = 
           this->VariableSections.begin();
***************
*** 1318,1322 ****
    this->AddSectionToPrint("Copyright");
    this->AddSectionToPrint("Standard See Also");
!   this->CurrentFormatter->PrintHeader(this->GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
--- 1384,1388 ----
    this->AddSectionToPrint("Copyright");
    this->AddSectionToPrint("Standard See Also");
!   this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
***************
*** 1328,1335 ****
  {
    this->ClearSections();
    this->AddSectionToPrint("Commands");
    this->AddSectionToPrint("Copyright");
    this->AddSectionToPrint("Standard See Also");
!   this->CurrentFormatter->PrintHeader(this->GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
--- 1394,1402 ----
  {
    this->ClearSections();
+   this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Commands));
    this->AddSectionToPrint("Commands");
    this->AddSectionToPrint("Copyright");
    this->AddSectionToPrint("Standard See Also");
!   this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
***************
*** 1341,1349 ****
  {
    this->ClearSections();
    this->AddSectionToPrint("Compatibility Commands Description");
    this->AddSectionToPrint("Compatibility Commands");
    this->AddSectionToPrint("Copyright");
    this->AddSectionToPrint("Standard See Also");
!   this->CurrentFormatter->PrintHeader(GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
--- 1408,1417 ----
  {
    this->ClearSections();
+   this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(CompatCommands));
    this->AddSectionToPrint("Compatibility Commands Description");
    this->AddSectionToPrint("Compatibility Commands");
    this->AddSectionToPrint("Copyright");
    this->AddSectionToPrint("Standard See Also");
!   this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os);
    this->Print(os);
    this->CurrentFormatter->PrintFooter(os);
***************
*** 1467,1470 ****
--- 1535,1573 ----
  
  //----------------------------------------------------------------------------
+ const char* cmDocumentation::GetDocName(bool fallbackToNameString) const
+ {
+   if (this->DocName.length() > 0)
+     {
+     return this->DocName.c_str();
+     }
+   else if (fallbackToNameString)
+     {
+     return this->GetNameString();
+     }
+   else
+     return 0;
+ }
+ 
+ //----------------------------------------------------------------------------
+ #define CASE_DEFAULT_DOCNAME(doctype) \
+   case cmDocumentation::doctype : \
+     return GET_DOCUMENT_INTRO(doctype)[0];
+ const char* cmDocumentation::GetDefaultDocName(Type ht) const
+ {
+   switch (ht)
+     {
+     CASE_DEFAULT_DOCNAME(Modules)
+     CASE_DEFAULT_DOCNAME(CustomModules)
+     CASE_DEFAULT_DOCNAME(Policies)
+     CASE_DEFAULT_DOCNAME(Properties)
+     CASE_DEFAULT_DOCNAME(Variables)
+     CASE_DEFAULT_DOCNAME(Commands)
+     CASE_DEFAULT_DOCNAME(CompatCommands)
+     default: break;
+     }
+   return 0;
+ }
+ 
+ //----------------------------------------------------------------------------
  bool cmDocumentation::IsOption(const char* arg) const
  {

Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.107.2.5
retrieving revision 1.107.2.6
diff -C 2 -d -r1.107.2.5 -r1.107.2.6
*** cmGlobalGenerator.h	17 Jul 2008 14:14:25 -0000	1.107.2.5
--- cmGlobalGenerator.h	24 Oct 2008 15:18:46 -0000	1.107.2.6
***************
*** 214,223 ****
    cmTargetManifest const& GetTargetManifest() { return this->TargetManifest; }
  
!   /** Get the content of a directory on disk including the target
!       files to be generated.  This may be called only during the
!       generation step.  It is intended for use only by
!       cmComputeLinkInformation.  */
    std::set<cmStdString> const& GetDirectoryContent(std::string const& dir,
!                                                    bool needDisk);
  
    void AddTarget(cmTargets::value_type &v);
--- 214,223 ----
    cmTargetManifest const& GetTargetManifest() { return this->TargetManifest; }
  
!   /** Get the content of a directory.  Directory listings are loaded
!       from disk at most once and cached.  During the generation step
!       the content will include the target files to be built even if
!       they do not yet exist.  */
    std::set<cmStdString> const& GetDirectoryContent(std::string const& dir,
!                                                    bool needDisk = true);
  
    void AddTarget(cmTargets::value_type &v);
***************
*** 281,285 ****
    cmTarget CreateGlobalTarget(const char* name, const char* message,
      const cmCustomCommandLines* commandLines,
!     std::vector<std::string> depends, bool depends_on_all = false);
  
    bool NeedSymbolicMark;
--- 281,286 ----
    cmTarget CreateGlobalTarget(const char* name, const char* message,
      const cmCustomCommandLines* commandLines,
!     std::vector<std::string> depends, const char* workingDir,
!                               bool depends_on_all = false);
  
    bool NeedSymbolicMark;

Index: cmDocumentationFormatterMan.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatterMan.cxx,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C 2 -d -r1.5 -r1.5.2.1
*** cmDocumentationFormatterMan.cxx	22 Oct 2007 16:48:39 -0000	1.5
--- cmDocumentationFormatterMan.cxx	24 Oct 2008 15:18:46 -0000	1.5.2.1
***************
*** 58,67 ****
  }
  
  void cmDocumentationFormatterMan::PrintPreformatted(std::ostream& os, 
                                                      const char* text)
  {
    std::string man_text = text;
!   cmSystemTools::ReplaceString(man_text, "\\", "\\\\");
!   os << man_text << "\n";
  }
  
--- 58,76 ----
  }
  
+ void cmDocumentationFormatterMan::EscapeText(std::string& man_text)
+ {
+   cmSystemTools::ReplaceString(man_text, "\\", "\\\\");
+   cmSystemTools::ReplaceString(man_text, "-", "\\-");
+ }
+ 
  void cmDocumentationFormatterMan::PrintPreformatted(std::ostream& os, 
                                                      const char* text)
  {
    std::string man_text = text;
!   this->EscapeText(man_text);
!   os << ".nf\n" << man_text;
!   if (*text && man_text.at(man_text.length()-1) != '\n')
!       os << "\n";
!   os << ".fi\n";
  }
  
***************
*** 70,74 ****
  {
    std::string man_text = text;
!   cmSystemTools::ReplaceString(man_text, "\\", "\\\\");
    os << man_text << "\n\n";
  }
--- 79,83 ----
  {
    std::string man_text = text;
!   this->EscapeText(man_text);
    os << man_text << "\n\n";
  }
***************
*** 76,85 ****
  
  //----------------------------------------------------------------------------
! void cmDocumentationFormatterMan::PrintHeader(const char* name, 
                                                std::ostream& os)
  {
!   os << ".TH " << name << " 1 \""
      << cmSystemTools::GetCurrentDateTime("%B %d, %Y").c_str()
!     << "\" \"" << name
      << " " << cmVersion::GetCMakeVersion()
      << "\"\n";
--- 85,99 ----
  
  //----------------------------------------------------------------------------
! void cmDocumentationFormatterMan::PrintHeader(const char* docname,
!                                               const char* appname,
                                                std::ostream& os)
  {
!   std::string s_docname(docname), s_appname(appname);
! 
!   this->EscapeText(s_docname);
!   this->EscapeText(s_appname);
!   os << ".TH " << s_docname << " 1 \""
      << cmSystemTools::GetCurrentDateTime("%B %d, %Y").c_str()
!     << "\" \"" << s_appname
      << " " << cmVersion::GetCMakeVersion()
      << "\"\n";

Index: cmEnableLanguageCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmEnableLanguageCommand.cxx,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C 2 -d -r1.5 -r1.5.2.1
*** cmEnableLanguageCommand.cxx	23 Jan 2008 15:27:59 -0000	1.5
--- cmEnableLanguageCommand.cxx	24 Oct 2008 15:18:46 -0000	1.5.2.1
***************
*** 26,30 ****
      {
      this->SetError
!       ("ENABLE_LANGUAGE called with incorrect number of arguments");
      return false;
      } 
--- 26,30 ----
      {
      this->SetError
!       ("called with incorrect number of arguments");
      return false;
      } 

Index: cmDocumentationFormatterDocbook.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatterDocbook.h,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C 2 -d -r1.1 -r1.1.2.1
*** cmDocumentationFormatterDocbook.h	19 Feb 2008 19:33:43 -0000	1.1
--- cmDocumentationFormatterDocbook.h	24 Oct 2008 15:18:46 -0000	1.1.2.1
***************
*** 32,36 ****
                                    { return cmDocumentationEnums::DocbookForm;}
  
!   virtual void PrintHeader(const char* name, std::ostream& os);
    virtual void PrintFooter(std::ostream& os);
    virtual void PrintSection(std::ostream& os,
--- 32,37 ----
                                    { return cmDocumentationEnums::DocbookForm;}
  
!   virtual void PrintHeader(const char* docname, const char* appname,
!                            std::ostream& os);
    virtual void PrintFooter(std::ostream& os);
    virtual void PrintSection(std::ostream& os,

Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.463.2.8
retrieving revision 1.463.2.9
diff -C 2 -d -r1.463.2.8 -r1.463.2.9
*** cmMakefile.cxx	3 Sep 2008 13:43:17 -0000	1.463.2.8
--- cmMakefile.cxx	24 Oct 2008 15:18:52 -0000	1.463.2.9
***************
*** 84,88 ****
    this->AddSourceGroup
      ("Source Files",
!      "\\.(C|M|c|c\\+\\+|cc|cpp|cxx|f|f90|for|fpp|ftn|m|mm|rc|def|r|odl|idl|hpj|bat)$");
    this->AddSourceGroup("Header Files",
                         "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$");
--- 84,89 ----
    this->AddSourceGroup
      ("Source Files",
!      "\\.(C|M|c|c\\+\\+|cc|cpp|cxx|f|f90|for|fpp"
!      "|ftn|m|mm|rc|def|r|odl|idl|hpj|bat)$");
    this->AddSourceGroup("Header Files",
                         "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$");
***************
*** 120,123 ****
--- 121,125 ----
    this->HeaderFileExtensions = mf.HeaderFileExtensions;
    this->DefineFlags = mf.DefineFlags;
+   this->DefineFlagsOrig = mf.DefineFlagsOrig;
  
  #if defined(CMAKE_BUILD_WITH_CMAKE)
***************
*** 982,991 ****
  
  //----------------------------------------------------------------------------
! void cmMakefile::AddUtilityCommand(const char* utilityName,
!                                    bool excludeFromAll,
!                                    const char* workingDirectory,
!                                    const std::vector<std::string>& depends,
!                                    const cmCustomCommandLines& commandLines,
!                                    bool escapeOldStyle, const char* comment)
  {
    // Create a target instance for this utility.
--- 984,994 ----
  
  //----------------------------------------------------------------------------
! cmTarget*
! cmMakefile::AddUtilityCommand(const char* utilityName,
!                               bool excludeFromAll,
!                               const char* workingDirectory,
!                               const std::vector<std::string>& depends,
!                               const cmCustomCommandLines& commandLines,
!                               bool escapeOldStyle, const char* comment)
  {
    // Create a target instance for this utility.
***************
*** 1025,1028 ****
--- 1028,1032 ----
                           force.c_str());
      }
+   return target;
  }
  
***************
*** 1335,1338 ****
--- 1339,1343 ----
    // define flags
    this->DefineFlags = parent->DefineFlags;
+   this->DefineFlagsOrig = parent->DefineFlagsOrig;
  
    // Include transform property.  There is no per-config version.
***************
*** 2164,2168 ****
    parser.SetRemoveEmpty(removeEmpty);
    int res = parser.ParseString(source.c_str(), 0);
!   if ( res )
      {
      source = parser.GetResult();
--- 2169,2174 ----
    parser.SetRemoveEmpty(removeEmpty);
    int res = parser.ParseString(source.c_str(), 0);
!   const char* emsg = parser.GetError();
!   if ( res && !emsg[0] )
      {
      source = parser.GetResult();
***************
*** 2170,2189 ****
    else
      {
      cmOStringStream error;
!     error << "Syntax error in cmake code at\n"
!           << (filename?filename:"(no filename given)")
!           << ":" << line << ":\n"
!           << parser.GetError() << ", when parsing string \""
!           << source.c_str() << "\"";
!     if(this->NeedBackwardsCompatibility(2,0))
        {
!       cmSystemTools::Error(error.str().c_str());
!       cmSystemTools::SetFatalErrorOccured();
!       return source.c_str();
        }
!     else
        {
!       cmSystemTools::Message(error.str().c_str());
        }
      }
    return source.c_str();
--- 2176,2226 ----
    else
      {
+     // Construct the main error message.
      cmOStringStream error;
!     error << "Syntax error in cmake code ";
!     if(filename && line > 0)
        {
!       // This filename and line number may be more specific than the
!       // command context because one command invocation can have
!       // arguments on multiple lines.
!       error << "at\n"
!             << "  " << filename << ":" << line << "\n";
        }
!     error << "when parsing string\n"
!           << "  " << source.c_str() << "\n";
!     error << emsg;
! 
!     // If the parser failed ("res" is false) then this is a real
!     // argument parsing error, so the policy applies.  Otherwise the
!     // parser reported an error message without failing because the
!     // helper implementation is unhappy, which has always reported an
!     // error.
!     cmake::MessageType mtype = cmake::FATAL_ERROR;
!     if(!res)
        {
!       // This is a real argument parsing error.  Use policy CMP0010 to
!       // decide whether it is an error.
!       switch(this->GetPolicyStatus(cmPolicies::CMP0010))
!         {
!         case cmPolicies::WARN:
!           error << "\n"
!                 << (this->GetPolicies()
!                     ->GetPolicyWarning(cmPolicies::CMP0010));
!         case cmPolicies::OLD:
!           // OLD behavior is to just warn and continue.
!           mtype = cmake::AUTHOR_WARNING;
!           break;
!         case cmPolicies::REQUIRED_IF_USED:
!         case cmPolicies::REQUIRED_ALWAYS:
!           error << "\n"
!                 << (this->GetPolicies()
!                     ->GetRequiredPolicyError(cmPolicies::CMP0010));
!         case cmPolicies::NEW:
!           // NEW behavior is to report the error.
!           cmSystemTools::SetFatalErrorOccured();
!           break;
!         }
        }
+     this->IssueMessage(mtype, error.str());
      }
    return source.c_str();
***************
*** 2328,2332 ****
  }
  
! void cmMakefile::ExpandArguments(
    std::vector<cmListFileArgument> const& inArgs,
    std::vector<std::string>& outArgs)
--- 2365,2369 ----
  }
  
! bool cmMakefile::ExpandArguments(
    std::vector<cmListFileArgument> const& inArgs,
    std::vector<std::string>& outArgs)
***************
*** 2354,2357 ****
--- 2391,2395 ----
        }
      }
+   return !cmSystemTools::GetFatalErrorOccured();
  }
  

Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.269.2.7
retrieving revision 1.269.2.8
diff -C 2 -d -r1.269.2.7 -r1.269.2.8
*** cmLocalGenerator.cxx	3 Sep 2008 13:43:17 -0000	1.269.2.7
--- cmLocalGenerator.cxx	24 Oct 2008 15:18:48 -0000	1.269.2.8
***************
*** 1075,1094 ****
  }
  
! 
! std::string 
! cmLocalGenerator::ConvertToOutputForExisting(const char* p)
  {
!   std::string ret = p;
!   if(this->WindowsShell && ret.find(' ') != ret.npos 
!      && cmSystemTools::FileExists(p))
      {
!     if(cmSystemTools::GetShortPath(p, ret))
        {
!       return  this->Convert(ret.c_str(), NONE, SHELL, true);
        }
      }
!   return this->Convert(p, START_OUTPUT, SHELL, true);
  }
  
  const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
  {
--- 1075,1126 ----
  }
  
! //----------------------------------------------------------------------------
! std::string
! cmLocalGenerator::ConvertToOutputForExistingCommon(const char* remote,
!                                                    std::string const& result)
  {
!   // If this is a windows shell, the result has a space, and the path
!   // already exists, we can use a short-path to reference it without a
!   // space.
!   if(this->WindowsShell && result.find(' ') != result.npos &&
!      cmSystemTools::FileExists(remote))
      {
!     std::string tmp;
!     if(cmSystemTools::GetShortPath(remote, tmp))
        {
!       return this->Convert(tmp.c_str(), NONE, SHELL, true);
        }
      }
! 
!   // Otherwise, leave it unchanged.
!   return result;
  }
  
+ //----------------------------------------------------------------------------
+ std::string
+ cmLocalGenerator::ConvertToOutputForExisting(const char* remote,
+                                              RelativeRoot local)
+ {
+   // Perform standard conversion.
+   std::string result = this->Convert(remote, local, SHELL, true);
+ 
+   // Consider short-path.
+   return this->ConvertToOutputForExistingCommon(remote, result);
+ }
+ 
+ //----------------------------------------------------------------------------
+ std::string
+ cmLocalGenerator::ConvertToOutputForExisting(RelativeRoot remote,
+                                              const char* local)
+ {
+   // Perform standard conversion.
+   std::string result = this->Convert(remote, local, SHELL, true);
+ 
+   // Consider short-path.
+   const char* remotePath = this->GetRelativeRootPath(remote);
+   return this->ConvertToOutputForExistingCommon(remotePath, result);
+ }
+ 
+ //----------------------------------------------------------------------------
  const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
  {
***************
*** 1156,1162 ****
        if(emitted.insert(frameworkDir).second)
          {
!         includeFlags 
!           << "-F" 
!           << this->ConvertToOutputForExisting(frameworkDir.c_str()) << " ";
          }
        continue;
--- 1188,1196 ----
        if(emitted.insert(frameworkDir).second)
          {
!         includeFlags
!           << "-F" << this->Convert(frameworkDir.c_str(),
!                                    cmLocalGenerator::START_OUTPUT,
!                                    cmLocalGenerator::SHELL, true)
!           << " ";
          }
        continue;
***************
*** 1984,1988 ****
  
  //----------------------------------------------------------------------------
! std::string cmLocalGenerator::Convert(const char* source, 
                                        RelativeRoot relative,
                                        OutputFormat output,
--- 2018,2036 ----
  
  //----------------------------------------------------------------------------
! const char* cmLocalGenerator::GetRelativeRootPath(RelativeRoot relroot)
! {
!   switch (relroot)
!     {
!     case HOME:         return this->Makefile->GetHomeDirectory();
!     case START:        return this->Makefile->GetStartDirectory();
!     case HOME_OUTPUT:  return this->Makefile->GetHomeOutputDirectory();
!     case START_OUTPUT: return this->Makefile->GetStartOutputDirectory();
!     default: break;
!     }
!   return 0;
! }
! 
! //----------------------------------------------------------------------------
! std::string cmLocalGenerator::Convert(const char* source,
                                        RelativeRoot relative,
                                        OutputFormat output,
***************
*** 2032,2036 ****
        }
      }
!   // Now convert it to an output path.
    if (output == MAKEFILE)
      {
--- 2080,2092 ----
        }
      }
!   return this->ConvertToOutputFormat(result.c_str(), output);
! }
! 
! //----------------------------------------------------------------------------
! std::string cmLocalGenerator::ConvertToOutputFormat(const char* source,
!                                                     OutputFormat output)
! {
!   std::string result = source;
!   // Convert it to an output path.
    if (output == MAKEFILE)
      {
***************
*** 2065,2068 ****
--- 2121,2158 ----
  
  //----------------------------------------------------------------------------
+ std::string cmLocalGenerator::Convert(RelativeRoot remote,
+                                       const char* local,
+                                       OutputFormat output,
+                                       bool optional)
+ {
+   const char* remotePath = this->GetRelativeRootPath(remote);
+   if(local && (!optional || this->UseRelativePaths))
+     {
+     std::vector<std::string> components;
+     std::string result;
+     switch(remote)
+       {
+       case HOME:
+       case HOME_OUTPUT:
+       case START:
+       case START_OUTPUT:
+         cmSystemTools::SplitPath(local, components);
+         result = this->ConvertToRelativePath(components, remotePath);
+         break;
+       case FULL:
+         result = remotePath;
+         break;
+       case NONE:
+         break;
+       }
+     return this->ConvertToOutputFormat(result.c_str(), output);
+     }
+   else
+     {
+     return this->ConvertToOutputFormat(remotePath, output);
+     }
+ }
+ 
+ //----------------------------------------------------------------------------
  std::string cmLocalGenerator::FindRelativePathTopSource()
  {

Index: cmListFileCache.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmListFileCache.cxx,v
retrieving revision 1.41.2.3
retrieving revision 1.41.2.4
diff -C 2 -d -r1.41.2.3 -r1.41.2.4
*** cmListFileCache.cxx	1 May 2008 16:35:39 -0000	1.41.2.3
--- cmListFileCache.cxx	24 Oct 2008 15:18:48 -0000	1.41.2.4
***************
*** 243,251 ****
    // Arguments.
    unsigned long lastLine = cmListFileLexer_GetCurrentLine(lexer);
    while((token = cmListFileLexer_Scan(lexer)))
      {
!     if(token->type == cmListFileLexer_Token_ParenRight)
        {
!       return true;
        }
      else if(token->type == cmListFileLexer_Token_Identifier ||
--- 243,266 ----
    // Arguments.
    unsigned long lastLine = cmListFileLexer_GetCurrentLine(lexer);
+   unsigned long parenDepth = 0;
    while((token = cmListFileLexer_Scan(lexer)))
      {
!     if(token->type == cmListFileLexer_Token_ParenLeft)
        {
!       parenDepth++;
!       cmListFileArgument a("(",
!                            false, filename, token->line);
!       function.Arguments.push_back(a);
!       }
!     else if(token->type == cmListFileLexer_Token_ParenRight)
!       {
!       if (parenDepth == 0)
!         {
!         return true;
!         }
!       parenDepth--;
!       cmListFileArgument a(")",
!                            false, filename, token->line);
!       function.Arguments.push_back(a);        
        }
      else if(token->type == cmListFileLexer_Token_Identifier ||

Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.227.2.7
retrieving revision 1.227.2.8
diff -C 2 -d -r1.227.2.7 -r1.227.2.8
*** cmGlobalGenerator.cxx	3 Sep 2008 13:43:17 -0000	1.227.2.7
--- cmGlobalGenerator.cxx	24 Oct 2008 15:18:46 -0000	1.227.2.8
***************
*** 732,735 ****
--- 732,736 ----
    this->ProjectMap.clear();
    this->RuleHashes.clear();
+   this->DirectoryContentMap.clear();
  
    // start with this directory
***************
*** 948,952 ****
           l != targets.end(); l++)
        {
!       const cmTarget::LinkLibraryVectorType& libs=l->second.GetLinkLibraries();
        for(cmTarget::LinkLibraryVectorType::const_iterator lib = libs.begin();
            lib != libs.end(); ++lib)
--- 949,954 ----
           l != targets.end(); l++)
        {
!       const cmTarget::LinkLibraryVectorType& libs =
!         l->second.GetOriginalLinkLibraries();
        for(cmTarget::LinkLibraryVectorType::const_iterator lib = libs.begin();
            lib != libs.end(); ++lib)
***************
*** 1558,1561 ****
--- 1560,1564 ----
  
    // CPack
+   std::string workingDir =  mf->GetStartOutputDirectory();
    cmCustomCommandLines cpackCommandLines;
    std::vector<std::string> depends;
***************
*** 1570,1574 ****
    std::string configFile = mf->GetStartOutputDirectory();;
    configFile += "/CPackConfig.cmake";
!   singleLine.push_back(configFile);
    cpackCommandLines.push_back(singleLine);
    if ( this->GetPreinstallTargetName() )
--- 1573,1578 ----
    std::string configFile = mf->GetStartOutputDirectory();;
    configFile += "/CPackConfig.cmake";
!   std::string relConfigFile = "./CPackConfig.cmake";
!   singleLine.push_back(relConfigFile);
    cpackCommandLines.push_back(singleLine);
    if ( this->GetPreinstallTargetName() )
***************
*** 1590,1594 ****
        = this->CreateGlobalTarget(this->GetPackageTargetName(),
                                   "Run CPack packaging tool...",
!                                  &cpackCommandLines, depends);
      }
    // CPack source
--- 1594,1599 ----
        = this->CreateGlobalTarget(this->GetPackageTargetName(),
                                   "Run CPack packaging tool...",
!                                  &cpackCommandLines, depends,
!                                  workingDir.c_str());
      }
    // CPack source
***************
*** 1603,1607 ****
      singleLine.push_back("--config");
      configFile = mf->GetStartOutputDirectory();;
!     configFile += "/CPackSourceConfig.cmake";
      if(cmSystemTools::FileExists(configFile.c_str()))
        {
--- 1608,1614 ----
      singleLine.push_back("--config");
      configFile = mf->GetStartOutputDirectory();;
!     configFile += "/CPackSourceCConfig.cmake";
!     relConfigFile = "./CPackSourceConfig.cmake";
!     singleLine.push_back(relConfigFile);
      if(cmSystemTools::FileExists(configFile.c_str()))
        {
***************
*** 1611,1615 ****
          = this->CreateGlobalTarget(packageSourceTargetName,
                                     "Run CPack packaging tool for source...",
!                                    &cpackCommandLines, depends);
        }
      }
--- 1618,1624 ----
          = this->CreateGlobalTarget(packageSourceTargetName,
                                     "Run CPack packaging tool for source...",
!                                    &cpackCommandLines, depends,
!                                    workingDir.c_str()
!                                    );
        }
      }
***************
*** 1636,1640 ****
      (*targets)[this->GetTestTargetName()]
        = this->CreateGlobalTarget(this->GetTestTargetName(),
!         "Running tests...", &cpackCommandLines, depends);
      }
  
--- 1645,1649 ----
      (*targets)[this->GetTestTargetName()]
        = this->CreateGlobalTarget(this->GetTestTargetName(),
!         "Running tests...", &cpackCommandLines, depends, 0);
      }
  
***************
*** 1659,1663 ****
          this->CreateGlobalTarget(
            editCacheTargetName, "Running CMake cache editor...",
!           &cpackCommandLines, depends);
        }
      else
--- 1668,1672 ----
          this->CreateGlobalTarget(
            editCacheTargetName, "Running CMake cache editor...",
!           &cpackCommandLines, depends, 0);
        }
      else
***************
*** 1671,1675 ****
            editCacheTargetName,
            "Running interactive CMake command-line interface...",
!           &cpackCommandLines, depends);
        }
      }
--- 1680,1684 ----
            editCacheTargetName,
            "Running interactive CMake command-line interface...",
!           &cpackCommandLines, depends, 0);
        }
      }
***************
*** 1690,1694 ****
        this->CreateGlobalTarget(
          rebuildCacheTargetName, "Running CMake to regenerate build system...",
!         &cpackCommandLines, depends);
      }
  
--- 1699,1703 ----
        this->CreateGlobalTarget(
          rebuildCacheTargetName, "Running CMake to regenerate build system...",
!         &cpackCommandLines, depends, 0);
      }
  
***************
*** 1723,1727 ****
          = this->CreateGlobalTarget("list_install_components",
            ostr.str().c_str(),
!           &cpackCommandLines, depends);
        }
      std::string cmd;
--- 1732,1736 ----
          = this->CreateGlobalTarget("list_install_components",
            ostr.str().c_str(),
!           &cpackCommandLines, depends, 0);
        }
      std::string cmd;
***************
*** 1772,1776 ****
        this->CreateGlobalTarget(
          this->GetInstallTargetName(), "Install the project...",
!         &cpackCommandLines, depends);
  
      // install_local
--- 1781,1785 ----
        this->CreateGlobalTarget(
          this->GetInstallTargetName(), "Install the project...",
!         &cpackCommandLines, depends, 0);
  
      // install_local
***************
*** 1788,1792 ****
          this->CreateGlobalTarget(
            install_local, "Installing only the local directory...",
!           &cpackCommandLines, depends);
        }
  
--- 1797,1801 ----
          this->CreateGlobalTarget(
            install_local, "Installing only the local directory...",
!           &cpackCommandLines, depends, 0);
        }
  
***************
*** 1805,1809 ****
          this->CreateGlobalTarget(
            install_strip, "Installing the project stripped...",
!           &cpackCommandLines, depends);
        }
      }
--- 1814,1818 ----
          this->CreateGlobalTarget(
            install_strip, "Installing the project stripped...",
!           &cpackCommandLines, depends, 0);
        }
      }
***************
*** 1814,1817 ****
--- 1823,1827 ----
    const cmCustomCommandLines* commandLines,
    std::vector<std::string> depends,
+   const char* workingDirectory,
    bool depends_on_all /* = false */)
  {
***************
*** 1825,1829 ****
    std::vector<std::string> no_depends;
    // Store the custom command in the target.
!   cmCustomCommand cc(no_outputs, no_depends, *commandLines, 0, 0);
    target.GetPostBuildCommands().push_back(cc);
    target.SetProperty("EchoString", message);
--- 1835,1840 ----
    std::vector<std::string> no_depends;
    // Store the custom command in the target.
!   cmCustomCommand cc(no_outputs, no_depends, *commandLines, 0,
!                      workingDirectory);
    target.GetPostBuildCommands().push_back(cc);
    target.SetProperty("EchoString", message);

Index: cmDocumentationFormatterHTML.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatterHTML.h,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -C 2 -d -r1.3 -r1.3.2.1
*** cmDocumentationFormatterHTML.h	5 Mar 2008 16:05:22 -0000	1.3
--- cmDocumentationFormatterHTML.h	24 Oct 2008 15:18:46 -0000	1.3.2.1
***************
*** 31,35 ****
                                        { return cmDocumentationEnums::HTMLForm;}
  
!   virtual void PrintHeader(const char* name, std::ostream& os);
    virtual void PrintFooter(std::ostream& os);
    virtual void PrintSection(std::ostream& os,
--- 31,36 ----
                                        { return cmDocumentationEnums::HTMLForm;}
  
!   virtual void PrintHeader(const char* docname, const char* appname,
!                            std::ostream& os);
    virtual void PrintFooter(std::ostream& os);
    virtual void PrintSection(std::ostream& os,

Index: cmSourceFile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.cxx,v
retrieving revision 1.47.2.3
retrieving revision 1.47.2.4
diff -C 2 -d -r1.47.2.3 -r1.47.2.4
*** cmSourceFile.cxx	29 May 2008 13:15:31 -0000	1.47.2.3
--- cmSourceFile.cxx	24 Oct 2008 15:18:54 -0000	1.47.2.4
***************
*** 508,515 ****
  
    cm->DefineProperty
!     ("OBJECT_DEPENDS", cmProperty::SOURCE_FILE, 
!      "Additional dependencies.",
!      "Additional dependencies that should be checked as part of "
!      "building this source file.");
  
    cm->DefineProperty
--- 508,527 ----
  
    cm->DefineProperty
!     ("OBJECT_DEPENDS", cmProperty::SOURCE_FILE,
!      "Additional files on which a compiled object file depends.",
!      "Specifies a semicolon-separated list of full-paths to files on which "
!      "any object files compiled from this source file depend.  "
!      "An object file will be recompiled if any of the named files is newer "
!      "than it.\n"
!      "This property need not be used to specify the dependency of a "
!      "source file on a generated header file that it includes.  "
!      "Although the property was originally introduced for this purpose, it "
!      "is no longer necessary.  "
!      "If the generated header file is created by a custom command in the "
!      "same target as the source file, the automatic dependency scanning "
!      "process will recognize the dependency.  "
!      "If the generated header file is created by another target, an "
!      "inter-target dependency should be created with the add_dependencies "
!      "command (if one does not already exist due to linking relationships).");
  
    cm->DefineProperty

Index: cmCTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.cxx,v
retrieving revision 1.334
retrieving revision 1.334.2.1
diff -C 2 -d -r1.334 -r1.334.2.1
*** cmCTest.cxx	3 Feb 2008 13:57:41 -0000	1.334
--- cmCTest.cxx	24 Oct 2008 15:18:45 -0000	1.334.2.1
***************
*** 50,57 ****
  #include <memory> // auto_ptr
  
! #if defined(__BEOS__)
  #include <be/kernel/OS.h>   /* disable_debugger() API. */
  #endif
  
  #define DEBUGOUT std::cout << __LINE__ << " "; std::cout
  #define DEBUGERR std::cerr << __LINE__ << " "; std::cerr
--- 50,62 ----
  #include <memory> // auto_ptr
  
! #if defined(__BEOS__) && !defined(__HAIKU__)
  #include <be/kernel/OS.h>   /* disable_debugger() API. */
  #endif
  
+ #if defined(__HAIKU__)
+ #include <os/kernel/OS.h>   /* disable_debugger() API. */
+ #endif
+ 
+ 
  #define DEBUGOUT std::cout << __LINE__ << " "; std::cout
  #define DEBUGERR std::cerr << __LINE__ << " "; std::cerr
***************
*** 608,612 ****
  #if defined(_WIN32)
    SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
! #elif defined(__BEOS__)
    disable_debugger(1);
  #endif
--- 613,617 ----
  #if defined(_WIN32)
    SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
! #elif defined(__BEOS__) || defined(__HAIKU__)
    disable_debugger(1);
  #endif

Index: cmInstallTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallTargetGenerator.cxx,v
retrieving revision 1.62.2.3
retrieving revision 1.62.2.4
diff -C 2 -d -r1.62.2.3 -r1.62.2.4
*** cmInstallTargetGenerator.cxx	29 May 2008 13:15:30 -0000	1.62.2.3
--- cmInstallTargetGenerator.cxx	24 Oct 2008 15:18:48 -0000	1.62.2.4
***************
*** 58,71 ****
      }
  
-   // Track indentation.
-   Indent indent;
- 
-   // Begin this block of installation.
-   std::string component_test =
-     this->CreateComponentTest(this->Component.c_str());
-   os << indent << "IF(" << component_test << ")\n";
- 
    // Compute the build tree directory from which to copy the target.
!   std::string fromDir;
    if(this->Target->NeedRelinkBeforeInstall())
      {
--- 58,63 ----
      }
  
    // Compute the build tree directory from which to copy the target.
!   std::string& fromDir = this->FromDir;
    if(this->Target->NeedRelinkBeforeInstall())
      {
***************
*** 80,147 ****
      }
  
!   // Generate a portion of the script for each configuration.
    if(this->ConfigurationTypes->empty())
      {
!     this->GenerateScriptForConfig(os, fromDir.c_str(),
!                                   this->ConfigurationName,
!                                   indent.Next());
      }
    else
      {
      for(std::vector<std::string>::const_iterator i =
            this->ConfigurationTypes->begin();
          i != this->ConfigurationTypes->end(); ++i)
        {
!       this->GenerateScriptForConfig(os, fromDir.c_str(), i->c_str(),
!                                     indent.Next());
        }
      }
  
!   // End this block of installation.
!   os << indent << "ENDIF(" << component_test << ")\n\n";
  }
  
  //----------------------------------------------------------------------------
  void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
-                                                        const char* fromDir,
                                                         const char* config,
                                                         Indent const& indent)
  {
    // Compute the per-configuration directory containing the files.
!   std::string fromDirConfig = fromDir;
    this->Target->GetMakefile()->GetLocalGenerator()->GetGlobalGenerator()
      ->AppendDirectoryForConfig("", config, "/", fromDirConfig);
  
-   if(config && *config)
-     {
-     // Skip this configuration for config-specific installation that
-     // does not match it.
-     if(!this->InstallsForConfig(config))
-       {
-       return;
-       }
- 
-     // Generate a per-configuration block.
-     std::string config_test = this->CreateConfigTest(config);
-     os << indent << "IF(" << config_test << ")\n";
-     this->GenerateScriptForConfigDir(os, fromDirConfig.c_str(), config,
-                                      indent.Next());
-     os << indent << "ENDIF(" << config_test << ")\n";
-     }
-   else
-     {
-     this->GenerateScriptForConfigDir(os, fromDirConfig.c_str(), config,
-                                      indent);
-     }
- }
- 
- //----------------------------------------------------------------------------
- void
- cmInstallTargetGenerator
- ::GenerateScriptForConfigDir(std::ostream& os,
-                              const char* fromDirConfig,
-                              const char* config,
-                              Indent const& indent)
- {
    // Compute the full path to the main installed file for this target.
    NameType nameType = this->ImportLibrary? NameImplib : NameNormal;
--- 72,131 ----
      }
  
!   // Perform the main install script generation.
!   this->cmInstallGenerator::GenerateScript(os);
! }
! 
! //----------------------------------------------------------------------------
! void cmInstallTargetGenerator::GenerateScriptConfigs(std::ostream& os,
!                                                      Indent const& indent)
! {
    if(this->ConfigurationTypes->empty())
      {
!     // In a single-configuration generator, only the install rule's
!     // configuration test is important.  If that passes, the target is
!     // installed regardless of for what configuration it was built.
!     this->cmInstallGenerator::GenerateScriptConfigs(os, indent);
      }
    else
      {
+     // In a multi-configuration generator, a separate rule is produced
+     // in a block for each configuration that is built.  However, the
+     // list of configurations is restricted to those for which this
+     // install rule applies.
      for(std::vector<std::string>::const_iterator i =
            this->ConfigurationTypes->begin();
          i != this->ConfigurationTypes->end(); ++i)
        {
!       const char* config = i->c_str();
!       if(this->InstallsForConfig(config))
!         {
!         // Generate a per-configuration block.
!         std::string config_test = this->CreateConfigTest(config);
!         os << indent << "IF(" << config_test << ")\n";
!         this->GenerateScriptForConfig(os, config, indent.Next());
!         os << indent << "ENDIF(" << config_test << ")\n";
!         }
        }
      }
+ }
  
! //----------------------------------------------------------------------------
! void cmInstallTargetGenerator::GenerateScriptActions(std::ostream& os,
!                                                      Indent const& indent)
! {
!   // This is reached for single-configuration generators only.
!   this->GenerateScriptForConfig(os, this->ConfigurationName, indent);
  }
  
  //----------------------------------------------------------------------------
  void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
                                                         const char* config,
                                                         Indent const& indent)
  {
    // Compute the per-configuration directory containing the files.
!   std::string fromDirConfig = this->FromDir;
    this->Target->GetMakefile()->GetLocalGenerator()->GetGlobalGenerator()
      ->AppendDirectoryForConfig("", config, "/", fromDirConfig);
  
    // Compute the full path to the main installed file for this target.
    NameType nameType = this->ImportLibrary? NameImplib : NameNormal;

Index: cmFindPackageCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPackageCommand.cxx,v
retrieving revision 1.36.2.4
retrieving revision 1.36.2.5
diff -C 2 -d -r1.36.2.4 -r1.36.2.5
*** cmFindPackageCommand.cxx	12 Sep 2008 14:56:20 -0000	1.36.2.4
--- cmFindPackageCommand.cxx	24 Oct 2008 15:18:46 -0000	1.36.2.5
***************
*** 92,95 ****
--- 92,98 ----
      "should be compatible (format is major[.minor[.patch[.tweak]]]).  "
      "The EXACT option requests that the version be matched exactly.  "
+     "If no [version] is given to a recursive invocation inside a "
+     "find-module, the [version] and EXACT arguments are forwarded "
+     "automatically from the outer call.  "
      "Version support is currently provided only on a package-by-package "
      "basis (details below).\n"
***************
*** 186,189 ****
--- 189,193 ----
      "  PACKAGE_VERSION_EXACT      = true if version is exact match\n"
      "  PACKAGE_VERSION_COMPATIBLE = true if version is compatible\n"
+     "  PACKAGE_VERSION_UNSUITABLE = true if unsuitable as any version\n"
      "These variables are checked by the find_package command to determine "
      "whether the configuration file provides an acceptable version.  "
***************
*** 469,472 ****
--- 473,505 ----
      }
  
+   // Ignore EXACT with no version.
+   if(this->Version.empty() && this->VersionExact)
+     {
+     this->VersionExact = false;
+     this->Makefile->IssueMessage(
+       cmake::AUTHOR_WARNING, "Ignoring EXACT since no version is requested.");
+     }
+ 
+   if(this->Version.empty())
+     {
+     // Check whether we are recursing inside "Find<name>.cmake" within
+     // another find_package(<name>) call.
+     std::string mod = this->Name;
+     mod += "_FIND_MODULE";
+     if(this->Makefile->IsOn(mod.c_str()))
+       {
+       // Get version information from the outer call if necessary.
+       // Requested version string.
+       std::string ver = this->Name;
+       ver += "_FIND_VERSION";
+       this->Version = this->Makefile->GetSafeDefinition(ver.c_str());
+ 
+       // Whether an exact version is required.
+       std::string exact = this->Name;
+       exact += "_FIND_VERSION_EXACT";
+       this->VersionExact = this->Makefile->IsOn(exact.c_str());
+       }
+     }
+ 
    if(!this->Version.empty())
      {
***************
*** 604,610 ****
    if ( mfile.size() )
      {
!     // Load the module we found.
      found = true;
!     return this->ReadListFile(mfile.c_str());
      }
    return true;
--- 637,649 ----
    if ( mfile.size() )
      {
!     // Load the module we found, and set "<name>_FIND_MODULE" to true
!     // while inside it.
      found = true;
!     std::string var = this->Name;
!     var += "_FIND_MODULE";
!     this->Makefile->AddDefinition(var.c_str(), "1");
!     bool result = this->ReadListFile(mfile.c_str());
!     this->Makefile->RemoveDefinition(var.c_str());
!     return result;
      }
    return true;
***************
*** 1228,1231 ****
--- 1267,1271 ----
    // Clear the output variables.
    this->Makefile->RemoveDefinition("PACKAGE_VERSION");
+   this->Makefile->RemoveDefinition("PACKAGE_VERSION_UNSUITABLE");
    this->Makefile->RemoveDefinition("PACKAGE_VERSION_COMPATIBLE");
    this->Makefile->RemoveDefinition("PACKAGE_VERSION_EXACT");
***************
*** 1248,1261 ****
  
    // Load the version check file.
!   bool found = false;
    if(this->ReadListFile(version_file.c_str()))
      {
      // Check the output variables.
!     found = this->Makefile->IsOn("PACKAGE_VERSION_EXACT");
!     if(!found && !this->VersionExact)
        {
!       found = this->Makefile->IsOn("PACKAGE_VERSION_COMPATIBLE");
        }
!     if(found || this->Version.empty())
        {
        // Get the version found.
--- 1288,1306 ----
  
    // Load the version check file.
!   bool suitable = false;
    if(this->ReadListFile(version_file.c_str()))
      {
      // Check the output variables.
!     bool okay = this->Makefile->IsOn("PACKAGE_VERSION_EXACT");
!     bool unsuitable = this->Makefile->IsOn("PACKAGE_VERSION_UNSUITABLE");
!     if(!okay && !this->VersionExact)
        {
!       okay = this->Makefile->IsOn("PACKAGE_VERSION_COMPATIBLE");
        }
! 
!     // The package is suitable if the version is okay and not
!     // explicitly unsuitable.
!     suitable = !unsuitable && (okay || this->Version.empty());
!     if(suitable)
        {
        // Get the version found.
***************
*** 1287,1292 ****
    this->Makefile->PopScope();
  
!   // Succeed if the version was found or no version was requested.
!   return found || this->Version.empty();
  }
  
--- 1332,1337 ----
    this->Makefile->PopScope();
  
!   // Succeed if the version is suitable.
!   return suitable;
  }
  

Index: cmDocumentationFormatter.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatter.h,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -C 2 -d -r1.8.2.1 -r1.8.2.2
*** cmDocumentationFormatter.h	5 May 2008 17:38:19 -0000	1.8.2.1
--- cmDocumentationFormatter.h	24 Oct 2008 15:18:46 -0000	1.8.2.2
***************
*** 53,57 ****
    virtual cmDocumentationEnums::Form GetForm() const = 0;
    
!   virtual void PrintHeader(const char* /*name*/, std::ostream& /*os*/) {}
    virtual void PrintFooter(std::ostream& /*os*/) {}
    virtual void PrintSection(std::ostream& os,
--- 53,59 ----
    virtual cmDocumentationEnums::Form GetForm() const = 0;
    
!   virtual void PrintHeader(const char* /*docname*/,
!                            const char* /*appname*/,
!                            std::ostream& /*os*/) {}
    virtual void PrintFooter(std::ostream& /*os*/) {}
    virtual void PrintSection(std::ostream& os,

Index: cmLocalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.h,v
retrieving revision 1.103.2.1
retrieving revision 1.103.2.2
diff -C 2 -d -r1.103.2.1 -r1.103.2.2
*** cmLocalGenerator.h	3 Sep 2008 13:43:17 -0000	1.103.2.1
--- cmLocalGenerator.h	24 Oct 2008 15:18:48 -0000	1.103.2.2
***************
*** 109,116 ****
    enum RelativeRoot { NONE, FULL, HOME, START, HOME_OUTPUT, START_OUTPUT };
    enum OutputFormat { UNCHANGED, MAKEFILE, SHELL };
!   std::string Convert(const char* source, 
!                       RelativeRoot relative, 
                        OutputFormat output = UNCHANGED,
                        bool optional = false);
    
    /**
--- 109,124 ----
    enum RelativeRoot { NONE, FULL, HOME, START, HOME_OUTPUT, START_OUTPUT };
    enum OutputFormat { UNCHANGED, MAKEFILE, SHELL };
!   std::string ConvertToOutputFormat(const char* source, OutputFormat output);
!   std::string Convert(const char* remote, RelativeRoot local,
!                       OutputFormat output = UNCHANGED,
!                       bool optional = false);
!   std::string Convert(RelativeRoot remote, const char* local,
                        OutputFormat output = UNCHANGED,
                        bool optional = false);
+ 
+   /**
+     * Get path for the specified relative root.
+     */
+   const char* GetRelativeRootPath(RelativeRoot relroot);
    
    /**
***************
*** 163,167 ****
  
    ///! for existing files convert to output path and short path if spaces
!   std::string ConvertToOutputForExisting(const char* p);
    
    /** Called from command-line hook to clear dependencies.  */
--- 171,181 ----
  
    ///! for existing files convert to output path and short path if spaces
!   std::string ConvertToOutputForExisting(const char* remote,
!                                          RelativeRoot local = START_OUTPUT);
! 
!   /** For existing path identified by RelativeRoot convert to output
!       path and short path if spaces.  */
!   std::string ConvertToOutputForExisting(RelativeRoot remote,
!                                          const char* local = 0);
    
    /** Called from command-line hook to clear dependencies.  */
***************
*** 387,390 ****
--- 401,407 ----
    unsigned int BackwardsCompatibility;
    bool BackwardsCompatibilityFinal;
+ private:
+   std::string ConvertToOutputForExistingCommon(const char* remote,
+                                                std::string const& result);
  };
  

Index: cmDocumentationFormatterMan.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatterMan.h,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C 2 -d -r1.2 -r1.2.2.1
*** cmDocumentationFormatterMan.h	22 Oct 2007 16:48:39 -0000	1.2
--- cmDocumentationFormatterMan.h	24 Oct 2008 15:18:46 -0000	1.2.2.1
***************
*** 31,35 ****
                                        { return cmDocumentationEnums::ManForm;}
  
!   virtual void PrintHeader(const char* name, std::ostream& os);
    virtual void PrintSection(std::ostream& os,
                      const cmDocumentationSection& section,
--- 31,36 ----
                                        { return cmDocumentationEnums::ManForm;}
  
!   virtual void PrintHeader(const char* docname, const char* appname,
!                            std::ostream& os);
    virtual void PrintSection(std::ostream& os,
                      const cmDocumentationSection& section,
***************
*** 37,40 ****
--- 38,44 ----
    virtual void PrintPreformatted(std::ostream& os, const char* text);
    virtual void PrintParagraph(std::ostream& os, const char* text);
+ 
+ private:
+   void EscapeText(std::string& man_text);
  };
  

Index: cmGlobalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio7Generator.cxx,v
retrieving revision 1.99.2.2
retrieving revision 1.99.2.3
diff -C 2 -d -r1.99.2.2 -r1.99.2.3
*** cmGlobalVisualStudio7Generator.cxx	3 Sep 2008 13:43:17 -0000	1.99.2.2
--- cmGlobalVisualStudio7Generator.cxx	24 Oct 2008 15:18:46 -0000	1.99.2.3
***************
*** 487,491 ****
     // check to see if this is a fortran build
    const char* ext = ".vcproj";
!   const char* project = "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"";
    if(this->TargetIsFortranOnly(target))
      {
--- 487,492 ----
     // check to see if this is a fortran build
    const char* ext = ".vcproj";
!   const char* project =
!     "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"";
    if(this->TargetIsFortranOnly(target))
      {

Index: cmGlobalNMakeMakefileGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalNMakeMakefileGenerator.cxx,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -C 2 -d -r1.26 -r1.26.2.1
*** cmGlobalNMakeMakefileGenerator.cxx	13 Jan 2008 21:36:20 -0000	1.26
--- cmGlobalNMakeMakefileGenerator.cxx	24 Oct 2008 15:18:46 -0000	1.26.2.1
***************
*** 35,38 ****
--- 35,51 ----
    mf->AddDefinition("CMAKE_GENERATOR_CC", "cl");
    mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl");
+   if(!(cmSystemTools::GetEnv("INCLUDE") && 
+        cmSystemTools::GetEnv("LIB") &&
+        cmSystemTools::GetEnv("LIBPATH"))
+     )
+     {
+     std::string message = "To use the NMake generator, cmake must be run "
+       "from a shell that can use the compiler cl from the command line. "
+       "This environment does not contain INCLUDE, LIB, or LIBPATH, and "
+       "these must be set for the cl compiler to work. ";
+     mf->IssueMessage(cmake::WARNING,
+                      message);
+     }
+   
    this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
  }

Index: cmFindCommon.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindCommon.cxx,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C 2 -d -r1.1.2.1 -r1.1.2.2
*** cmFindCommon.cxx	13 Jun 2008 12:55:17 -0000	1.1.2.1
--- cmFindCommon.cxx	24 Oct 2008 15:18:46 -0000	1.1.2.2
***************
*** 376,380 ****
    std::vector<std::string> tmp;
    cmSystemTools::GetPath(tmp, variable);
- 
    // Relative paths are interpreted with respect to the current
    // working directory.
--- 376,379 ----

Index: cmPolicies.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.h,v
retrieving revision 1.10.2.6
retrieving revision 1.10.2.7
diff -C 2 -d -r1.10.2.6 -r1.10.2.7
*** cmPolicies.h	12 Sep 2008 14:56:21 -0000	1.10.2.6
--- cmPolicies.h	24 Oct 2008 15:18:54 -0000	1.10.2.7
***************
*** 51,54 ****
--- 51,55 ----
      CMP0008, // Full-path libraries must be a valid library file name
      CMP0009, // GLOB_RECURSE should not follow symlinks by default
+     CMP0010, // Bad variable reference syntax is an error
  
      // Always the last entry.  Useful mostly to avoid adding a comma

Index: cmInstallTargetGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallTargetGenerator.h,v
retrieving revision 1.24.2.2
retrieving revision 1.24.2.3
diff -C 2 -d -r1.24.2.2 -r1.24.2.3
*** cmInstallTargetGenerator.h	13 Jul 2008 21:55:24 -0000	1.24.2.2
--- cmInstallTargetGenerator.h	24 Oct 2008 15:18:48 -0000	1.24.2.3
***************
*** 67,78 ****
    typedef cmInstallGeneratorIndent Indent;
    virtual void GenerateScript(std::ostream& os);
    void GenerateScriptForConfig(std::ostream& os,
-                                const char* fromDir,
                                 const char* config,
                                 Indent const& indent);
-   void GenerateScriptForConfigDir(std::ostream& os,
-                                   const char* fromDirConfig,
-                                   const char* config,
-                                   Indent const& indent);
    void AddInstallNamePatchRule(std::ostream& os, Indent const& indent,
                                 const char* config,
--- 67,75 ----
    typedef cmInstallGeneratorIndent Indent;
    virtual void GenerateScript(std::ostream& os);
+   virtual void GenerateScriptConfigs(std::ostream& os, Indent const& indent);
+   virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
    void GenerateScriptForConfig(std::ostream& os,
                                 const char* config,
                                 Indent const& indent);
    void AddInstallNamePatchRule(std::ostream& os, Indent const& indent,
                                 const char* config,
***************
*** 97,100 ****
--- 94,98 ----
    bool Optional;
    NamelinkModeType NamelinkMode;
+   std::string FromDir;
  };
  

Index: cmComputeLinkInformation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkInformation.cxx,v
retrieving revision 1.24.2.10
retrieving revision 1.24.2.11
diff -C 2 -d -r1.24.2.10 -r1.24.2.11
*** cmComputeLinkInformation.cxx	3 Sep 2008 13:43:17 -0000	1.24.2.10
--- cmComputeLinkInformation.cxx	24 Oct 2008 15:18:45 -0000	1.24.2.11
***************
*** 595,599 ****
                                           true);
        linkItem += exe;
!       this->Items.push_back(Item(linkItem, true));
        this->Depends.push_back(exe);
        }
--- 595,599 ----
                                           true);
        linkItem += exe;
!       this->Items.push_back(Item(linkItem, true, tgt));
        this->Depends.push_back(exe);
        }
***************
*** 1021,1025 ****
  
    // Now add the full path to the library.
!   this->Items.push_back(Item(item, true));
  }
  
--- 1021,1025 ----
  
    // Now add the full path to the library.
!   this->Items.push_back(Item(item, true, target));
  }
  

Index: cmMacroCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMacroCommand.cxx,v
retrieving revision 1.36
retrieving revision 1.36.2.1
diff -C 2 -d -r1.36 -r1.36.2.1
*** cmMacroCommand.cxx	7 Mar 2008 13:40:36 -0000	1.36
--- cmMacroCommand.cxx	24 Oct 2008 15:18:52 -0000	1.36.2.1
***************
*** 130,140 ****
      newLFF.FilePath = this->Functions[c].FilePath;
      newLFF.Line = this->Functions[c].Line;
-     const char* def = this->Makefile->GetDefinition
-       ("CMAKE_MACRO_REPORT_DEFINITION_LOCATION"); 
-     bool macroReportLocation = false;
-     if(def && !cmSystemTools::IsOff(def))
-       {
-       macroReportLocation = true;
-       }
  
      // for each argument of the current function
--- 130,133 ----
***************
*** 213,238 ****
        arg.Value = tmps;
        arg.Quoted = k->Quoted;
!       if(macroReportLocation)
!         {
!         // Report the location of the argument where the macro was
!         // defined.
!         arg.FilePath = k->FilePath;
!         arg.Line = k->Line;
!         }
!       else
!         {
!         // Report the location of the argument where the macro was
!         // invoked.
!         if (args.size())
!           {
!           arg.FilePath = args[0].FilePath;
!           arg.Line = args[0].Line;
!           }
!         else
!           {
!           arg.FilePath = "Unknown";
!           arg.Line = 0;
!           }
!         }
        newLFF.Arguments.push_back(arg);
        }
--- 206,211 ----
        arg.Value = tmps;
        arg.Quoted = k->Quoted;
!       arg.FilePath = k->FilePath;
!       arg.Line = k->Line;
        newLFF.Arguments.push_back(arg);
        }

Index: cmMakefile.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.h,v
retrieving revision 1.230.2.4
retrieving revision 1.230.2.5
diff -C 2 -d -r1.230.2.4 -r1.230.2.5
*** cmMakefile.h	3 Sep 2008 13:43:18 -0000	1.230.2.4
--- cmMakefile.h	24 Oct 2008 15:18:52 -0000	1.230.2.5
***************
*** 201,210 ****
                           const char* arg3=0,
                           const char* arg4=0);
!   void AddUtilityCommand(const char* utilityName, bool excludeFromAll,
!                          const char* workingDirectory,
!                          const std::vector<std::string>& depends,
!                          const cmCustomCommandLines& commandLines,
!                          bool escapeOldStyle = true,
!                          const char* comment = 0);
  
    /**
--- 201,210 ----
                           const char* arg3=0,
                           const char* arg4=0);
!   cmTarget* AddUtilityCommand(const char* utilityName, bool excludeFromAll,
!                               const char* workingDirectory,
!                               const std::vector<std::string>& depends,
!                               const cmCustomCommandLines& commandLines,
!                               bool escapeOldStyle = true,
!                               const char* comment = 0);
  
    /**
***************
*** 701,705 ****
     * variable replacement and list expansion.
     */
!   void ExpandArguments(std::vector<cmListFileArgument> const& inArgs,
                         std::vector<std::string>& outArgs);
    /**
--- 701,705 ----
     * variable replacement and list expansion.
     */
!   bool ExpandArguments(std::vector<cmListFileArgument> const& inArgs,
                         std::vector<std::string>& outArgs);
    /**

Index: cmDependsJavaLexer.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDependsJavaLexer.h,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C 2 -d -r1.5 -r1.5.2.1
*** cmDependsJavaLexer.h	27 Jul 2007 14:55:24 -0000	1.5
--- cmDependsJavaLexer.h	24 Oct 2008 15:18:46 -0000	1.5.2.1
***************
*** 39,43 ****
  #include <stdlib.h>
  
! #if defined(__BEOS__)
  #include <unistd.h>   /* prevents a conflict with a #define later on... */
  #endif
--- 39,43 ----
  #include <stdlib.h>
  
! #if defined(__BEOS__) || defined(__HAIKU__)
  #include <unistd.h>   /* prevents a conflict with a #define later on... */
  #endif

Index: cmCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCommand.h,v
retrieving revision 1.27
retrieving revision 1.27.2.1
diff -C 2 -d -r1.27 -r1.27.2.1
*** cmCommand.h	1 Mar 2008 20:20:35 -0000	1.27
--- cmCommand.h	24 Oct 2008 15:18:45 -0000	1.27.2.1
***************
*** 65,69 ****
      {
      std::vector<std::string> expandedArguments;
!     this->Makefile->ExpandArguments(args, expandedArguments);
      return this->InitialPass(expandedArguments,status);
      }
--- 65,74 ----
      {
      std::vector<std::string> expandedArguments;
!     if(!this->Makefile->ExpandArguments(args, expandedArguments))
!       {
!       // There was an error expanding arguments.  It was already
!       // reported, so we can skip this command without error.
!       return true;
!       }
      return this->InitialPass(expandedArguments,status);
      }

Index: cmMakefileTargetGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.h,v
retrieving revision 1.24.2.1
retrieving revision 1.24.2.2
diff -C 2 -d -r1.24.2.1 -r1.24.2.2
*** cmMakefileTargetGenerator.h	8 Apr 2008 16:22:50 -0000	1.24.2.1
--- cmMakefileTargetGenerator.h	24 Oct 2008 15:18:53 -0000	1.24.2.2
***************
*** 145,148 ****
--- 145,153 ----
                                   std::vector<std::string>& makefile_depends);
  
+   /** Create lists of object files for linking and cleaning.  */
+   void CreateObjectLists(bool useLinkScript, bool useArchiveRules,
+                          bool useResponseFile, std::string& buildObjs,
+                          std::vector<std::string>& makefile_depends);
+ 
    virtual void CloseFileStreams();
    void RemoveForbiddenFlags(const char* flagVar, const char* linkLang,

Index: cmLocalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v
retrieving revision 1.240.2.6
retrieving revision 1.240.2.7
diff -C 2 -d -r1.240.2.6 -r1.240.2.7
*** cmLocalUnixMakefileGenerator3.cxx	15 May 2008 19:39:55 -0000	1.240.2.6
--- cmLocalUnixMakefileGenerator3.cxx	24 Oct 2008 15:18:48 -0000	1.240.2.7
***************
*** 359,366 ****
        this->GetRecursiveMakeCall(tgtMakefileName.c_str(), targetName.c_str())
        );
-     this->CreateCDCommand(commands,
-                           this->Makefile->GetHomeOutputDirectory(),
-                           this->Makefile->GetStartOutputDirectory());
      }
  
    // Write the rule to the makefile.
--- 359,366 ----
        this->GetRecursiveMakeCall(tgtMakefileName.c_str(), targetName.c_str())
        );
      }
+   this->CreateCDCommand(commands,
+                         this->Makefile->GetHomeOutputDirectory(),
+                         cmLocalGenerator::START_OUTPUT);
  
    // Write the rule to the makefile.
***************
*** 405,409 ****
        this->CreateCDCommand(commands,
                              this->Makefile->GetHomeOutputDirectory(),
!                             this->Makefile->GetStartOutputDirectory());
        this->WriteMakeRule(ruleFileStream, "Convenience name for target.",
                            localName.c_str(), depends, commands, true);
--- 405,409 ----
        this->CreateCDCommand(commands,
                              this->Makefile->GetHomeOutputDirectory(),
!                             cmLocalGenerator::START_OUTPUT);
        this->WriteMakeRule(ruleFileStream, "Convenience name for target.",
                            localName.c_str(), depends, commands, true);
***************
*** 433,437 ****
        this->CreateCDCommand(commands,
                              this->Makefile->GetHomeOutputDirectory(),
!                             this->Makefile->GetStartOutputDirectory());
        this->WriteMakeRule(ruleFileStream, "fast build rule for target.",
                            localName.c_str(), depends, commands, true);
--- 433,437 ----
        this->CreateCDCommand(commands,
                              this->Makefile->GetHomeOutputDirectory(),
!                             cmLocalGenerator::START_OUTPUT);
        this->WriteMakeRule(ruleFileStream, "fast build rule for target.",
                            localName.c_str(), depends, commands, true);
***************
*** 451,455 ****
          this->CreateCDCommand(commands,
                                this->Makefile->GetHomeOutputDirectory(),
!                               this->Makefile->GetStartOutputDirectory());
          this->WriteMakeRule(ruleFileStream,
                              "Manual pre-install relink rule for target.",
--- 451,455 ----
          this->CreateCDCommand(commands,
                                this->Makefile->GetHomeOutputDirectory(),
!                               cmLocalGenerator::START_OUTPUT);
          this->WriteMakeRule(ruleFileStream,
                              "Manual pre-install relink rule for target.",
***************
*** 698,708 ****
      << "\n";
    
!   if(this->Makefile->GetDefinition("CMAKE_EDIT_COMMAND"))
      {
      makefileStream
        << "# The program to use to edit the cache.\n"
        << "CMAKE_EDIT_COMMAND = "
!       << (this->ConvertToOutputForExisting(
!             this->Makefile->GetDefinition("CMAKE_EDIT_COMMAND"))) << "\n"
        << "\n";
      }
--- 698,708 ----
      << "\n";
    
!   if(const char* edit_cmd =
!      this->Makefile->GetDefinition("CMAKE_EDIT_COMMAND"))
      {
      makefileStream
        << "# The program to use to edit the cache.\n"
        << "CMAKE_EDIT_COMMAND = "
!       << this->Convert(edit_cmd,FULL,SHELL) << "\n"
        << "\n";
      }
***************
*** 836,840 ****
      this->CreateCDCommand(commands,
                            this->Makefile->GetHomeOutputDirectory(),
!                           this->Makefile->GetStartOutputDirectory());
      }
    this->WriteMakeRule(makefileStream,
--- 836,840 ----
      this->CreateCDCommand(commands,
                            this->Makefile->GetHomeOutputDirectory(),
!                           cmLocalGenerator::START_OUTPUT);
      }
    this->WriteMakeRule(makefileStream,
***************
*** 954,963 ****
  cmLocalUnixMakefileGenerator3
  ::AppendCustomCommands(std::vector<std::string>& commands,
!                        const std::vector<cmCustomCommand>& ccs)
  {
    for(std::vector<cmCustomCommand>::const_iterator i = ccs.begin();
        i != ccs.end(); ++i)
      {
!     this->AppendCustomCommand(commands, *i, true);
      }
  }
--- 954,964 ----
  cmLocalUnixMakefileGenerator3
  ::AppendCustomCommands(std::vector<std::string>& commands,
!                        const std::vector<cmCustomCommand>& ccs,
!                        cmLocalGenerator::RelativeRoot relative)
  {
    for(std::vector<cmCustomCommand>::const_iterator i = ccs.begin();
        i != ccs.end(); ++i)
      {
!     this->AppendCustomCommand(commands, *i, true, relative);
      }
  }
***************
*** 967,971 ****
  cmLocalUnixMakefileGenerator3
  ::AppendCustomCommand(std::vector<std::string>& commands,
!                       const cmCustomCommand& cc, bool echo_comment)
  {
    // Optionally create a command to display the custom command's
--- 968,973 ----
  cmLocalUnixMakefileGenerator3
  ::AppendCustomCommand(std::vector<std::string>& commands,
!                       const cmCustomCommand& cc, bool echo_comment,
!                       cmLocalGenerator::RelativeRoot relative)
  {
    // Optionally create a command to display the custom command's
***************
*** 1073,1078 ****
  
    // Setup the proper working directory for the commands.
!   this->CreateCDCommand(commands1, dir,
!                         this->Makefile->GetHomeOutputDirectory());
  
    // push back the custom commands
--- 1075,1079 ----
  
    // Setup the proper working directory for the commands.
!   this->CreateCDCommand(commands1, dir, relative);
  
    // push back the custom commands
***************
*** 1611,1617 ****
                                  glIt->second.GetPostBuildCommands());
        this->AppendCustomCommands(commands, 
!                                  glIt->second.GetPreBuildCommands());
        this->AppendCustomCommands(commands, 
!                                  glIt->second.GetPostBuildCommands());
        std::string targetName = glIt->second.GetName();
        this->WriteMakeRule(ruleFileStream, targetString.c_str(), 
--- 1612,1620 ----
                                  glIt->second.GetPostBuildCommands());
        this->AppendCustomCommands(commands, 
!                                  glIt->second.GetPreBuildCommands(),
!                                  cmLocalGenerator::START_OUTPUT);
        this->AppendCustomCommands(commands, 
!                                  glIt->second.GetPostBuildCommands(),
!                                  cmLocalGenerator::START_OUTPUT);
        std::string targetName = glIt->second.GetName();
        this->WriteMakeRule(ruleFileStream, targetString.c_str(), 
***************
*** 1675,1679 ****
    this->CreateCDCommand(commands,
                          this->Makefile->GetHomeOutputDirectory(),
!                         this->Makefile->GetStartOutputDirectory());
      {
      cmOStringStream progCmd;
--- 1678,1682 ----
    this->CreateCDCommand(commands,
                          this->Makefile->GetHomeOutputDirectory(),
!                         cmLocalGenerator::START_OUTPUT);
      {
      cmOStringStream progCmd;
***************
*** 1697,1701 ****
    this->CreateCDCommand(commands,
                                  this->Makefile->GetHomeOutputDirectory(),
!                                 this->Makefile->GetStartOutputDirectory());
    this->WriteMakeRule(ruleFileStream, "The main clean target", "clean",
                        depends, commands, true);
--- 1700,1704 ----
    this->CreateCDCommand(commands,
                                  this->Makefile->GetHomeOutputDirectory(),
!                                 cmLocalGenerator::START_OUTPUT);
    this->WriteMakeRule(ruleFileStream, "The main clean target", "clean",
                        depends, commands, true);
***************
*** 1727,1731 ****
    this->CreateCDCommand(commands,
                          this->Makefile->GetHomeOutputDirectory(),
!                         this->Makefile->GetStartOutputDirectory());
    this->WriteMakeRule(ruleFileStream, "Prepare targets for installation.",
                        "preinstall", depends, commands, true);
--- 1730,1734 ----
    this->CreateCDCommand(commands,
                          this->Makefile->GetHomeOutputDirectory(),
!                         cmLocalGenerator::START_OUTPUT);
    this->WriteMakeRule(ruleFileStream, "Prepare targets for installation.",
                        "preinstall", depends, commands, true);
***************
*** 1748,1752 ****
    this->CreateCDCommand(commands,
                          this->Makefile->GetHomeOutputDirectory(),
!                         this->Makefile->GetStartOutputDirectory());
    this->WriteMakeRule(ruleFileStream, "clear depends", 
                        "depend", 
--- 1751,1755 ----
    this->CreateCDCommand(commands,
                          this->Makefile->GetHomeOutputDirectory(),
!                         cmLocalGenerator::START_OUTPUT);
    this->WriteMakeRule(ruleFileStream, "clear depends", 
                        "depend", 
***************
*** 2127,2132 ****
  void cmLocalUnixMakefileGenerator3
  ::CreateCDCommand(std::vector<std::string>& commands, const char *tgtDir,
!                   const char *retDir)
  {
    // do we need to cd?
    if (!strcmp(tgtDir,retDir))
--- 2130,2137 ----
  void cmLocalUnixMakefileGenerator3
  ::CreateCDCommand(std::vector<std::string>& commands, const char *tgtDir,
!                   cmLocalGenerator::RelativeRoot relRetDir)
  {
+   const char* retDir = this->GetRelativeRootPath(relRetDir);
+ 
    // do we need to cd?
    if (!strcmp(tgtDir,retDir))
***************
*** 2141,2156 ****
      // commands.
      std::string cmd = "cd ";
!     cmd += this->ConvertToOutputForExisting(tgtDir);
      commands.insert(commands.begin(),cmd);
!     
!     // Change back to the starting directory.  Any trailing slash must be
!     // removed to avoid problems with Borland Make.
!     std::string back = retDir;
!     if(back.size() && back[back.size()-1] == '/')
!       {
!       back = back.substr(0, back.size()-1);
!       }
      cmd = "cd ";
!     cmd += this->ConvertToOutputForExisting(back.c_str());
      commands.push_back(cmd);
      }
--- 2146,2155 ----
      // commands.
      std::string cmd = "cd ";
!     cmd += this->ConvertToOutputForExisting(tgtDir, relRetDir);
      commands.insert(commands.begin(),cmd);
! 
!     // Change back to the starting directory.
      cmd = "cd ";
!     cmd += this->ConvertToOutputForExisting(relRetDir, tgtDir);
      commands.push_back(cmd);
      }
***************
*** 2164,2168 ****
        {
        std::string cmd = "cd ";
!       cmd += this->ConvertToOutputForExisting(tgtDir);
        cmd += " && ";
        cmd += *i;
--- 2163,2167 ----
        {
        std::string cmd = "cd ";
!       cmd += this->ConvertToOutputForExisting(tgtDir, relRetDir);
        cmd += " && ";
        cmd += *i;

Index: cmDocumentation.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentation.h,v
retrieving revision 1.33.2.1
retrieving revision 1.33.2.2
diff -C 2 -d -r1.33.2.1 -r1.33.2.2
*** cmDocumentation.h	3 Sep 2008 13:43:17 -0000	1.33.2.1
--- cmDocumentation.h	24 Oct 2008 15:18:46 -0000	1.33.2.2
***************
*** 62,66 ****
    
    /** Print help of the given type.  */
!   bool PrintDocumentation(Type ht, std::ostream& os);
    
    /** Set the program name for standard document generation.  */
--- 62,66 ----
    
    /** Print help of the given type.  */
!   bool PrintDocumentation(Type ht, std::ostream& os, const char* docname=0);
    
    /** Set the program name for standard document generation.  */
***************
*** 125,128 ****
--- 125,129 ----
  private:
    void SetForm(Form f);
+   void SetDocName(const char* docname);
  
    bool CreateSingleModule(const char* fname, 
***************
*** 135,138 ****
--- 136,141 ----
    void CreateFullDocumentation();
  
+   void AddDocumentIntroToPrint(const char* intro[2]);
+ 
    bool PrintCopyright(std::ostream& os);
    bool PrintVersion(std::ostream& os);
***************
*** 158,164 ****
--- 161,170 ----
  
    const char* GetNameString() const;
+   const char* GetDocName(bool fallbackToNameString = true) const;
+   const char* GetDefaultDocName(Type ht) const;
    bool IsOption(const char* arg) const;
  
    std::string NameString;
+   std::string DocName;
    std::map<std::string,cmDocumentationSection*> AllSections;
    

Index: cmOutputRequiredFilesCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmOutputRequiredFilesCommand.cxx,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -C 2 -d -r1.16 -r1.16.2.1
*** cmOutputRequiredFilesCommand.cxx	23 Jan 2008 15:27:59 -0000	1.16
--- cmOutputRequiredFilesCommand.cxx	24 Oct 2008 15:18:54 -0000	1.16.2.1
***************
*** 200,203 ****
--- 200,210 ----
      // write them out
      FILE *fout = fopen(this->OutputFile.c_str(),"w");
+     if(!fout)
+       {
+       std::string err = "Can not open output file: ";
+       err += this->OutputFile;
+       this->SetError(err.c_str());
+       return false;
+       }
      std::set<cmDependInformation const*> visited;
      this->ListDependencies(info,fout, &visited);

Index: cmCallVisualStudioMacro.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCallVisualStudioMacro.cxx,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C 2 -d -r1.3.2.1 -r1.3.2.2
*** cmCallVisualStudioMacro.cxx	31 Jul 2008 15:52:24 -0000	1.3.2.1
--- cmCallVisualStudioMacro.cxx	24 Oct 2008 15:18:45 -0000	1.3.2.2
***************
*** 37,40 ****
--- 37,65 ----
  
  //----------------------------------------------------------------------------
+ // Copied from a correct comdef.h to avoid problems with deficient versions
+ // of comdef.h that exist in the wild... Fixes issue #7533.
+ //
+ #if ( _MSC_VER >= 1300 )
+ // VS7 and later:
+ #ifdef _NATIVE_WCHAR_T_DEFINED
+ # ifdef _DEBUG
+ # pragma comment(lib, "comsuppwd.lib")
+ # else
+ # pragma comment(lib, "comsuppw.lib")
+ # endif
+ #else
+ # ifdef _DEBUG
+ # pragma comment(lib, "comsuppd.lib")
+ # else
+ # pragma comment(lib, "comsupp.lib")
+ # endif
+ #endif
+ #else
+ // VS6 only had comsupp.lib:
+ # pragma comment(lib, "comsupp.lib")
+ #endif
+ 
+ 
+ //----------------------------------------------------------------------------
  ///! Use ReportHRESULT to make a cmSystemTools::Message after calling
  ///! a COM method that may have failed.



More information about the Cmake-commits mailing list