%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/usr/src/node-v0.10.4/tools/gyp/pylib/gyp/
Upload File :
Create Path :
Current File : //proc/self/root/usr/src/node-v0.10.4/tools/gyp/pylib/gyp/__init__.pyc

�
4�fQc@s:ddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZiZdZ
dZdZd�Zd�Zigddeed	�Zd
�Zd�Zd�Zd
�Zd�Zdejfd��YZd�Zd�Zedkr6ej eej!d��ndS(i����N(tGypErrortgeneralt	variablestincludescGs�dtjks|tjkr�d	}y-tjdd�}|rP|dd }nWnnX|rn||;}nd|j�tjj|d�|d|d|fGHndS(
Ntalltunknownitlimitiis%s:%s:%d:%s %si(sunknownisunknown(tgyptdebugt	tracebackt
extract_stacktuppertostpathtbasename(tmodetmessagetargstctxtf((s!./tools/gyp/pylib/gyp/__init__.pytDebugOutputs
cCsUd}tjtj��}g}x-|D]%}|j|�r(|j|�q(q(W|S(Ns.gyp(Rtlistdirtgetcwdtendswithtappend(t	extensiontfilestbuild_filestfile((s!./tools/gyp/pylib/gyp/__init__.pytFindBuildFiles(s
t.c
CsG|dkri}nd}d|krF|jdd�\}|d<ntj|�}||d<|jd�r�tjj|�d}	tjj|	�\}
}	tjj|
�}
|
tjkr�tjj	d|
�q�n
d|}	t
|	t�t�|	�}x-|j
j�D]\}}
|j||
�qWt|dd�rP|j||�nt|d	d�rr|j|�nit|d
t�d
6t|dt�d6t|dg�d
6t|dg�d6t|dg�d6t|dt�d6t|dt�d6t|dt�d6}tjj||||||||d�}|g|S(s�
  Loads one or more specified build files.
  default_variables and includes will be copied before use.
  Returns the generator for the specified format and the
  data returned by loading the specified build files.
  t-itflavort	GENERATORs.pyisgyp.generator.tCalculateVariablestCalculateGeneratorInputInfot)generator_wants_absolute_build_file_pathstgenerator_handles_variantst+generator_additional_non_configuration_keystnon_configuration_keyst"generator_additional_path_sectionst
path_sectionst!generator_extra_sources_for_rulestextra_sources_for_rulest$generator_supports_multiple_toolsetst4generator_wants_static_library_dependencies_adjustedt#generator_wants_sorted_dependenciestparallelN(tNonetsplittcopyRRR
tsplitexttabspathtsystinsertt
__import__tglobalstlocalstgenerator_default_variablestitemst
setdefaulttgetattrR"R#tFalsetTrueRtinputtLoad(Rtformattdefault_variablesRtdepthtparamstchecktcircular_checkR tgenerator_nameR
t	generatortkeytvaltgenerator_input_infotresult((s!./tools/gyp/pylib/gyp/__init__.pyRA2sF		



cCs�i}x�|D]{}|jdd�}t|�dkrzyt|d�}Wntk
rh|d}nX|||d<q
t||d<q
W|S(s�
  Takes an array of strings of the form 'NAME=VALUE' and creates a dictionary
  of the pairs.  If a string is simply NAME, then the value in the dictionary
  is set to True.  If VALUE can be converted to an integer, it is.
  t=iii(R1tlentintt
ValueErrorR?(tname_value_listRMtitemttokensttoken_value((s!./tools/gyp/pylib/gyp/__init__.pytNameValueListToDict�s

cCs1tjj|g�}|r-tj|�}n|S(N(RtenvirontgettshlexR1(tenv_nametflags((s!./tools/gyp/pylib/gyp/__init__.pytShlexEnv�scCs%|jd�rd||fS||S(Ns--s%s=%s(t
startswith(topttvalue((s!./tools/gyp/pylib/gyp/__init__.pyt	FormatOpt�scCs�g}|jrm|rmxUt|�D]D}t|||��}||krY|j|�n|j|�q"Wn|r�x-|D]"}|jt|||���qzWn|S(s�Regenerate a list of command line flags, for an option of action='append'.

  The |env_name|, if given, is checked in the environment and used to generate
  an initial list of options, then the options that were specified on the
  command line (given in |values|) are appended.  This matches the handling of
  environment variables and command line flags where command line flags override
  the environment, while not requiring the environment to be set when the flags
  are used again.
  (tuse_environmentR\R`tremoveR(tflagtvaluest	predicateRZtoptionsR[t
flag_valueR_((s!./tools/gyp/pylib/gyp/__init__.pytRegenerateAppendFlag�s

#c
s��fd�}d�}dg}x��jj�D]�\}}|d}t�|�}|ddkrl|po|}|d}	|d}
|	d	kr�|jt||||
���q1|	dkr4|r�|jt|||���q��jr�|
r�t	j
j|
�r�|jt||t	j
j|
����q�q1|	dkr�|	dkrR|se|	dkru|ru|j|�q��jr�|
r�tj
d
|	||
fIJq�q1tj
d|	|fIJq1W|S(s}Given a parsed options object, and taking the environment variables into
  account, returns a list of flags that should regenerate an equivalent options
  object (even in the absence of the environment variables.)

  Any path options will be normalized relative to depth.

  The format flag is not included, as it is assumed the calling generator will
  set that as appropriate.
  cs,tjj|�j�}|s(tjjS|S(N(RtcommontFixIfRelativePathRDRR
tcurdir(R
(Rf(s!./tools/gyp/pylib/gyp/__init__.pytFixPath�s
cSs|S(N((R_((s!./tools/gyp/pylib/gyp/__init__.pytNoop�ss--ignore-environmentR^ttypeR
tactionRZRtstoret
store_truetstore_falsesJWarning: environment regeneration unimplemented for %s flag %r env_name %rs9Warning: regeneration unimplemented for action %r flag %rN(RpN(RqRr(t_regeneration_metadatat	iteritemsR=textendRhR0RR`RaRRWRXR5tstderr(RfRlRmR[tnametmetadataR^R_tvalue_predicateRoRZ((Rfs!./tools/gyp/pylib/gyp/__init__.pytRegenerateFlags�s8
		


!.

tRegeneratableOptionParsercBs#eZd�Zd�Zd�ZRS(cCsi|_tjj|�dS(N(t1_RegeneratableOptionParser__regeneratable_optionstoptparsetOptionParsert__init__(tself((s!./tools/gyp/pylib/gyp/__init__.pyR�s	cOs�|jdd
�}d|kr�|jdt�r�|d}|jd�}|dkrbd|d<ni|jd�d6|d6|d6|dd	6|j|<ntjj|||�d
S(s�Add an option to the parser.

    This accepts the same arguments as OptionParser.add_option, plus the
    following:
      regenerate: can be set to False to prevent this option from being included
                  in regeneration.
      env_name: name of environment variable that additional values for this
                option come from.
      type: adds type='path', to tell the regenerator that the values of
            this option need to be made relative to options.depth
    RZtdestt
regenerateRnR
tstringRoiR^N(tpopR0R?RXR|R}R~t
add_option(R�RtkwRZR�Rn((s!./tools/gyp/pylib/gyp/__init__.pyR��s

cGs1tjj||�\}}|j|_||fS(N(R}R~t
parse_argsR|Rs(R�RRd((s!./tools/gyp/pylib/gyp/__init__.pyR�s(t__name__t
__module__RR�R�(((s!./tools/gyp/pylib/gyp/__init__.pyR{�s		c$Cs�tjjtjd�}t�}d}|j|jdd��|jddddd	d
ddd
dd�|jdddddd	dddt	dd�|jddddt	dd�|jdddddd	d
ddddd�|jd dd!d
d"dddd#�|jd$d%dd&d
d'dd	d(gdd)�|jd*d+dd,d(d-dd.�|jd/dd0dd	d(gd
d1dd2dd3�|jd4dd5dd6d(dd
d7dddd8dd9�|jd:dd;dd<d(tdt	dd=�|jd>dd?dd@ddA�|jdBdd@ddCddD�|jdEddFdd6d(dd
d7ddddG�|jdHddIdd	ddJ�|jdKddLdd<d(tdt	ddM�dNg}tjdqkr�|j
dQ�nd}d}x]|D]U}tj|�}|dkr�tjj|dR�}tjj|�s4d}q8Pq�q�W|j|�\}}	|	}
|js�g}|jr�tjjdg�}n|r�tjdS|�}n|r�||_q�tjdTkr�dUg|_q�tjdrkr�dVg|_q�dWg|_n|jr9|jr9tjjd8�}|r9||_q9n|jr||jr|tjjdC�}
t|
op|
dXk�|_nx|jD]}dYtj|<q�Wttjkr0ttdZ�xtt|j j!��D]Z\}}|dd[kr�q�nt"|t#�rttd\||�q�ttd]||�q�Wn|
sBt$�}
n|
set%|d^||f��n|j&s:x�|
D]�}tjj'tjj(|��}|jtjj)�}t*|�}xQt+|dYd_d_�D]9}||d`krtjj)j|�|_&Pn||=q�W|j&ruPququW|j&s:t%da��q:n|j,sR|j&|_,ni}g}|jrz|t-d
�7}n|j.r�||j.7}nt/|�}ttjkr�ttdb|�ng}|dkrtjj|dc�}tjj|�rdd|GH|j
|�qn|j0r2|j1|j0�ng}|jrT|t-d2�7}n|j2rm||j27}nt/|�}ttjj3�kr�ttde|�n|j4r�tj5df|j4dg|j4IJ|j4|d<nxt6|j�D]
}i|dh6|
di6|d06tj7�dj6|	dk6tjddl6|dm6|jdn6}t8|
||||j&||j9|j:�\}}} }!|j;|| |!|�|j<r�| |ddoj3�}"x0|j<D]%}#|#|"kr�t%dp|#��q�q�W|j=|!|j<|�q�q�WdS(sNis(usage: %s [options ...] [build_file ...]s%ss%progs-DR�tdefinesRoRtmetavarsVAR=VALRZtGYP_DEFINESthelpssets variable VAR to value VALs-fs--formattformatstGYP_GENERATORSR�soutput formats to generates--msvs-versiontmsvs_versions4Deprecated; use -G msvs_version=MSVS_VERSION insteads-Is	--includeRtINCLUDERnR
s)files to include in all loaded .gyp filess--depthRDtPATHs1set DEPTH gyp variable to a relative path to PATHs-ds--debugRt	DEBUGMODEtdefaults�turn on a debugging mode for debugging GYP.  Supported modes are "variables", "includes" and "general" or "all" for all of them.s-Ss--suffixtsuffixts suffix to add to generated filess-Gtgenerator_flagssFLAG=VALtGYP_GENERATOR_FLAGSssets generator flag FLAG to VALs--generator-outputtgenerator_outputRptDIRtGYP_GENERATOR_OUTPUTs$puts generated build files under DIRs--ignore-environmentRaRrs.do not read options from environment variabless--checkRFRqscheck format of gyp filess
--paralleltGYP_PARALLELs,Use multiprocessing for speed (experimental)s--toplevel-dirttoplevel_dirs/directory to use as the root of the source trees--buildtconfigss0configuration for build after project generations--no-circular-checkRGs4don't check for circular relationships between filestHOMEtcygwintwin32tUSERPROFILEs.gyps[\s,]tdarwintxcodetmsvstmaket0isrunning with these options:t_s
  %s: '%s's  %s: %ss

%s: error: no build_filei����tsrcs�Could not automatically locate src directory.  This isa temporary Chromium feature that will be removed.  Use--depth as a workaround.scmdline_default_variables: %ssinclude.gypisUsing overrides found in sgenerator_flags: %ss0DEPRECATED: Use generator flag (-G msvs_version=s) instead of --msvs-version=RfRtcwdtbuild_files_argt
gyp_binarythome_dot_gypR/tconfigurationss(Invalid config specified via --build: %s(scygwinswin32(swin32scygwin(>RR
RR5targvR{t	set_usagetreplaceR�R>R0R?tplatformRtgetenvtjointexistsR�R�RaRWRXtreR1R�R/tboolRRt
DEBUG_GENERALRtsortedt__dict__R;t
isinstancet
basestringRRRDR4tdirnametsepROtxrangeR�R\R�RVRRuR�tkeysR�RvtsetRRARFRGtGenerateOutputR�tPerformBuild($Rtmy_nametparsertusaget	home_varsthomeR�thome_varRfR�Rtgenerate_formatstg_otpRtoptionR_t
build_filetbuild_file_dirtbuild_file_dir_componentstcomponents_lentindextcmdline_default_variablesR�Rtdefault_includet	gen_flagsR�RBRERIt	flat_listttargetstdatat
valid_configstconf((s!./tools/gyp/pylib/gyp/__init__.pytgyp_mainsF		
			
"
	
					
					



					cCs=yt|�SWn(tk
r8}tjjd|�dSXdS(Nsgyp: %s
i(R�RR5Rvtwrite(Rte((s!./tools/gyp/pylib/gyp/__init__.pytmains
t__main__i("R2t	gyp.inputRR}tos.pathRR�RYR5R	t
gyp.commonRRR�tDEBUG_VARIABLEStDEBUG_INCLUDESRRR0R>R?RARVR\R`RhRzR~R{R�R�R�texitR�(((s!./tools/gyp/pylib/gyp/__init__.pyt<module>s6		
R					2)	�	

Zerion Mini Shell 1.0