Selaa lähdekoodia

ENH: add configure style @var@ expansion

Bill Hoffman 25 vuotta sitten
vanhempi
sitoutus
dd36c5f296
2 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 5 0
      Source/cmMakefile.cxx
  2. 2 1
      Source/cmMakefile.h

+ 5 - 0
Source/cmMakefile.cxx

@@ -395,6 +395,11 @@ void cmMakefile::ExpandVariblesInString(std::string& source)
     std::string variable = "${";
     variable += (*i).first;
     variable += "}";
+    cmSystemTools::ReplaceString(source, variable.c_str(),
+                                 (*i).second.c_str());
+    variable = "@";
+    variable += (*i).first;
+    variable += "@";
     cmSystemTools::ReplaceString(source, variable.c_str(),
                                  (*i).second.c_str());
     }

+ 2 - 1
Source/cmMakefile.h

@@ -310,7 +310,8 @@ public:
    * Expand all defined varibles in the string.  
    * Defined varibles come from the m_Definitions map.
    * They are expanded with ${var} where var is the
-   * entry in the m_Definitions map.
+   * entry in the m_Definitions map.  Also @var@ is
+   * expanded to match autoconf style expansions.
    */
   void ExpandVariblesInString(std::string& source);
 protected: