gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: jakarta-gump/python/gump logic.py
Date Tue, 14 Oct 2003 02:16:38 GMT
ajack       2003/10/13 19:16:38

  Modified:    python/gump logic.py
  Log:
  Quick wack at 'all' or 'hard' doing recursive classpath build, otherwise not...
  
  Revision  Changes    Path
  1.22      +27 -14    jakarta-gump/python/gump/logic.py
  
  Index: logic.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/logic.py,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- logic.py	13 Oct 2003 18:51:20 -0000	1.21
  +++ logic.py	14 Oct 2003 02:16:38 -0000	1.22
  @@ -359,14 +359,16 @@
     # Append dependent projects (including optional)
     if project.depend:
         for depend in project.depend:
  -          classpath += getDependOutputList(depend,context,visited)  
  +          recurse=determineRecursion(depend)
  +          classpath += getDependOutputList(depend,context,visited,recurse)  
     if project.option:    
         for option in project.option:
  -          classpath += getDependOutputList(option,context,visited)
  +          recurse=determineRecursion(option)    
  +          classpath += getDependOutputList(option,context,visited,recurse)
         
     return classpath
     
  -def getDependOutputList(depend,context,visited):      
  +def getDependOutputList(depend,context,visited,recurse=None):      
     """Get a classpath of outputs for a project (including it's dependencies)"""        
   
     projectname=depend.project
     
  @@ -388,20 +390,31 @@
     
     # Append JARS for this project
     for jar in depend.jars():
  -      classpath.append(AnnotatedPath(jar.path,pctxt)) 
  -      
  -  # Append sub-projects outputs
  -  if project.depend:
  -      for depend in project.depend:
  -        classpath += getDependOutputList(depend,context,visited)
  -  
  -  # Append optional sub-project's output (that may not exist)
  -  if project.option:
  -      for option in project.option:
  -        classpath += getDependOutputList(option,context,visited)
  +    classpath.append(AnnotatedPath(jar.path,pctxt)) 
  +
  +  if recurse:      
  +      # Append sub-projects outputs
  +      if project.depend:
  +          for depend in project.depend:
  +              recurse=determineRecursion(depend)    
  +              classpath += getDependOutputList(depend,context,visited,recurse)
  +  
  +      # Append optional sub-project's output (that may not exist)
  +      if project.option:
  +          for option in project.option:
  +              recurse=determineRecursion(option)       
  +              classpath += getDependOutputList(option,context,visited,recurse)
   
     return classpath
     
  +def determineRecursion(depend):
  +    """Determine if we ought recurse to inherit"""
  +    recurse=0
  +    inherit=depend.inherit
  +    if inherit == 'all' or inherit=='hard':
  +        recurse=1
  +    return recurse
  +    
   # BOOTCLASSPATH?
   def getClasspath(project,workspace,context):
     return os.pathsep.join(getSimpleClasspathList(getClasspathList(project,workspace,context)))
  
  
  

Mime
View raw message