§
    Ä/ög÷H  ã                   óp  — d Z ddlZddlZddlZddlZddlZddlZddlZddlm	Z	m
Z
mZmZmZmZmZ dZ	 dZ	 dZ G d„ dej        ¦  «        Zd	„ Zedd
„¦   «         Zed„ ¦   «         Zedd„¦   «         Zeg fd„¦   «         Zed„ ¦   «         Zed„ ¦   «         Zed„ ¦   «         Zed„ ¦   «         Zed„ ¦   «         ZdS )a$  
Configuration system

A :py:class:`waflib.Configure.ConfigurationContext` instance is created when ``waf configure`` is called, it is used to:

* create data dictionaries (ConfigSet instances)
* store the list of modules to import
* hold configuration routines such as ``find_program``, etc
é    N)Ú	ConfigSetÚUtilsÚOptionsÚLogsÚContextÚBuildÚErrorsz
config.logFz}# project %(app)s configured on %(now)s by
# waf %(wafver)s (abi %(abi)s, python %(pyver)x on %(systype)s)
# using %(args)s
#c                   óŒ   ‡ — e Zd ZdZdZg Z	 ˆ fd„Zdd„Zd„ Zd„ Z	 e
ee	¦  «        Zd„ Zˆ fd	„Zd
„ Zd„ Zdd„Zˆ fd„Zd„ Zˆ xZS )ÚConfigurationContextzconfigures the projectÚ	configurec                 ó  •—  t          t          | ¦  «        j        di |¤Ž t          t          j        ¦  «        | _        i | _        d | _        d | _        g | _	        d| _
        g | _        g | _        |                      d¦  «         d S )Nr   Ú © )Úsuperr   Ú__init__ÚdictÚosÚenvironÚall_envsÚtop_dirÚout_dirÚtoolsÚhashÚfilesÚ
tool_cacheÚsetenv)ÚselfÚkwÚ	__class__s     €ú)/git_repos/lvtk-1.2.0/waflib/Configure.pyr   zConfigurationContext.__init__'   s|   ø€ Ø,…%Õ˜dÑ#Ô#Ô,Ð2Ð2¨rÐ2Ð2Ð2Ý•b”jÑ!Ô!€$„,Ø€$„-à€$„,Ø€$„,à€$„*à€$„)Ø€$„*à€$„/à‡+‚+ˆb�/„/€/€/€/ó    Nc                 ó¼   — || j         vs|rI|s)t          j        ¦   «         }|                      |¦  «         n|                     ¦   «         }|| j         |<   || _        dS )a–  
		Set a new config set for conf.env. If a config set of that name already exists,
		recall it without modification.

		The name is the filename prefix to save to ``c4che/NAME_cache.py``, and it
		is also used as *variants* by the build commands.
		Though related to variants, whatever kind of data may be stored in the config set::

			def configure(cfg):
				cfg.env.ONE = 1
				cfg.setenv('foo')
				cfg.env.ONE = 2

			def build(bld):
				2 == bld.env_of_name('foo').ONE

		:param name: name of the configuration set
		:type name: string
		:param env: ConfigSet to copy, or an empty ConfigSet is created
		:type env: :py:class:`waflib.ConfigSet.ConfigSet`
		N)r   r   Úprepare_envÚderiveÚvariant)r   ÚnameÚenvs      r    r   zConfigurationContext.setenv8   sg   € ð, 
�”ÐÐ #ÐØ
ð Ý
Ô
Ñ
Ô
€CØ×Ò�SÑÔÐÐà
�*Š*‰,Œ,€CØ€4„=�ÑØ€$„,€,€,r!   c                 ó&   — | j         | j                 S )zGetter for the env property©r   r%   )r   s    r    Úget_envzConfigurationContext.get_envW   s   € à	Œ�t”|Ô	$Ð$r!   c                 ó$   — || j         | j        <   dS )zSetter for the env propertyNr)   )r   Úvals     r    Úset_envzConfigurationContext.set_envZ   s   € à #€$„-�”ÑÐÐr!   c                 ór  — | j         }|st          j        j        }|s%t	          t
          j        t
          j        d¦  «        }|s| j         	                    ¦   «         }t          j         	                    |¦  «        }t          j                             |¦  «        r| j        p| j                             |¦  «        | _        | j        sJ ‚| j        }|st          j        j        }|s%t	          t
          j        t
          j        d¦  «        }|sAt          j                             dt(          j        z  d¦  «                             dd¦  «        }t          j                             |¦  «        }t          j                             |¦  «        r| j        p| j                             |¦  «        | _        | j                             ¦   «          t          j                             | j         	                    ¦   «         ¦  «        s6t6                               d| j         	                    ¦   «         z  ¦  «         dS dS )z>
		Initialize the project directory and the build directory
		Nz.lock-waf_%s_r   z	.lock-wafz'Could not create the build directory %s)r   r   ÚoptionsÚtopÚgetattrr   Úg_moduleÚTOPÚpathÚabspathr   ÚisabsÚrootÚfind_dirÚsrcnoder   ÚoutÚOUTÚlockfileÚreplaceÚsysÚplatformÚrealpathÚ	make_nodeÚbldnodeÚmkdirÚisdirÚconfÚfatal)r   r0   r:   s      r    Ú	init_dirszConfigurationContext.init_dirs`   sÑ  € ð
 	Œ€#Ø	ð Ý	ŒÔ	€3Ø	ð 6Ý	•Ô!¥7¤;°Ñ	5Ô	5€3Ø	ð Ø	Œ×	Ò	Ñ	Ô	€3Ý
Œ�Š˜ÑÔ€#å”'—-’- Ñ$Ô$Ð2¨¬Ð?°d´i×IÒIÈ#ÑNÔN€$„,Ø	ŒÐÐÐàŒ€#Ø	ð Ý	ŒÔ	€3Ø	ð 6Ý	•Ô!¥7¤;°Ñ	5Ô	5€3Ø	ð _Ý	Ô	×	!Ò	! /µC´LÑ"@À"Ñ	EÔ	E×	MÒ	MÈkÐ[]Ñ	^Ô	^€3õ 	Œ×Ò˜ÑÔ€#å”'—-’- Ñ$Ô$Ð2¨¬Ð?°d´i×JÒJÈ3ÑOÔO€$„,Ø„,×ÒÑÔÐå	Œ�Š�t”|×+Ò+Ñ-Ô-Ñ	.Ô	.ð RÝ‡:‚:Ð7¸$¼,×:NÒ:NÑ:PÔ:PÑPÑQÔQÐQÐQÐQðRð Rr!   c                 óV
  •— |                       ¦   «          | j                             t          j        ¦  «        | _        | j                             ¦   «          t          j         	                    | j         
                    ¦   «         t          ¦  «        }t          j        |d¦  «        | _        t          t           j        dd¦  «        }|r%t          t           j        dd¦  «        }|r|›d|›d�}t%          j        ¦   «         t(          j        t(          j        d 	                    t(          j        ¦  «        t           j        t           j        |dœ}|                      t6          |z  ¦  «         |                      d	| j         
                    ¦   «         ¦  «         |                      d
| j         
                    ¦   «         ¦  «         t=          | j        ¦  «        t=          | j        ¦  «        k    rt          j        d¦  «         n]t=          | j        ¦  «        t=          | j        ¦  «        k    r3| j                              | j        ¦  «        rt          j        d¦  «         tC          tD          | ¦  «         #                    ¦   «          |  $                    ¦   «          | j         
                    ¦   «         t           _%        | j         
                    ¦   «         t           _&        tO          j'        ¦   «         }t(          j        |_        tP          j)        j*        |_)        | j+        |_,        t           j-        |_-        t           j%        |_%        t           j&        |_&        | j.        |_.        | j/        |_/        ta          | j1        ¦  «        |_1        | j2        j3        s{|j1         4                    d¦  «        sat          tP          j)        d¦  «        sG| $                    t          j         	                    t           j-        tP          j5        ¦  «        ¦  «         | j2        j6        s{|j1         4                    d¦  «        sat          tP          j)        d¦  «        sG| $                    t          j         	                    t           j%        tP          j5        ¦  «        ¦  «         | j2        j7        s}|j1         4                    d¦  «        set          tP          j)        d¦  «        sM| $                    t          j         	                    t           j&        tP          j5        ¦  «        ¦  «         dS dS dS dS )z3
		See :py:func:`waflib.Context.Context.execute`
		ÚcfgÚAPPNAMEr   ÚVERSIONú (ú)ú )ÚnowÚpyverÚsystypeÚargsÚwafverÚabiÚappzSetting top tozSetting out tozSetting top == outz5Are you certain that you do not want to set top="." ?ÚNO_LOCK_IN_RUNÚno_lock_in_runÚNO_LOCK_IN_TOPÚno_lock_in_topÚNO_LOCK_IN_OUTÚno_lock_in_outN)8rG   rB   rA   r   Ú	CACHE_DIRÚcachedirrC   r   r4   Újoinr5   ÚWAF_CONFIG_LOGr   Úmake_loggerÚloggerr1   r   r2   ÚtimeÚctimer>   Ú
hexversionr?   ÚargvÚ
WAFVERSIONÚABIÚto_logÚconf_templateÚmsgr9   ÚidÚwarnÚis_child_ofr   r   ÚexecuteÚstorer   r   r   r   r/   Ú__dict__ÚcmdÚ
config_cmdÚrun_dirr   r   r   r   r'   rV   Úgetr<   rX   rZ   )r   r4   rU   ÚverÚparamsr'   r   s         €r    rn   zConfigurationContext.execute‚   sù  ø€ ð ‡.‚.ÑÔÐà”,×(Ò(­¬Ñ9Ô9€$„-Ø„-×ÒÑÔÐå	Œ�Š�d”l×*Ò*Ñ,Ô,­nÑ	=Ô	=€$ÝÔ   uÑ-Ô-€$„+å•Ô  )¨RÑ0Ô0€#Øð !Ý	•Ô! 9¨bÑ	1Ô	1€3Ø	ð !Ø�s�s˜C˜C˜CÐ
 €Cå”:‘<”<­#¬.ÅSÄ\Ð[^×[cÒ[cÕdgÔdlÑ[mÔ[mõ  zAô  zLõ  U\ô  U`ð  ilð  mð  m€&Ø‡+‚+�m˜fÑ$Ñ%Ô%Ð%Ø‡(‚(Ð˜Tœ\×1Ò1Ñ3Ô3Ñ4Ô4Ð4Ø‡(‚(Ð˜Tœ\×1Ò1Ñ3Ô3Ñ4Ô4Ð4åˆŒÑÔ�˜DœLÑ)Ô)Ò)Ð)Ý„9Ð!Ñ"Ô"Ð"Ð"Ý	ˆ$Œ)�}„}�˜4œ<Ñ(Ô(Ò(Ð(Ø
„l×Ò˜tœyÑ)Ô)ð GÝ„IÐEÑFÔFÐFåÕ˜dÑ#Ô#×+Ò+Ñ-Ô-Ð-à‡*‚*�,„,€,à”L×(Ò(Ñ*Ô*…'„/Ø”L×(Ò(Ñ*Ô*…'„/õ
 	ÔÑÔ€#ÝŒX€#„(Ý”Ô(€#„+Ø”8€#„.å”€#„+Ý”€#„+Ý”€#„+ð ŒY€#„(ØŒj€#„)Ý�T”\Ñ"Ô"€#„+à
Œ(Ô
!ð > S¤[§_¢_Ð5EÑ%FÔ%Fð >Í'ÕRYÔRaÐcsÑJtÔJtð >Ø‡9‚9�RŒW�\Š\�'œ/­7Ô+;Ñ<Ô<Ñ=Ô=Ð=Ø
Œ(Ô
!ð > S¤[§_¢_Ð5EÑ%FÔ%Fð >Í'ÕRYÔRaÐcsÑJtÔJtð >Ø‡9‚9�RŒW�\Š\�'œ/­7Ô+;Ñ<Ô<Ñ=Ô=Ð=Ø
Œ(Ô
!ð > S¤[§_¢_Ð5EÑ%FÔ%Fð >Í'ÕRYÔRaÐcsÑJtÔJtð >Ø‡9‚9�RŒW�\Š\�'œ/­7Ô+;Ñ<Ô<Ñ=Ô=Ð=Ð=Ð=ð>ð >ð >ð >ð >ð >r!   c                 óÜ  — |j         s;t          j        j        st          j        rt          j        j        |_         nd|_         |j        sBt          j        j        rt          j        j        |_        nt	          j        d|¦  «        |_        |j	        sYt          j        j
        rt          j        j
        |_	        dS t	          j        dt	          j        ¦   «         z  |¦  «        |_	        dS dS )z¥
		Insert *PREFIX*, *BINDIR* and *LIBDIR* values into ``env``

		:type env: :py:class:`waflib.ConfigSet.ConfigSet`
		:param env: a ConfigSet, usually ``conf.env``
		ú/z${PREFIX}/binz${PREFIX}/lib%sN)ÚPREFIXr   r/   Úprefixr   Úis_win32ÚBINDIRÚbindirÚ
subst_varsÚLIBDIRÚlibdirÚlib64)r   r'   s     r    r#   z ConfigurationContext.prepare_env¿   sË   € ð 
Œð Ý„oÔð ¥¤ð Ý”Ô'€C„J€Jà€C„JØ	Œð 8Ý„oÔð 8Ý”Ô'€C„J€JåÔ! /°3Ñ7Ô7€C„JØ	Œð JÝ„oÔð JÝ”Ô'€C„J€J€JåÔ!Ð"3µe´k±m´mÑ"CÀSÑIÔI€C„J€J€Jð	Jð Jr!   c                 ó   — | j                              d¦  «        }|                     dt          j        | j        fz  ¦  «         | j        s|                      d¦  «         | j        D ]f}| j        |         }|                     t          j
                             | j                              ¦   «         |t          j        z   ¦  «        ¦  «         ŒgdS )z+Save the config results into the cache filezbuild.config.pyzversion = 0x%x
tools = %r
z.nothing to store in the configuration context!N)r]   rA   Úwriter   Ú
HEXVERSIONr   r   rF   ro   r   r4   r^   r5   r   ÚCACHE_SUFFIX)r   ÚnÚkeyÚtmpenvs       r    ro   zConfigurationContext.storeÖ   s¾   € à
„m×ÒÐ/Ñ0Ô0€!Ø‡'‚'Ð
(­GÔ,>ÀÄ
Ð+KÑ
KÑLÔLÐLà	Œð @Ø‡:‚:Ð>Ñ?Ô?Ð?àŒ]ð Qð Q€cØŒM˜#Ô€6Ø	‡<‚<•”—’˜Tœ]×2Ò2Ñ4Ô4°c½EÔ<NÑ6NÑOÔOÑPÔPÐPÐPðQð Qr!   TFc                 ó²  — t          j        |¦  «        }|rt          j        |¦  «        }|D �]¨}|rT|t          | j        ¦  «        ||f}|| j        v r|                      d|z  ¦  «         Œ?| j                             |¦  «         d}		 t          j        ||| |¬¦  «        }	n¡# t          $ rA}
|  
                    d|›dt          |
dt          j        ¦  «        ›d|
›�¦  «         Y d}
~
n[d}
~
wt          $ rK}
|                      d|›d	|›d
|›d�¦  «         |                      t          j        ¦   «         ¦  «         ‚ d}
~
ww xY w|�|                      |¦  «         n\t          |	dd¦  «        }|rIt%          |¦  «        t%          t           j        ¦  «        u r || ¦  «         n|                      |¦  «         | j                             |||dœ¦  «         �ŒªdS )aƒ  
		Load Waf tools, which will be imported whenever a build is started.

		:param tool_list: waf tools to import
		:type tool_list: list of string
		:param tooldir: paths for the imports
		:type tooldir: list of string
		:param funs: functions to execute from the waf tools
		:type funs: list of string
		:param cache: whether to prevent the tool from running twice
		:type cache: bool
		z%(tool %s is already loaded, skipping)N)ÚctxÚwith_sys_pathzCould not load the Waf tool z from Úwaf_sys_pathú
zimp rL   z & rM   r   )ÚtoolÚtooldirÚfuns)r   Úto_listrk   r'   r   rh   Úappendr   Ú	load_toolÚImportErrorrF   r1   r>   r4   Ú	ExceptionÚ	tracebackÚ
format_excÚ
eval_rulesÚtypeÚreadfr   )r   Ú	tool_listr�   r�   r‹   Úcacher   rŽ   ÚmagÚmoduleÚeÚfuncs               r    ÚloadzConfigurationContext.loadâ   s%  € õ Œ-˜	Ñ
"Ô
"€%Øð $ÝŒ]˜7Ñ#Ô#€7Øð Dñ D€dð ð  Ø•�D”H‘”˜w¨Ð
-€CØ
ˆdŒoÐÐØ	‡[‚[Ð8¸4Ñ?Ñ@Ô@Ð@ØØ„O×Ò˜3ÑÔÐà€6ð
ÝÔ˜t W°$ÀmÐTÑTÔT€F€FøÝ
ð oð oð oØ‡J‚J€J¸t¸t¸tÅWÈQÐP^Õ`cÔ`hÑEiÔEiÐEiÐEiÐklÐklÐmÑnÔnÐnÐnÐnÐnÐnÐnøøøøÝ
ð 
ð 
ð 
Ø‡K‚K€K d d d¨G¨G¨G°T°T°TÐ:Ñ;Ô;Ð;Ø‡K‚K•	Ô$Ñ&Ô&Ñ'Ô'Ð'Ø	øøøøð
øøøð
 ÐØ‡O‚O�DÑÔÐÐå�6˜;¨Ñ-Ô-€DØð ÝˆT‰
Œ
•d�5œ;Ñ'Ô'Ð'Ð'Ø
€dˆ4�j„j€j€jà
‡o‚o�dÑÔÐà„:×Ò˜T¨W¸TÐBÐBÑCÔCÐCÑCð?Dð Ds%   Â	B"Â"
E Â,7C(Ã(E Ã5AD;Ä;E c                 ó  •— t          t          | ¦  «                             |¦  «         t          j        | j        |                     d¦  «        f¦  «        | _        | j                             | 	                    ¦   «         ¦  «         dS )z®
		Records the path and a hash of the scripts visited, see :py:meth:`waflib.Context.Context.post_recurse`

		:param node: script
		:type node: :py:class:`waflib.Node.Node`
		ÚrbN)
r   r   Úpost_recurser   Úh_listr   Úreadr   r’   r5   )r   Únoder   s     €r    r¤   z!ConfigurationContext.post_recurse  sj   ø€ õ Õ˜dÑ#Ô#×0Ò0°Ñ6Ô6Ð6ÝŒl˜DœI t§y¢y°¡¤Ð7Ñ8Ô8€$„)Ø„*×Ò�D—L’L‘N”NÑ#Ô#Ð#Ð#Ð#r!   c                 ó´   — t          j        |¦  «        | _        | j        D ]6}t          | |¦  «        }|s|                      d|z  ¦  «          |¦   «          Œ7dS )z˜
		Execute configuration tests provided as list of functions to run

		:param rules: list of configuration method names
		:type rules: list of string
		z!No such configuration function %rN)r   r‘   Úrulesr1   rF   )r   r©   ÚxÚfs       r    r˜   zConfigurationContext.eval_rules  sl   € õ Œ}˜UÑ#Ô#€$„*ØŒ:ð ð €aÝˆt�QÑÔ€1Ø
ð 8Ø‡J‚JÐ2°QÑ6Ñ7Ô7Ð7Ø€1�3„3€3€3ð	ð r!   ©N)NNTF)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rq   Úerror_handlersr   r   r*   r-   Úpropertyr'   rG   rn   r#   ro   r¡   r¤   r˜   Ú__classcell__)r   s   @r    r   r      s$  ø€ € € € € ØÐà€à€ððð ð ð ð ð"ð ð ð ð>%ð %ð %ð$ð $ð $ð €x�˜Ñ!Ô!€ð Rð  Rð  RðD;>ð ;>ð ;>ð ;>ð ;>ðzJð Jð Jð.
Qð 
Qð 
Qð0Dð 0Dð 0Dð 0Dðd	$ð 	$ð 	$ð 	$ð 	$ðð ð ð ð ð ð r!   r   c                 ó    ‡ — ˆ fd„}‰ j         |_         t          t          ‰ j         |¦  «         t          t          j        ‰ j         |¦  «         ‰ S )ah  
	Decorator: attach new configuration functions to :py:class:`waflib.Build.BuildContext` and
	:py:class:`waflib.Configure.ConfigurationContext`. The methods bound will accept a parameter
	named 'mandatory' to disable the configuration errors::

		def configure(conf):
			conf.find_program('abc', mandatory=False)

	:param f: method to bind
	:type f: function
	c                  ót   •— |                      dd¦  «        }	  ‰| i |¤ŽS # t          j        $ r |r‚ Y d S w xY w)NÚ	mandatoryT)Úpopr	   ÚConfigurationError)Úkr   r¶   r«   s      €r    Úfunzconf.<locals>.fun9  se   ø€ Ø�fŠf�[ $Ñ'Ô'€)ð
Ø
ˆ!ˆQˆ+�"ˆ+ˆ+ÐøÝ	Ô	"ð 
ð 
ð 
Øð 
Ø	ð
ð 
ð 
ð
øøøs   ™! ¡7¶7)r­   Úsetattrr   r   ÚBuildContext)r«   rº   s   ` r    rE   rE   -  sX   ø€ ð
ð 
ð 
ð 
ð 
ð ”
€„ÝÕ	˜qœz¨3Ñ/Ô/Ð/Ý�Ô	˜QœZ¨Ñ-Ô-Ð-Ø	€r!   c                 ó>  — 	 t          j        | j        |         ¦  «        }n# t          $ r Y dS w xY w|sId                     |¦  «        d                     t          j        | j        |p|         ¦  «        ¦  «        vr| j                             |p||¦  «         dS dS )a@  
	Import operating system environment values into ``conf.env`` dict::

		def configure(conf):
			conf.add_os_flags('CFLAGS')

	:param var: variable to use
	:type var: string
	:param dest: destination variable, by default the same as var
	:type dest: string
	:param dup: add the same set of flags again
	:type dup: bool
	Nr   )	ÚshlexÚsplitr   ÚKeyErrorr^   r   r‘   r'   Úappend_value)r   ÚvarÚdestÚdupÚflagss        r    Úadd_os_flagsrÆ   F  s©   € ð	Ý
Œ+�d”l 3Ô'Ñ
(Ô
(€%€%øÝð 	ð 	ð 	Ø€&€&ð	øøøàð ,ˆ2�7Š7�5‰>Œ> §¢­¬°t´xÀÀÈÔ7LÑ)MÔ)MÑ!NÔ!NÐNÐNØ„(×Ò˜˜  UÑ+Ô+Ð+Ð+Ð+ð OÐNs   ‚" ¢
0¯0c                 ó2  — t          |t          ¦  «        r�t          j                             |¦  «        r|gS t          j        dk    rt          j        |¦  «        S 	 t          j        |d¬¦  «        S # t          $ r t          j        |¦  «        cY S w xY w|S )z˜
	Detect if a command is written in pseudo shell like ``ccache g++`` and return a list.

	:param cmd: command
	:type cmd: a string or a list of string
	rx   F)Úposix)	Ú
isinstanceÚstrr   r4   ÚisfileÚsepr¾   r¿   Ú	TypeError)r   rq   s     r    Úcmd_to_listrÎ   \  s    € õ ˆs•CÑÔð Ý„W‡^‚^�CÑÔð àˆ%€<Ý„Vˆs‚]€]Ý
Œ+�cÑ
Ô
ÐðÝŒ;�s %Ð(Ñ(Ô(Ð(øÝ
ð ð ð åŒ;�sÑÔÐÐÐðøøøð 	€s   ÁA3 Á3BÂBú1.9.99ú2.1.0c                 ó¬  —  | j         dt          |¦  «        ›dt          |¦  «        ›�fi |¤Ž t          j        }t	          j        |¦  «        |k    r.|                      dt	          j        |¦  «        ›d|›d�¦  «         t	          j        |¦  «        |k     r.|                      dt	          j        |¦  «        ›d|›d�¦  «          | j        d	i |¤Ž dS )
a.  
	Raise a Configuration error if the Waf version does not strictly match the given bounds::

		conf.check_waf_version(mini='1.9.99', maxi='2.1.0')

	:type  mini: number, tuple or string
	:param mini: Minimum required version
	:type  maxi: number, tuple or string
	:param maxi: Maximum allowed version
	zChecking for waf version in ú-zwaf version should be at least rL   z found)zwaf version should be at most ÚokN)rÓ   )Ú	start_msgrÊ   r   r„   r   Únum2verrF   Úend_msg)r   ÚminiÚmaxir   ru   s        r    Úcheck_waf_versionrÙ   r  sè   € ð €„€µs¸4±y´y°y°yÅ#ÀdÁ)Ä)À)ÐLÐSÐSÐPRÐSÐSÐSÝÔ€Ý	„M�$ÑÔ˜#ÒÐØ‡*‚*€*½u¼}ÈTÑ?RÔ?RÐ?RÐ?RÐTWÐTWÐTWÐXÑYÔYÐYÝ	„M�$ÑÔ˜#ÒÐØ‡*‚*€*½e¼mÈDÑ>QÔ>QÐ>QÐ>QÐSVÐSVÐSVÐWÑXÔXÐXØ€„ÐÐ�bÐÐÐÐÐr!   c                 óV  — t          j        |¦  «        D ]{}t          j        |¦  «        D ]d}t          j                             t          j                             ||¦  «        ¦  «        }t          j                             |¦  «        r|c c S ŒeŒ||                      d|z  ¦  «         dS )zÕ
	Find a file in a list of paths

	:param filename: name of the file to search for
	:param path_list: list of directories to search
	:return: the first matching filename; else a configuration exception is raised
	zCould not find %rN)r   r‘   r   r4   Ú
expanduserr^   ÚexistsrF   )r   ÚfilenameÚ	path_listr†   ÚdÚps         r    Ú	find_filerá   †  s¨   € õ Œ-˜Ñ
!Ô
!ð ð €QÝŒ=˜Ñ#Ô#ð ð €aÝ	„w×Ò�"œ'Ÿ,š, q¨!Ñ,Ô,Ñ-Ô-€1Ý„g‡n‚n�QÑÔð Ø€H€H€H€H€Hððð ‡‚Ð (Ñ*Ñ+Ô+Ð+Ð+Ð+r!   c           
      óô  — |                      dt          j        rdpd¦  «        }|                      dt          | dt          j        ¦  «        ¦  «        }d}t          j        |¦  «        }|                      dd                     |¦  «        ¦  «        }|                      dd¦  «        }|s.t          j	        d	d
|d          
                    ¦   «         ¦  «        }|                      dd¦  «        }|rt          j        |¦  «        }n3|                      dd¦  «                             t          j        ¦  «        }|                      d¦  «        r|                      |d         ¦  «        }�n|                      |¦  «        r|                      ||         ¦  «        }nÓ| j        |         r!|                      | j        |         ¦  «        }n¥|s*|                      ||                     d¦  «        |¦  «        }|s0t          j        r$t          j        t          j        j        |¦  «        }|s0t          j        r$t          j        t          j        j        |¦  «        }|                      |¦  «        }|rt)          |¦  «        dk    r	|d         }	n|}	nd}	 | j        d|z  |	fi |¤Ž |                      d¦  «        s!|                      d|›d|›d|›d|›�¦  «         |s.|                      |                      dd¦  «        pd|z  ¦  «         |                      d¦  «        }
|
€?t          j        |d         |¬¦  «        s|                      d|z  ¦  «         || j        |<   n| j        |
         |z   | j        |<   |S )a…  
	Search for a program on the operating system

	When var is used, you may set os.environ[var] to help find a specific program version, for example::

		$ CC='ccache gcc' waf configure

	:param path_list: paths to use for searching
	:type param_list: list of string
	:param var: store the result to conf.env[var] where var defaults to filename.upper() if not provided; the result is stored as a list of strings
	:type var: string
	:param value: obtain the program from the value passed exclusively
	:type value: list or string (list is preferred)
	:param exts: list of extensions for the binary (do not add an extension for portability)
	:type exts: list of string
	:param msg: name to display in the log, by default filename is used
	:type msg: string
	:param interpreter: interpreter for the program
	:type interpreter: ConfigSet variable key
	:raises: :py:class:`waflib.Errors.ConfigurationError`
	Úextsz.exe,.com,.bat,.cmdz,.sh,.pl,.pyr   r   rj   z, rÂ   z[-.]Ú_r   rÞ   ÚPATHÚvalueú,é   FzChecking for program %rÚquietzfind program=z paths=z var=z -> ÚerrmsgzCould not find the program %rÚinterpreterN©r'   zProgram %r is not executable)rt   r   r{   r1   r   r   r‘   r^   ÚreÚsubÚupperr¿   ÚpathseprÎ   r'   Úfind_binaryÚwinregÚget_registry_app_pathÚHKEY_CURRENT_USERÚHKEY_LOCAL_MACHINEÚlenrj   rh   rF   Ú	check_exe)r   rÝ   r   rã   r   Úretrj   rÂ   rÞ   Úretmsgrë   s              r    Úfind_programrú   –  sN  € ð0 	�Šˆv•u”~Ð?Ð*?ÐQÀ>ÑRÔR€à�6Š6�)�W T¨9µb´jÑAÔAÑBÔB€à	€åŒM˜(Ñ#Ô#€Ø	‡v‚vˆe�T—Y’Y˜xÑ(Ô(Ñ)Ô)€à	‡v‚vˆe�RÑÔ€Øð 2Ý
Œˆw˜˜X aœ[×.Ò.Ñ0Ô0Ñ1Ô1€#à�VŠV�K Ñ$Ô$€Øð 8ÝŒm˜IÑ&Ô&€)€)à�kŠk˜& "Ñ%Ô%×+Ò+­B¬JÑ7Ô7€)à‡F‚Fˆ7�O„Oð à×Ò˜˜GœÑ%Ô%€#�#Ø‡k‚k�#ÑÔð à×Ò˜ œÑ&Ô&€#€#Ø
„hˆs„mð 
à×Ò˜œ #œÑ'Ô'€#€#à	ð @Ø	×	Ò	˜( D§J¢J¨s¡O¤O°YÑ	?Ô	?€3Ø	ð O•”ð OÝ	Ô	$¥U¤\Ô%CÀXÑ	NÔ	N€3Ø	ð P•”ð PÝ	Ô	$¥U¤\Ô%DÀhÑ	OÔ	O€3Ø×Ò˜ÑÔ€#àð Ýˆ�X„X�‚]€]Ø�ŒF€6€6à€6€6à€&à	€„Ð
# cÑ
)¨6Ð8Ð8°RÐ8Ð8Ð8Ø
�Šˆw‰Œð YØ‡+‚+€+¸¸¸À9À9À9ÈcÈcÈcÐSVÐSVÐWÑXÔXÐXàð QØ‡*‚*ˆR�VŠV�H˜bÑ!Ô!ÐOÐ%DÀxÑ%OÑPÔPÐPà�vŠv�mÑ$Ô$€ØÐÝ	Œ˜˜Qœ WÐ	-Ñ	-Ô	-ð 4Ø‡:‚:Ð,¨sÑ2Ñ3Ô3Ð3Ø€$„(ˆ3�-€-à”(˜;Ô'¨#Ñ-€$„(ˆ3�-à€r!   c           	      ó€  — |D ]º}|D ]µ}||z   }t           j                             |¦  «        r&t           j                             |¦  «        r|c c S ŒL|D ]f}t           j                             t           j                             ||¦  «        ¦  «        }t           j                             |¦  «        r|c c c S ŒgŒ¶Œ»d S r¬   )r   r4   r6   rË   rÛ   r^   )	r   Ú	filenamesrã   Úpathsr«   ÚextÚexe_namer4   rª   s	            r    rñ   rñ   ì  sÚ   € à
ð 
ð 
€QØð 	ð 	€cØ�#‰g€8Ý„g‡m‚m�HÑÔð Ý	„w‡~‚~�hÑÔð Ø€_€_€_€_€_ðð ð ð ˆÝ	Œ×	Ò	�BœGŸLšL¨¨xÑ8Ô8Ñ	9Ô	9€QÝ
Œ�Š�qÑÔð Ø€h€h€h€h€h€h€hððð	ð 	ˆr!   c                 óÄ  — d„ |                      ¦   «         D ¦   «         }t          j        |¦  «        }| j                             ¦   «         t
          j        z   t          j         rdpdz   dz   t          j        |¦  «        z   }	 t          j	        |¦  «         n# t          $ r Y nw xY w	 t          j        |¦  «         n(# t          $ r |                      d|z  ¦  «         Y nw xY wt          t          j        dd¦  «        }|dk    rŒ	 t!          j        t
          j                             |d	¦  «        ¦  «        }|d	         }t'          |t(          ¦  «        r*|                     d
¦  «        r|                      |¦  «         |S # t,          $ r Y nw xY wt
          j                             |d¦  «        }	t
          j                             |	¦  «        st          j	        |	¦  «         |                     d¦  «        pt          | dd¦  «        }
t3          j        |
||	¬¦  «        x| _        }|                     ¦   «          d|_        d|_        | j        |_        |j          !                    | j         ¦  «         |d         |_"        ||_#        | |_$         |d         |¦  «         d}	 	 | %                    ¦   «          t          |dd¦  «        }n@# tL          j'        $ r. dtQ          j)        ¦   «         z  }|                      |¦  «         Y nw xY w|dk    rLt!          j        ¦   «         }||d	<   | *                    t
          j                             |d	¦  «        ¦  «         n€tW          j,        |¦  «         nk# |dk    rLt!          j        ¦   «         }||d	<   | *                    t
          j                             |d	¦  «        ¦  «         w tW          j,        |¦  «         w xY w|S )aÆ  
	Create a temporary build context to execute a build. A reference to that build
	context is kept on self.test_bld for debugging purposes, and you should not rely
	on it too much (read the note on the cache below).
	The parameters given in the arguments to this function are passed as arguments for
	a single task generator created in the build. Only three parameters are obligatory:

	:param features: features to pass to a task generator created in the build
	:type features: list of string
	:param compile_filename: file to create for the compilation (default: *test.c*)
	:type compile_filename: string
	:param code: code to write in the filename to compile
	:type code: string

	Though this function returns *0* by default, the build may set an attribute named *retval* on the
	build context object to return a particular value. See :py:func:`waflib.Tools.c_config.test_exec_fun` for example.

	This function also provides a limited cache. To use it, provide the following option::

		def options(opt):
			opt.add_option('--confcache', dest='confcache', default=0,
				action='count', help='Use a configuration cache')

	And execute the configuration with the following command-line::

		$ waf configure --confcache

	c                 ó>   — g | ]\  }}|d k    ¯t          |¦  «        ‘ŒS rì   )rÊ   )Ú.0rà   Úvs      r    ú
<listcomp>zrun_build.<locals>.<listcomp>  s'   € Ð6Ð6Ð6‘6�A�q¨1°ª:¨:�ˆA‰Œ¨:¨:¨:r!   ú.r   Úconf_check_z+cannot use the configuration test folder %rÚ	confcacheNrè   Úcache_run_buildzTest does not buildÚ	testbuildÚrun_build_clsÚbuild)r   r   r   Ú*r'   Ú	build_funéÿÿÿÿÚretvalzTest does not build: %s)-Úitemsr   r¥   rB   r5   r   rÌ   r{   Úto_hexÚmakedirsÚOSErrorÚstatrF   r1   r   r/   r   r4   r^   rÉ   rÊ   Ú
startswithÚEnvironmentErrorrÜ   rt   r   Úcreate_contextÚtest_bldrG   Úprogress_barÚtargetsra   r   Úupdater'   r   rE   Úcompiler	   ÚWafErrorr–   r—   ro   ÚshutilÚrmtree)r   r¹   r   ÚlstÚhÚdirÚ	cachemodeÚprojrø   ÚbdirÚcls_nameÚblds               r    Ú	run_buildr(  û  sÊ  € ð< 7Ð6˜RŸXšX™ZœZÐ6Ñ6Ô6€Ý
„\�#ÑÔ€Ø„|×ÒÑÔ¥¤Ñ&­e¬nÐ*<Ð*DÀÐ*JÈÑKÈmÑ[Õ^cÔ^jÐklÑ^mÔ^mÑm€ðÝ„+ˆcÑÔÐÐøÝð ð ð Ø€$ðøøøðBÝ„'ˆ#�,„,€,€,øÝð Bð Bð BØ‡*‚*Ð:¸SÑ@ÑAÔAÐAÐAÐAðBøøøõ •W”_ k°4Ñ8Ô8€Ø�‚N€NðÝ
Ô
�bœgŸlšl¨3Ð0AÑBÔBÑ
CÔ
C€4ð 
ÐÔ	 €3Ý�•cÑÔð ˜sŸ~š~Ð.CÑDÔDð Ø‡J‚Jˆs�O„O€OØ
€:øõ 
ð ð ð Ø€4ðøøøõ 	Œ�Š�S˜+Ñ&Ô&€å
Œ�Š�tÑÔð Ý„+ˆdÑÔÐà�FŠF�?Ñ#Ô#ÐN¥w¨t°_ÀgÑ'NÔ'N€ÝÔ-¨hÀÈTÐRÑRÔRÐR€„�Ø‡‚�„€Ø€ÔØ€„àŒk€„Ø„×Ò�T”]Ñ#Ô#Ð#ØˆeŒ9€„à
€„Ø€„Ø€€K„�ÑÔÐØ	€ðð#Ø‡;‚;�=„=€=õ
 
��h Ñ	"Ô	"€3€3øõ	 
Œð ð ð Ø	"¥YÔ%9Ñ%;Ô%;Ñ	;€3Ø‡:‚:ˆc�?„?€?€?€?ðøøøð �!‚^€^å
Ô
Ñ
Ô
€4Ø €4ÐÑØ‡:‚:�bŒg�lŠl˜3Ð 1Ñ2Ô2Ñ3Ô3Ð3Ð3å	„=�ÑÔÐÐøð �!‚^€^å
Ô
Ñ
Ô
€4Ø €4ÐÑØ‡:‚:�bŒg�lŠl˜3Ð 1Ñ2Ô2Ñ3Ô3Ð3Ð3å	„=�ÑÔÐÐøøøØ€sa   ÂB Â
B&Â%B&Â*B? Â?"C$Ã#C$Ä	2F Æ
FÆFÊ(K Ê<M5 Ë:LÌM5 Ì
LÌM5 Í5A(Oc                 óF   — t          |t          ¦  «        r|S  ||¦  «        S r¬   )rÉ   rÊ   )r   rj   rR   s      r    Úret_msgr*  X  s'   € åˆs•CÑÔð Ø	€*ØˆˆD‰	Œ	Ðr!   c                 ó‚  — d|vr| j                              ¦   «         |d<   |                     d¦  «        r |d         |¦  «          | j        |d         fi |¤Ž d }	  | j        |i |¤Ž}||d<   nP# | j        j        $ r>  | j        |d         dfi |¤Ž t          j	        dk    r‚ |  
                    d¦  «         Y nw xY w|                     d	¦  «        r |d	         |¦  «        }|r. | j        |d         dfi |¤Ž |  
                    d
|z  ¦  «         n( | j        |                      |d         |¦  «        fi |¤Ž |S )Nr'   Úvalidaterj   Úsuccessrê   ÚYELLOWrè   zThe configuration failedÚ
post_checkzThe configuration failed %rÚokmsg)r'   r$   rt   rÔ   r(  Úerrorsr¸   rÖ   r   ÚverboserF   r*  )r   r¹   r   rø   s       r    Útestr3  ^  s   € ð 	�ˆˆØŒh�oŠoÑÔ€"€U�)ð ‡F‚Fˆ:ÑÔð Ø€"€Z„.�ÑÔÐà€„��5”	Ð Ð ˜RÐ Ð Ð Ø€ð	ØˆŒ˜Ð ˜RÐ Ð €#ð €"€Y�-€-øð 	ŒÔ&ð *ð *ð *Ø€$„,ˆr�(Œ|˜XÐ,Ð,¨Ð,Ð,Ð,Ý	„\�AÒÐØà‡:‚:Ð(Ñ)Ô)Ð)Ð)Ð)ð*øøøð ‡F‚Fˆ<ÑÔð Øˆˆ<Ô˜ÑÔ€#àð 4Ø€$„,ˆr�(Œ|˜XÐ,Ð,¨Ð,Ð,Ð,Ø‡*‚*Ð*¨SÑ0Ñ1Ô1Ð1Ð1à€$„,ˆt�|Š|˜B˜wœK¨Ñ,Ô,Ð3Ð3°Ð3Ð3Ð3Ø€s   ÁA1 Á1A
B>Â=B>)NF)rÏ   rÐ   )r°   r   rí   r¾   r  r>   rb   r–   Úwaflibr   r   r   r   r   r   r	   r_   Ú
autoconfigri   r   rE   rÆ   rÎ   rÙ   rá   rú   rñ   r(  r*  r3  r   r!   r    ú<module>r6     s  ðð
ð ð 3Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ Jà€Ø (à€
Ø -ð€ð
Nð Nð Nð Nð N˜7œ?ñ Nô Nð Nð`
ð 
ð 
ð2 ð,ð ,ð ,ñ „ð,ð* ðð ñ „ðð* ðð ð ñ „ðð& Ø(*ð ,ð ,ð ,ñ „ð,ð ðSð Sñ „ðSðj ðð ñ „ðð ðZð Zñ „ðZðx ðð ñ „ðð
 ðð ñ „ðð ð r!   