File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -718,14 +718,17 @@ def expand_makefile_vars(s, vars):
718718    """ 
719719    import  re 
720720
721+     find_var1_re  =  re .compile (r"\$\(([A-Za-z][A-Za-z0-9_]*)\)" )
722+     find_var2_re  =  re .compile (r"\${([A-Za-z][A-Za-z0-9_]*)}" )
723+ 
721724    # This algorithm does multiple expansion, so if vars['foo'] contains 
722725    # "${bar}", it will expand ${foo} to ${bar}, and then expand 
723726    # ${bar}... and so forth.  This is fine as long as 'vars' comes from 
724727    # 'parse_makefile()', which takes care of such expansions eagerly, 
725728    # according to make's variable expansion semantics. 
726729
727730    while  True :
728-         m  =  re .search (_findvar1_rx ,  s ) or  re .search (_findvar2_rx ,  s )
731+         m  =  find_var1_re .search (s ) or  find_var2_re .search (s )
729732        if  m :
730733            (beg , end ) =  m .span ()
731734            s  =  s [0 :beg ] +  vars .get (m .group (1 )) +  s [end :]
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments