;
7{Cc           @   s[  d  k  Z  d  k Z d  k Z d  k Z d  k Z d  k Z d  k Z d  k Z d  k	 Z	 d f  d     YZ
 d f  d     YZ d d d d d	 g Z x e D] Z e e   e <q Wd
 f  d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ h  d d <d d <d d <Z h  d d <d d <d d <Z h  d d <d d <d d <Z d e f d      YZ d! e f d"     YZ d# e f d$     YZ d% e f d&     YZ d' e f d(     YZ d) e f d*     YZ d+ e f d,     YZ d- e f d.     YZ d/ e f d0     YZ  d1 e f d2     YZ! d3 e f d4     YZ" d5 e f d6     YZ# d7 e f d8     YZ$ d9 e$ f d:     YZ% d; e f d<     YZ& d= e& f d>     YZ' d? e& f d@     YZ( h  dA e <dB e <dC e <dD e  <dE e" <dF e$ <dG e# <dH e% <dI e <dJ e <dK e <dL e' <dM e( <dN e! <Z) dO e* f dP     YZ+ dQ   Z, dR   Z- dS   Z. dT   Z/ dU   Z0 dV   Z1 dW   Z2 dX   Z3 dY   Z4 e5 dZ  Z6 e i7 d[  Z8 d\   Z9 d]   Z: d^ f  d_     YZ; d`   Z< da e* f db     YZ= dc   Z> d  S(d   Ns   GeneratorBasec           B   s&   t  Z e d  Z d   Z d   Z RS(   Nc      	   C   s>  y5 t  i   } | i d d  | i |  i |  _ Wn t	 d   n Xt
 |  _ x. | D]& \ } }	 | d j o d |  _ q[ q[ Wt i   } | i |  t t i i |   |  _ h  |  _ t   |  _ t |  d  o h  |  _ n t
 |  i d <t | i d d   |  _ t | i d d	   |  _  t | i d d
   |  _! t | i d d   |  _" t | i d d   |  _# | i d d  |  _$ | i d d  |  _% t& i' | i d d   |  _( t& i' | i d d   |  _) t& i' | i d d   |  _* t+ i, i- |  i d  |  _, g  |  _. g  |  _/ g  |  _0 g  |  _1 g  |  _2 g  |  _3 g  |  _4 | i   }
 |
 i6   x |
 D] } |  i i8 |  o q{n h  } x- | i |  D] } | i | |  | | <qW| i d  } t; i |  } | o t	 d |   n | i= | | | |   } | |  i | <| i?   q{Wx |  i i@   D] } tA | i i d d  f tB | i i d d  f f } x | D] \ } } g  } xB t& i' |  D]1 } |  i i8 |  o | iG |  i |  qqWxG | D]? } x6 | iI   D]( } |  i iK | | iL | iM |   qWqWqWqNWd  S(   Ns   SVN_VER_MAJORs   libvers   Unable to extract version.s	   --releasei   s   skip_sectionss   optionss   includess   swig-includess   static-apache-filess   test-scriptss   bdb-test-scriptss   include-dirss   swig-include-dirss   include-wildcardss   swig-languagess	   swig-dirss   swigs   types   ERROR: unknown build type for s   libss    s   nonlibs(N   s
   getversions   Parsers
   vsn_parsers   searchs   parses   verfnames   libvers   selfs   versions   GenErrors   Nones   release_modes   optionss   opts   vals   ConfigParsers   parsers   reads   fnames
   build_paths   oss   paths   abspaths   confs   sectionss   DependencyGraphs   graphs   hasattrs   skip_sectionss   _collect_pathss   gets   includess   swig_includess   apache_filess   scriptss   bdb_scriptss   include_dirss   swig_include_dirss   strings   splits   include_wildcardss	   swig_langs	   swig_dirss	   generators   swigs	   Generators   projectss	   test_depss
   test_progss   bdb_test_depss   bdb_test_progss   target_dirss   manpagess   parser_sectionss   sorts   section_names   has_keys   options   types   _build_typess   target_classs   Sections   sections   create_targetss   valuess   DT_LINKs	   DT_NONLIBs   dependenciess   dep_types	   dep_namess   dep_section_objectss   appends   dep_sections   get_targetss   targets   bulk_adds   names   get_dep_targets(   s   selfs   fnames   verfnames   optionss   parsers   targets   target_classs   dep_section_objectss   options   vals   parser_sectionss	   dep_namess   types   opts   dependenciess   section_names   dep_types   dep_sections   sections
   vsn_parser(    (    s   build/generator/gen_base.pys   __init__   s    	 								
   6  	  c         C   s   t  t |  i |  i  } x\ t |  i  D]K } xB |  i	 D]7 } t i t i i t |  |   } | i |  q9 Wq) W| Sd S(   s   Get a list of the header filesN(   s   maps   native_paths   selfs   includess   swig_includess   all_includess   uniques   target_dirss   ds   include_wildcardss   wildcards   globs   oss   paths   joins   hdrss   extend(   s   selfs   ds   wildcards   all_includess   hdrs(    (    s   build/generator/gen_base.pys   compute_hdrs   s      
 $c         C   sy  t  |  i    } x`|  i i t  D]L\ } } t	 |  d j p t
  | d } t | t  o |  i i t |  } t	 |  d j p t
  | d } t | t  p t
  x | i t | i   D]" } |  i i t | t |   q Wq% t | t  o# t i i | i  d d d f j oC x@ | i t | i   D]" } |  i i t | t |   qGWq% q% Wd S(   s,   Compute the dependencies of each header filei   i    s   .cs   .cppN(   s   IncludeDependencyInfos   selfs   compute_hdrss   include_depss   graphs   get_depss	   DT_OBJECTs
   objectfiles   sourcess   lens   AssertionErrors   sources
   isinstances
   SWIGObjects   get_sourcess	   DT_SWIG_Cs   swigsourcess   ifiles
   SWIGSources   querys   native_paths   filenames   include_files   adds
   build_paths
   SourceFiles   oss   paths   splitext(   s   selfs   include_files   ifiles   swigsourcess   sourcess   include_depss
   objectfiles   source(    (    s   build/generator/gen_base.pys   compute_hdr_deps   s$      

 $6 (   s   __name__s
   __module__s   Nones   __init__s   compute_hdrss   compute_hdr_deps(    (    (    s   build/generator/gen_base.pys   GeneratorBase   s   r		s   DependencyGraphc           B   sG   t  Z d  Z d   Z d   Z d   Z e d  Z d   Z d   Z	 RS(   s   Record dependencies between build items.

  See the DT_* values for the different dependency types. For each type,
  the target and source objects recorded will be different. They could
  be file names, Target objects, install types, etc.
  c         C   s+   h  |  _ x t D] } h  |  i | <q Wd  S(   N(   s   selfs   depss	   dep_typess   dt(   s   selfs   dt(    (    s   build/generator/gen_base.pys   __init__   s    	 c         C   sK   |  i | i |  o |  i | | i |  n | g |  i | | <d  S(   N(   s   selfs   depss   types   has_keys   targets   appends   source(   s   selfs   types   targets   source(    (    s   build/generator/gen_base.pys   add   s    c         C   sI   |  i | i |  o |  i | | i |  n | |  i | | <d  S(   N(   s   selfs   depss   types   has_keys   targets   extends   sources(   s   selfs   types   targets   sources(    (    s   build/generator/gen_base.pys   bulk_add   s    c         C   si   |  i | i | g   } | o | Sn g  } x/ | D]' } t	 | |  o | i
 |  q6 q6 W| Sd  S(   N(   s   selfs   depss   types   gets   targets   sourcess   clss   filtereds   srcs
   isinstances   append(   s   selfs   types   targets   clss   srcs   sourcess   filtered(    (    s   build/generator/gen_base.pys   get_sources   s     c         C   s9   g  } x( |  i | i   D] } | i |  q W| Sd  S(   N(   s   sourcess   selfs   depss   types   valuess   groups   extend(   s   selfs   types   sourcess   group(    (    s   build/generator/gen_base.pys   get_all_sources   s
     c         C   s   |  i | i   Sd  S(   N(   s   selfs   depss   types   items(   s   selfs   type(    (    s   build/generator/gen_base.pys   get_deps   s    (
   s   __name__s
   __module__s   __doc__s   __init__s   adds   bulk_adds   Nones   get_sourcess   get_all_sourcess   get_deps(    (    (    s   build/generator/gen_base.pys   DependencyGraph   s    			
	s
   DT_INSTALLs	   DT_OBJECTs	   DT_SWIG_Cs   DT_LINKs	   DT_NONLIBs   DependencyNodec           B   s   t  Z d   Z d   Z RS(   Nc         C   s   | |  _  d  S(   N(   s   filenames   self(   s   selfs   filename(    (    s   build/generator/gen_base.pys   __init__   s    c         C   s   |  i Sd  S(   N(   s   selfs   filename(   s   self(    (    s   build/generator/gen_base.pys   __str__   s    (   s   __name__s
   __module__s   __init__s   __str__(    (    (    s   build/generator/gen_base.pys   DependencyNode   s   	s
   ObjectFilec           B   s   t  Z e d  Z RS(   Nc         C   s&   t  i |  |  | |  _ d |  _ d  S(   Ni    (   s   DependencyNodes   __init__s   selfs   filenames   compile_cmds   source_generated(   s   selfs   filenames   compile_cmd(    (    s   build/generator/gen_base.pys   __init__   s    	(   s   __name__s
   __module__s   Nones   __init__(    (    (    s   build/generator/gen_base.pys
   ObjectFile   s   s
   SWIGObjectc           B   s   t  Z d   Z RS(   Nc         C   sL   t  i |  |  | |  _ t | |  _ d t i |  i  |  _ d |  _	 d  S(   Ns   $(COMPILE_%s_WRAPPER)i   (
   s
   ObjectFiles   __init__s   selfs   filenames   langs   lang_abbrevs   strings   uppers   compile_cmds   source_generated(   s   selfs   filenames   lang(    (    s   build/generator/gen_base.pys   __init__   s
    	(   s   __name__s
   __module__s   __init__(    (    (    s   build/generator/gen_base.pys
   SWIGObject   s   s
   HeaderFilec           B   s   t  Z e e d  Z RS(   Nc         C   s&   t  i |  |  | |  _ | |  _ d  S(   N(   s   DependencyNodes   __init__s   selfs   filenames	   classnames   compile_cmd(   s   selfs   filenames	   classnames   compile_cmd(    (    s   build/generator/gen_base.pys   __init__  s    	(   s   __name__s
   __module__s   Nones   __init__(    (    (    s   build/generator/gen_base.pys
   HeaderFile  s   s
   SourceFilec           B   s   t  Z d   Z RS(   Nc         C   s   t  i |  |  | |  _ d  S(   N(   s   DependencyNodes   __init__s   selfs   filenames   reldir(   s   selfs   filenames   reldir(    (    s   build/generator/gen_base.pys   __init__  s    (   s   __name__s
   __module__s   __init__(    (    (    s   build/generator/gen_base.pys
   SourceFile  s   s
   SWIGSourcec           B   s   t  Z d   Z RS(   Nc         C   s   t  i |  | t |   d  S(   N(   s
   SourceFiles   __init__s   selfs   filenames   build_path_dirname(   s   selfs   filename(    (    s   build/generator/gen_base.pys   __init__  s    (   s   __name__s
   __module__s   __init__(    (    (    s   build/generator/gen_base.pys
   SWIGSource  s   	s   pythons   pys   perls   pls   rubys   rbs   Pythons   Perls   Rubys   Targetc           B   s3   t  Z d  Z d   Z d   Z d f  d     YZ RS(   s1   A build target is a node in our dependency graph.c         C   sy   | |  _  | |  _ | i d  |  _ | i d d  |  _ | i d d  |  _ | i d d  |  _ | i d  |  _	 d  S(   Ns   descriptions   paths    s   add-depss   add-install-depss	   msvc-name(
   s   names   selfs   gen_objs   optionss   gets   descs   paths   add_depss   add_install_depss	   msvc_name(   s   selfs   names   optionss   gen_obj(    (    s   build/generator/gen_base.pys   __init__*  s    		c         C   s
   t   d  S(   N(   s   NotImplementedError(   s   self(    (    s   build/generator/gen_base.pys   add_dependencies3  s    s   Sectionc           B   s2   t  Z d  Z d   Z d   Z d   Z d   Z RS(   sQ  Represents an individual section of build.conf
    
    The Section class is sort of a factory class which is responsible for
    creating and keeping track of Target instances associated with a section
    of the configuration file. By default it only allows one Target per 
    section, but subclasses may create multiple Targets.
    c         C   s(   | |  _  | |  _ | |  _ | |  _ d  S(   N(   s   target_classs   selfs   names   optionss   gen_obj(   s   selfs   target_classs   names   optionss   gen_obj(    (    s   build/generator/gen_base.pys   __init__@  s    			c         C   s2   |  i |  i |  i |  i  |  _ |  i i   d S(   s   Create target instancesN(   s   selfs   target_classs   names   optionss   gen_objs   targets   add_dependencies(   s   self(    (    s   build/generator/gen_base.pys   create_targetsF  s     !c         C   s   |  i g Sd S(   s<   Return list of target instances associated with this sectionN(   s   selfs   target(   s   self(    (    s   build/generator/gen_base.pys   get_targetsK  s     c         C   s   |  i g Sd S(   sA   Return list of targets from this section that "target" depends onN(   s   selfs   target(   s   selfs   target(    (    s   build/generator/gen_base.pys   get_dep_targetsO  s     (   s   __name__s
   __module__s   __doc__s   __init__s   create_targetss   get_targetss   get_dep_targets(    (    (    s   build/generator/gen_base.pys   Section7  s
    			(   s   __name__s
   __module__s   __doc__s   __init__s   add_dependenciess   Section(    (    (    s   build/generator/gen_base.pys   Target'  s    			s   TargetLinkedc           B   s    t  Z d  Z d   Z d   Z RS(   s:   The target is linked (by libtool) against other libraries.c         C   s   t  i |  | | |  | i d  |  _ | i d  |  _ | i d d  |  _	 | i d d  |  _
 | i d  |  _ | i d  |  _ t i | i d	 d
   |  _ d  S(   Ns   installs   compile-cmds   sourcess   *.cs   link-cmds   $(LINK)s   external-libs   external-projects	   msvc-libss    (   s   Targets   __init__s   selfs   names   optionss   gen_objs   gets   installs   compile_cmds   sourcess   link_cmds   external_libs   external_projects   strings   splits	   msvc_libs(   s   selfs   names   optionss   gen_obj(    (    s   build/generator/gen_base.pys   __init__V  s    c         C   s  |  i p |  i o) |  i o |  i i i |   n d  Sn |  i i i t |  i	 |   t
 |  i p d |  i  } | i   x | D] \ } } | d d j o | d  |  i } n7 | d d j o | d  |  i } n t d |   t | |  i  } |  i i i t | t | |   |  i i i t |  i |  q W|  i i i |  i  xP t i |  i  D]< } t |  } | o# |  i i i t  |  i |   qkqkWd  S(   Ns   *.cis   .cis   .cpps!   ERROR: unknown file extension on (!   s   selfs   external_libs   external_projects   gen_objs   projectss   appends   graphs   adds
   DT_INSTALLs   installs   _collect_pathss   sourcess   paths   sorts   srcs   reldirs   objexts   objnames   GenErrors
   ObjectFiles   compile_cmds   ofiles	   DT_OBJECTs
   SourceFiles   DT_LINKs   names   target_dirss   strings   splits   patterns   build_path_dirnames   dirnames   build_path_join(   s   selfs   srcs   reldirs   ofiles   sourcess   objnames   patterns   dirname(    (    s   build/generator/gen_base.pys   add_dependenciesa  s.    

 "  (   s   __name__s
   __module__s   __doc__s   __init__s   add_dependencies(    (    (    s   build/generator/gen_base.pys   TargetLinkedS  s    	s	   TargetExec           B   s   t  Z d   Z d   Z RS(   Nc         C   s   t  i |  | | |  |  i p |  i oF |  i i } | d d f |  _
 t |  i | | d d f  |  _ n | i d d  |  _ | i d  |  _ d  S(   Ns   exes   objects   targets   manpagess    s   testing(   s   TargetLinkeds   __init__s   selfs   names   optionss   gen_objs   external_libs   external_projects   _extension_maps   extmaps   objexts   build_path_joins   paths   filenames   gets   manpagess   testing(   s   selfs   names   optionss   gen_objs   extmap(    (    s   build/generator/gen_base.pys   __init__  s    'c         C   s   t  i |   |  i d j oD |  i i i |  i  |  i d j o |  i i	 i |  i  q nU |  i d j oD |  i i
 i |  i  |  i d j o |  i i i |  i  q n |  i i i t i |  i   d  S(   Ns   tests   skips   bdb-test(   s   TargetLinkeds   add_dependenciess   selfs   installs   gen_objs	   test_depss   appends   filenames   testings
   test_progss   bdb_test_depss   bdb_test_progss   manpagess   extends   strings   split(   s   self(    (    s   build/generator/gen_base.pys   add_dependencies  s    (   s   __name__s
   __module__s   __init__s   add_dependencies(    (    (    s   build/generator/gen_base.pys	   TargetExe  s   	s   TargetScriptc           B   s   t  Z d   Z RS(   Nc         C   s    |  i i i t |  i |   d  S(   N(   s   selfs   gen_objs   graphs   adds
   DT_INSTALLs   install(   s   self(    (    s   build/generator/gen_base.pys   add_dependencies  s    (   s   __name__s
   __module__s   add_dependencies(    (    (    s   build/generator/gen_base.pys   TargetScript  s   s	   TargetLibc           B   s   t  Z d   Z RS(   Nc         C   s   t  i |  | | |  |  i p |  i oU | i } | d d f |  _
 d | | i | d d f f } t |  i |  |  _ n | i d  d j |  _ | i d  d j |  _ | i d  d j |  _ t i | i d	 d
   |  _ d  S(   Ns   libs   objects   %s-%s%ss   targets   undefined-lib-symbolss   yess   msvc-statics	   msvc-fakes   msvc-exports    (   s   TargetLinkeds   __init__s   selfs   names   optionss   gen_objs   external_libs   external_projects   _extension_maps   extmaps   objexts   versions   tfiles   build_path_joins   paths   filenames   gets   undefined_lib_symbolss   msvc_statics	   msvc_fakes   strings   splits   msvc_export(   s   selfs   names   optionss   gen_objs   tfiles   extmap(    (    s   build/generator/gen_base.pys   __init__  s    	 (   s   __name__s
   __module__s   __init__(    (    (    s   build/generator/gen_base.pys	   TargetLib  s   s   TargetApacheModc           B   s   t  Z d   Z RS(   Nc         C   s[   t  i |  | | |  | |  i i d d f } t |  i	 |  |  _
 d |  _ d |  _ d  S(   Ns   libs   targets   $(COMPILE_APACHE_MOD)s   $(LINK_APACHE_MOD)(   s	   TargetLibs   __init__s   selfs   names   optionss   gen_objs   _extension_maps   tfiles   build_path_joins   paths   filenames   compile_cmds   link_cmd(   s   selfs   names   optionss   gen_objs   tfile(    (    s   build/generator/gen_base.pys   __init__  s
    	(   s   __name__s
   __module__s   __init__(    (    (    s   build/generator/gen_base.pys   TargetApacheMod  s   s   TargetRaModulec           B   s   t  Z RS(   N(   s   __name__s
   __module__(    (    (    s   build/generator/gen_base.pys   TargetRaModule  s   s   TargetFsModulec           B   s   t  Z RS(   N(   s   __name__s
   __module__(    (    (    s   build/generator/gen_base.pys   TargetFsModule  s   s	   TargetDocc           B   s   t  Z RS(   N(   s   __name__s
   __module__(    (    (    s   build/generator/gen_base.pys	   TargetDoc  s   s
   TargetI18Nc           B   s    t  Z d  Z d   Z d   Z RS(   sA   The target is a collection of .po files to be compiled by msgfmt.c         C   sb   t  i |  | | |  | i d  |  _ | i d  |  _ t	 |  _
 d |  _ | i d  |  _ d  S(   Ns   installs   sourcess   .mos   external-project(   s   Targets   __init__s   selfs   names   optionss   gen_objs   gets   installs   sourcess   Nones   compile_cmds   objexts   external_project(   s   selfs   names   optionss   gen_obj(    (    s   build/generator/gen_base.pys   __init__  s    		c         C   s   |  i i i t |  i |   t |  i p d |  i  } | i	   x | D] \ } } | d d j o | d  |  i } n t d |   t | |  i  } |  i i i t | t | |   |  i i i t |  i |  qI W|  i i i |  i  d  S(   Ns   *.pois   .pos!   ERROR: unknown file extension on (   s   selfs   gen_objs   graphs   adds
   DT_INSTALLs   installs   _collect_pathss   sourcess   paths   sorts   srcs   reldirs   objexts   objnames   GenErrors
   ObjectFiles   compile_cmds   ofiles	   DT_OBJECTs
   SourceFiles   DT_LINKs   names   target_dirss   append(   s   selfs   srcs   reldirs   ofiles   sourcess   objname(    (    s   build/generator/gen_base.pys   add_dependencies  s    
 " (   s   __name__s
   __module__s   __doc__s   __init__s   add_dependencies(    (    (    s   build/generator/gen_base.pys
   TargetI18N  s    		s
   TargetSWIGc           B   s3   t  Z d   Z d   Z d e i f d     YZ RS(   Nc         C   sm   t  i |  | | |  | |  _ |  i d t | |  _ | i	 d  d j |  _
 d t i t |  |  _ d  S(   Ns    for s   include-runtimes   yess   $(LINK_%s_WRAPPER)(   s	   TargetLibs   __init__s   selfs   names   optionss   gen_objs   langs   descs   lang_full_names   gets   include_runtimes   strings   uppers   lang_abbrevs   link_cmd(   s   selfs   names   optionss   gen_objs   lang(    (    s   build/generator/gen_base.pys   __init__  s
    	c         C   sa  |  i i i |  i  t |  i |  i  } t |  d j p t  | d d } t
 |  } | d d j p t  | d  d }	 | d  |  i i d d f } | d  d	 j o | d  p | d d !}
 |  i i d d
 f } |  i d j o |
 | } n: |  i d j o d t i |
  | } n d |
 | } |  i d |
 |  _ t |  i |  i  |  _ |  i d j o t |  i d  |  _ n t |  i |  |  _ t |  } t t |  i |	  |  i  } t t |  i |  |  i  } |  i i i t | |  |  i i i t  | |  |  i i i t! |  i |  |  i i i t" d t# |  i |   d  S(   Ni   i    is   .is   .cs   libs   objecti   s   svn_s   targets   rubys   perls   _s   natives   swig-($   s   selfs   gen_objs   target_dirss   appends   paths   _collect_pathss   sourcess   lens   AssertionErrors   ipaths   build_path_basenames   inames   cnames   _extension_maps   onames   module_names   lib_extensions   langs   lib_filenames   strings
   capitalizes   names   build_path_joins   filenames
   SWIGSources   ifiles
   SWIGObjects   cfiles   ofiles   graphs   adds	   DT_SWIG_Cs	   DT_OBJECTs   DT_LINKs
   DT_INSTALLs   lang_abbrev(   s   selfs   inames   lib_extensions   ofiles   ifiles   ipaths   cfiles   lib_filenames   sourcess   cnames   module_names   oname(    (    s   build/generator/gen_base.pys   add_dependencies  s6    )s   Sectionc           B   s#   t  Z d   Z d   Z d   Z RS(   Nc         C   s\   h  |  _ xL |  i i D]> } |  i |  i |  i |  i |  } | i	   | |  i | <q Wd  S(   N(
   s   selfs   targetss   gen_objs	   swig_langs   langs   target_classs   names   optionss   targets   add_dependencies(   s   selfs   langs   target(    (    s   build/generator/gen_base.pys   create_targets0  s    	 !
c         C   s   |  i i   Sd  S(   N(   s   selfs   targetss   values(   s   self(    (    s   build/generator/gen_base.pys   get_targets7  s    c         C   s1   |  i i | i t  } | o | g p g  Sd  S(   N(   s   selfs   targetss   gets   targets   langs   None(   s   selfs   target(    (    s   build/generator/gen_base.pys   get_dep_targets:  s    (   s   __name__s
   __module__s   create_targetss   get_targetss   get_dep_targets(    (    (    s   build/generator/gen_base.pys   Section/  s   		(   s   __name__s
   __module__s   __init__s   add_dependenciess	   TargetLibs   Section(    (    (    s   build/generator/gen_base.pys
   TargetSWIG  s   			0s   TargetSWIGLibc           B   s*   t  Z d   Z d e i f d     YZ RS(   Nc         C   s,   t  i |  | | |  | i d  |  _ d  S(   Ns   lang(   s	   TargetLibs   __init__s   selfs   names   optionss   gen_objs   gets   lang(   s   selfs   names   optionss   gen_obj(    (    s   build/generator/gen_base.pys   __init__?  s    s   Sectionc           B   s   t  Z d   Z RS(   Nc         C   s,   | i |  i  i j o |  i  g Sn g  Sd  S(   N(   s   targets   langs   self(   s   selfs   target(    (    s   build/generator/gen_base.pys   get_dep_targetsD  s    (   s   __name__s
   __module__s   get_dep_targets(    (    (    s   build/generator/gen_base.pys   SectionC  s   (   s   __name__s
   __module__s   __init__s	   TargetLibs   Section(    (    (    s   build/generator/gen_base.pys   TargetSWIGLib>  s   	s   TargetProjectc           B   s   t  Z d   Z d   Z RS(   Nc         C   sP   t  i |  | | |  | i d  |  _ | i d  |  _ | i d  |  _	 d  S(   Ns   cmds   releases   debug(
   s   Targets   __init__s   selfs   names   optionss   gen_objs   gets   cmds   releases   debug(   s   selfs   names   optionss   gen_obj(    (    s   build/generator/gen_base.pys   __init__J  s    c         C   s   |  i i i |   d  S(   N(   s   selfs   gen_objs   projectss   append(   s   self(    (    s   build/generator/gen_base.pys   add_dependenciesP  s    (   s   __name__s
   __module__s   __init__s   add_dependencies(    (    (    s   build/generator/gen_base.pys   TargetProjectI  s   	s   TargetSWIGProjectc           B   s   t  Z d   Z RS(   Nc         C   s,   t  i |  | | |  | i d  |  _ d  S(   Ns   lang(   s   TargetProjects   __init__s   selfs   names   optionss   gen_objs   gets   lang(   s   selfs   names   optionss   gen_obj(    (    s   build/generator/gen_base.pys   __init__T  s    (   s   __name__s
   __module__s   __init__(    (    (    s   build/generator/gen_base.pys   TargetSWIGProjectS  s   s
   TargetJavac           B   s   t  Z d   Z RS(   Nc         C   se   t  i |  | | |  | i d  |  _ t i	 | i d d   |  _
 | i d  |  _ g  |  _ d  S(   Ns   link-cmds   package-rootss    s   jar(   s   TargetLinkeds   __init__s   selfs   names   optionss   gen_objs   gets   link_cmds   strings   splits   packagess   jars   deps(   s   selfs   names   optionss   gen_obj(    (    s   build/generator/gen_base.pys   __init__Y  s
    (   s   __name__s
   __module__s   __init__(    (    (    s   build/generator/gen_base.pys
   TargetJavaX  s   s   TargetJavaHeadersc           B   s   t  Z d   Z d   Z RS(   Nc         C   sn   t  i |  | | |  d |  _ d |  _ | i d  |  _	 | i d  |  _
 | i d  |  _ |  i	 |  _ d  S(   Ns   .classs   .hs   headerss   classess   package(   s
   TargetJavas   __init__s   selfs   names   optionss   gen_objs   objexts   javah_objexts   gets   headerss   classess   packages
   output_dir(   s   selfs   names   optionss   gen_obj(    (    s   build/generator/gen_base.pys   __init__a  s    		c         C   s+  t  |  i |  i  } x^| D]V\ } } | d d j o t d |   n t | d   } t	 |  i
 | d  } t	 |  i
 t i |  i d d  d | d  } t i |  i d  } t t	 |  }
 t t	 |  i |
 | |  i   }	 d |	 _ | |	 _ t | |  i d | |  i  } | | _ d | _ |  i i i t  | |	  |  i! i" |  |  i i i t# |  i$ |  q W|  i i% i" |  i  |  i i% i" |  i  |  i i% i" |  i
  xP t i |  i  D]< } t' |  } | o# |  i i% i" t	 |  i |   qqW|  i i i t) |  i$ |   d  S(   Nis   .javas!   ERROR: unknown file extension on s   .hs   .s   _i   (*   s   _collect_pathss   selfs   sourcess   paths   srcs   reldirs   GenErrors   build_path_basenames
   class_names   build_path_joins   headerss   class_headers   strings   replaces   packages   class_header_wins   splits   class_pkg_lists   applys	   class_pkgs
   ObjectFiles   classess   objexts
   class_files   source_generateds
   HeaderFiles   compile_cmds   hfiles   filename_wins   gen_objs   graphs   adds	   DT_OBJECTs   depss   appends   DT_LINKs   names   target_dirss   patterns   build_path_dirnames   dirnames
   DT_INSTALL(   s   selfs   class_header_wins
   class_names   sourcess   dirnames   class_headers   reldirs   class_pkg_lists   srcs
   class_files	   class_pkgs   patterns   hfile(    (    s   build/generator/gen_base.pys   add_dependenciesj  s>     	'				  '(   s   __name__s
   __module__s   __init__s   add_dependencies(    (    (    s   build/generator/gen_base.pys   TargetJavaHeaders`  s   		s   TargetJavaClassesc           B   s   t  Z d   Z d   Z RS(   Nc         C   sJ   t  i |  | | |  d |  _ d |  _ | i d  |  _	 |  i	 |  _
 d  S(   Ns   .classs   javas   classes(   s
   TargetJavas   __init__s   selfs   names   optionss   gen_objs   objexts   langs   gets   classess
   output_dir(   s   selfs   names   optionss   gen_obj(    (    s   build/generator/gen_base.pys   __init__  s
    		c         C   s  t  |  i |  i  } x?| D]7\ }
 } |
 d d j o |
 d  |  i } t |  } | d  }	 x |	 oQ |	 i   |  i j o7 t t |	  } t t |  i g | t |	   } Pqc qc Wt d |   n t d |
 d   t | |  i  } t |
 |  } | | _ |  i i i t | |  |  i i i t |  i |  |  i i |  q W|  i i  i |  i  |  i i  i |  i  xP t! i" |  i  D]< } t$ |  } | o# |  i i  i t |  i |   qqW|  i i i t& |  i |   d  S(   Nis   .javais-   Unable to find Java package root in path "%s"s"   ERROR: unknown file extension on "s   "('   s   _collect_pathss   selfs   sourcess   paths   srcs   reldirs   objexts   objnames   build_path_splits   dirss
   sourcedirss   pops   packagess   applys   build_path_joins
   sourcepaths   classess   lens   GenErrors
   ObjectFiles   compile_cmds   ofiles
   SourceFiles   sfiles   gen_objs   graphs   adds	   DT_OBJECTs   DT_LINKs   names   depss   appends   target_dirss   strings   splits   patterns   build_path_dirnames   dirnames
   DT_INSTALL(   s   selfs   sourcess   objnames   dirnames   ofiles   patterns   reldirs   dirss   sfiles
   sourcedirss   srcs
   sourcepath(    (    s   build/generator/gen_base.pys   add_dependencies  s<     
 
	 '(   s   __name__s
   __module__s   __init__s   add_dependencies(    (    (    s   build/generator/gen_base.pys   TargetJavaClasses  s   	s   exes   scripts   libs   docs   swigs   projects   swig_libs   swig_projects	   ra-modules	   fs-modules
   apache-mods   javahs   javas   i18ns   GenErrorc           B   s   t  Z RS(   N(   s   __name__s
   __module__(    (    (    s   build/generator/gen_base.pys   GenError  s   c         C   s   t  i |  d t i  Sd S(   s%   Convert a build path to a native paths   /N(   s   strings   replaces   paths   oss   sep(   s   path(    (    s   build/generator/gen_base.pys   native_path  s     c         C   sF   t  i |  t i d  }  t i o t  i |  t i d  }  n |  Sd S(   s%   Convert a native path to a build paths   /N(   s   strings   replaces   paths   oss   seps   altsep(   s   path(    (    s   build/generator/gen_base.pys
   build_path  s
     
c          G   s   t  i |  d  Sd S(   s&   Join path components into a build paths   /N(   s   strings   joins
   path_parts(   s
   path_parts(    (    s   build/generator/gen_base.pys   build_path_join  s     c         C   s   t  i |  d  Sd S(   s)   Return list of components in a build paths   /N(   s   strings   splits   path(   s   path(    (    s   build/generator/gen_base.pys   build_path_split  s     c         C   sj   t  i |  d  } | d j o |  |  |  | d f Sn. | d j o |  d |  d f Sn d |  f Sd S(   s9   Return the filename and directory portions of a file paths   /i    i   s    N(   s   strings   rfinds   paths   pos(   s   paths   pos(    (    s   build/generator/gen_base.pys   build_path_splitfile  s     c         C   s   t  |   d Sd S(   s+   Return the directory portion of a file pathi    N(   s   build_path_splitfiles   path(   s   path(    (    s   build/generator/gen_base.pys   build_path_dirname	  s     c         C   s   t  |   d Sd S(   s*   Return the filename portion of a file pathi   N(   s   build_path_splitfiles   path(   s   path(    (    s   build/generator/gen_base.pys   build_path_basename  s     c         C   s   d d t  i |  d  Sd S(   sF   Given a relative directory, return ../ paths to retreat to the origin.s   ..s   /..s   /N(   s   strings   counts   path(   s   path(    (    s   build/generator/gen_base.pys   build_path_retreat  s     c         C   s   t  |   } g  } xi | D]a } t  |  | j o | |  |  j o | | d j o | i | | d  q | i |  q W| Sd S(   s$   Strip the given path from each file.s   /i   N(   s   lens   paths   ls   results   filess   files   append(   s   paths   filess   ls   results   file(    (    s   build/generator/gen_base.pys   build_path_strip  s      5c         C   s   g  } x t i |   D] } | o t | |  } n | } t i t	 |   p | g } | t j o( x[ | D] } | i t |   qo Wq t |  } x' | D] } | i t |  | f  q Wq W| Sd S(   s  Find files matching a space separated list of globs
  
  pats (string) is the list of glob patterns

  path (string), if specified, is a path that will be prepended to each
    glob pattern before it is evaluated
    
  If path is none the return value is a list of filenames, otherwise
  the return value is a list of 2-tuples. The first element in each tuple
  is a matching filename and the second element is the portion of the
  glob pattern which matched the file before its last forward slash (/)
  N(   s   results   strings   splits   patss   base_pats   paths   build_path_joins   patterns   globs   native_paths   filess   Nones   files   appends
   build_paths   build_path_dirnames   reldir(   s   patss   paths   filess   patterns   base_pats   results   files   reldir(    (    s   build/generator/gen_base.pys   _collect_paths   s"        !s   ^subversion/include/(\w+)\.h$c         C   s   t  i t |    Sd  S(   N(   s   _re_public_includes   matchs
   build_paths   fname(   s   fname(    (    s   build/generator/gen_base.pys   _is_public_includeC  s    c         C   s    t  t i d t |     Sd  S(   Ns'   subversion/bindings/swig/proxy/\1_h.swg(   s   native_paths   _re_public_includes   subs
   build_paths   fname(   s   fname(    (    s   build/generator/gen_base.pys   _swig_include_wrapperF  s    s   IncludeDependencyInfoc           B   sA   t  Z d  Z d   Z d   Z d   Z e i d  Z d   Z	 RS(   s  Finds all dependencies between a named set of headers, and computes
  closure, so that individual C files can then be scanned, and the stored
  dependency data used to return all directly and indirectly referenced
  headers.

  This class works exclusively in native-style paths.c   	      C   s  h  |  _ xY | D]Q } t i i |  } |  i i |  o g  |  i | <n |  i | i	 |  q Wh  |  _
 x$ | D] } |  i |  |  i
 | <qu WxM n oE d } x+ | D]# } |  i |  i
 |  p | } q W| o Pq q Wx | D] } t |  o h  |  i d d t <|  i d d t <| t <} xO |  i
 | i   D]: } t |  o t | t |  <qJt d | | f  qJWt |  } t i i |  } | |  i
 | <| g |  i | <q q Wd S(   s  Scan all files in FILENAMES, which should be a sequence of paths to
    all header files that this IncludeDependencyInfo instance should
    consider as interesting when following and reporting dependencies - i.e.
    all the Subversion header files, no system header files.i   i    s	   proxy.swgs   apr.swgsT   Public include '%s' depends on '%s', which is not a public include! What's going on?N(   s   selfs   _domains	   filenamess   fnames   oss   paths   basenames   bnames   has_keys   appends   _depss   _scan_for_includess   changess   _include_closures   _is_public_includes   Nones   hdrss   keyss   hs   _swig_include_wrappers   RuntimeErrors
   swig_fnames
   swig_bname(	   s   selfs	   filenamess
   swig_bnames   hdrss   bnames   fnames   hs
   swig_fnames   changes(    (    s   build/generator/gen_base.pys   __init__R  sB     	 	   !
 7 c         C   s:   |  i |  } |  i |  | i   } | i   | Sd S(   sr   Scan the C file FNAME, and return the full paths of each include file
    that is a direct or indirect dependency.N(   s   selfs   _scan_for_includess   fnames   hdrss   _include_closures   keyss	   filenamess   sort(   s   selfs   fnames   hdrss	   filenames(    (    s   build/generator/gen_base.pys   query  s     
c         C   sK   | i   } x" | D] } | i |  i |  q Wt |  t |  j Sd S(   s4  Mutate the passed dictionary HDRS, by performing a single pass
    through the listed headers, adding the headers on which the first group
    of headers depend, if not already present.

    HDRS is of the form { 'path/to/header.h': None, }
    
    Return a boolean indicating whether any changes were made.N(   s   hdrss   keyss   hs   updates   selfs   _depss   len(   s   selfs   hdrss   keyss   h(    (    s   build/generator/gen_base.pys   _include_closure  s      s1   ^\s*[#%]\s*(?:include|import)\s*[<"]?([^<">;\s]+)c   	      C   s*  h  } | i d  o | Sn xt i |  D] } |  i i |  } | o t	 | i
 d   } t i i |  } |  i i |  o |  i | } t |  d j o | d } nX t i i t i i t i i |  |   } | | j o t d | | | | f  n t | | <qq. q. W| Sd S(   s  Scan C source file FNAME and return the basenames of any headers
    which are directly included, and within the set defined when this
    IncludeDependencyProcessor was initialized.

    Return a dictionary with included full file names as keys and None as
    values.s   _external_runtime.swgi   i    s   Unable to determine which file is being included
                  Include Parameter: '%s'
                  Including File: '%s'
                  Expected but not found: '%s'
                  Possibilities: '%s'N(   s   hdrss   fnames   endswiths	   fileinputs   inputs   lines   selfs   _re_includes   matchs   native_paths   groups   include_params   oss   paths   basenames   bnames   _domains   has_keys   include_fnamess   lens   include_fnames   normpaths   joins   dirnames   RuntimeErrors   None(	   s   selfs   fnames   hdrss   include_params   include_fnamess   bnames   lines   matchs   include_fname(    (    s   build/generator/gen_base.pys   _scan_for_includes  s&      -(
   s   __name__s
   __module__s   __doc__s   __init__s   querys   _include_closures   res   compiles   _re_includes   _scan_for_includes(    (    (    s   build/generator/gen_base.pys   IncludeDependencyInfoJ  s    	1			c         C   s.  |  i t |  } | } g  } x| o x | D] } |  i t | i	 t
  |  i t | i	 t
  } x | D] } | | j o Pqk qk Wt | t  o nl t | t  oK |  i t | i	  } xC | D]' } | | j o | i | i  q q Wn | i | i  | i |  Pq0 Wt    q" W| Sd S(   s?   Given a list of targets, sort them based on their dependencies.N(   s   graphs   get_sourcess
   DT_INSTALLs   areas   inst_targetss   targetss   filess   ts   DT_LINKs   names   Targets	   DT_NONLIBs   ss   ds
   isinstances
   TargetJavas
   TargetI18Ns   appends   filenames   removes   CircularDependencies(   s   graphs   areas   filess   inst_targetss   ss   ts   targetss   d(    (    s   build/generator/gen_base.pys   _sorted_files  s4       . 	 s   CircularDependenciesc           B   s   t  Z RS(   N(   s   __name__s
   __module__(    (    (    s   build/generator/gen_base.pys   CircularDependencies  s   c         C   sQ   g  } h  } x: |  D]2 } | i |  o t | | <| i |  q q W| Sd S(   s$   Eliminate duplicates from a sequenceN(   s   lists   dupess   seqs   es   has_keys   Nones   append(   s   seqs   es   dupess   list(    (    s   build/generator/gen_base.pys   unique  s      
(?   s   oss   syss   strings   globs   res	   fileinputs   ConfigParsers   generator.swigs	   generators
   getversions   GeneratorBases   DependencyGraphs	   dep_typess   _dts   globalss   DependencyNodes
   ObjectFiles
   SWIGObjects
   HeaderFiles
   SourceFiles
   SWIGSources   lang_abbrevs   lang_full_names   lang_utillib_suffixs   Targets   TargetLinkeds	   TargetExes   TargetScripts	   TargetLibs   TargetApacheMods   TargetRaModules   TargetFsModules	   TargetDocs
   TargetI18Ns
   TargetSWIGs   TargetSWIGLibs   TargetProjects   TargetSWIGProjects
   TargetJavas   TargetJavaHeaderss   TargetJavaClassess   _build_typess	   Exceptions   GenErrors   native_paths
   build_paths   build_path_joins   build_path_splits   build_path_splitfiles   build_path_dirnames   build_path_basenames   build_path_retreats   build_path_strips   Nones   _collect_pathss   compiles   _re_public_includes   _is_public_includes   _swig_include_wrappers   IncludeDependencyInfos   _sorted_filess   CircularDependenciess   unique(:   s
   TargetJavas
   TargetI18Ns   TargetSWIGProjects
   SourceFiles   build_path_basenames   DependencyGraphs
   SWIGObjects   lang_full_names   TargetJavaHeaderss	   fileinputs   _dts   Targets   TargetSWIGLibs   _swig_include_wrappers	   generators   _re_public_includes   TargetJavaClassess   _collect_pathss   IncludeDependencyInfos
   HeaderFiles   build_path_strips   res	   TargetDocs	   TargetExes   build_path_retreats   TargetApacheMods   TargetLinkeds   TargetProjects   strings   globs
   TargetSWIGs   GeneratorBases   TargetScripts   syss   native_paths   _is_public_includes
   SWIGSources   lang_abbrevs
   ObjectFiles   uniques   build_path_dirnames   ConfigParsers	   dep_typess   build_path_splitfiles   build_path_splits   _sorted_filess
   build_paths   TargetFsModules   _build_typess   GenErrors	   TargetLibs   TargetRaModules   CircularDependenciess
   getversions   lang_utillib_suffixs   oss   DependencyNodes   build_path_join(    (    s   build/generator/gen_base.pys   ?   sv   									-	 	!!!,3#I
5:					
				"		u	7