[Cmake-commits] [cmake-commits] king committed cmLocalGenerator.cxx 1.285 1.286 cmLocalGenerator.h 1.105 1.106 cmLocalUnixMakefileGenerator3.cxx 1.254 1.255 cmLocalUnixMakefileGenerator3.h 1.82 1.83 cmMakefileExecutableTargetGenerator.cxx 1.48 1.49 cmMakefileLibraryTargetGenerator.cxx 1.64 1.65 cmMakefileTargetGenerator.cxx 1.105 1.106

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Oct 9 15:30:10 EDT 2008


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

Modified Files:
	cmLocalGenerator.cxx cmLocalGenerator.h 
	cmLocalUnixMakefileGenerator3.cxx 
	cmLocalUnixMakefileGenerator3.h 
	cmMakefileExecutableTargetGenerator.cxx 
	cmMakefileLibraryTargetGenerator.cxx 
	cmMakefileTargetGenerator.cxx 
Log Message:
ENH: Fix optional use of relative paths.

These changes refactor cmLocalGenerator methods Convert and
ConvertToOutputForExisting to support references inside the build tree
using relative paths.  After this commit, all tests pass with Makefile
generators when relative paths are enabled by default.  See issue #7779.


Index: cmLocalUnixMakefileGenerator3.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.h,v
retrieving revision 1.82
retrieving revision 1.83
diff -C 2 -d -r1.82 -r1.83
*** cmLocalUnixMakefileGenerator3.h	13 Jan 2008 21:36:20 -0000	1.82
--- cmLocalUnixMakefileGenerator3.h	9 Oct 2008 19:30:07 -0000	1.83
***************
*** 198,202 ****
      // 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);
--- 198,203 ----
      // 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,
--- 323,334 ----
                            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: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.285
retrieving revision 1.286
diff -C 2 -d -r1.285 -r1.286
*** cmLocalGenerator.cxx	9 Oct 2008 19:07:35 -0000	1.285
--- cmLocalGenerator.cxx	9 Oct 2008 19:30:07 -0000	1.286
***************
*** 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)
  {
***************
*** 1986,1990 ****
  
  //----------------------------------------------------------------------------
! 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,
***************
*** 2034,2038 ****
        }
      }
!   // 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)
      {
***************
*** 2067,2070 ****
--- 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: cmLocalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.h,v
retrieving revision 1.105
retrieving revision 1.106
diff -C 2 -d -r1.105 -r1.106
*** cmLocalGenerator.h	2 Sep 2008 16:06:32 -0000	1.105
--- cmLocalGenerator.h	9 Oct 2008 19:30:07 -0000	1.106
***************
*** 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: cmMakefileLibraryTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v
retrieving revision 1.64
retrieving revision 1.65
diff -C 2 -d -r1.64 -r1.65
*** cmMakefileLibraryTargetGenerator.cxx	2 Sep 2008 16:06:32 -0000	1.64
--- cmMakefileLibraryTargetGenerator.cxx	9 Oct 2008 19:30:07 -0000	1.65
***************
*** 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();
***************
*** 873,877 ****
      (commands1,
       this->Makefile->GetStartOutputDirectory(),
!      this->Makefile->GetHomeOutputDirectory());
    commands.insert(commands.end(), commands1.begin(), commands1.end());
    commands1.clear();
--- 873,877 ----
      (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();
--- 889,893 ----
      this->LocalGenerator->CreateCDCommand(commands1,
                                    this->Makefile->GetStartOutputDirectory(),
!                                   cmLocalGenerator::HOME_OUTPUT);
      commands.insert(commands.end(), commands1.begin(), commands1.end());
      commands1.clear();

Index: cmMakefileExecutableTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v
retrieving revision 1.48
retrieving revision 1.49
diff -C 2 -d -r1.48 -r1.49
*** cmMakefileExecutableTargetGenerator.cxx	2 Sep 2008 16:43:45 -0000	1.48
--- cmMakefileExecutableTargetGenerator.cxx	9 Oct 2008 19:30:07 -0000	1.49
***************
*** 441,445 ****
      (commands1,
       this->Makefile->GetStartOutputDirectory(),
!      this->Makefile->GetHomeOutputDirectory());
    commands.insert(commands.end(), commands1.begin(), commands1.end());
    commands1.clear();
--- 441,445 ----
      (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();
--- 455,459 ----
      this->LocalGenerator->CreateCDCommand(commands1,
                                    this->Makefile->GetStartOutputDirectory(),
!                                   cmLocalGenerator::HOME_OUTPUT);
      commands.insert(commands.end(), commands1.begin(), commands1.end());
      commands1.clear();

Index: cmLocalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v
retrieving revision 1.254
retrieving revision 1.255
diff -C 2 -d -r1.254 -r1.255
*** cmLocalUnixMakefileGenerator3.cxx	9 Oct 2008 19:08:53 -0000	1.254
--- cmLocalUnixMakefileGenerator3.cxx	9 Oct 2008 19:30:07 -0000	1.255
***************
*** 362,366 ****
    this->CreateCDCommand(commands,
                          this->Makefile->GetHomeOutputDirectory(),
!                         this->Makefile->GetStartOutputDirectory());
  
    // Write the rule to the makefile.
--- 362,366 ----
    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.",
***************
*** 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: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.105
retrieving revision 1.106
diff -C 2 -d -r1.105 -r1.106
*** cmMakefileTargetGenerator.cxx	9 Oct 2008 19:07:35 -0000	1.105
--- cmMakefileTargetGenerator.cxx	9 Oct 2008 19:30:07 -0000	1.106
***************
*** 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.



More information about the Cmake-commits mailing list